Results 1 to 6 of 6
- 03-22-2010, 10:38 AM #1
Member
- Join Date
- Nov 2009
- Location
- California
- Posts
- 55
- Rep Power
- 0
does anyone know what is wrong with this?
does anyone know what is wrong with this sort?
Java Code://Sort the values of the 4 rolls for (int index = 1; index < 4; index++) // index refers to the element that is "trying to find its place" { int key = fourRollVals[index]; int position = index; // shift larger values to the right while (position > 0 && fourRollVals[position-1] >= key) { fourRollVals[position] = fourRollVals[position-1]; position--; } fourRollVals[position] = key; }
- 03-22-2010, 10:43 AM #2
How do you try to output the array?
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 03-22-2010, 10:52 AM #3
Member
- Join Date
- Nov 2009
- Location
- California
- Posts
- 55
- Rep Power
- 0
System.out.println("The Sorted Array of the Rolls is: " + fourRollVals);
- 03-22-2010, 11:00 AM #4
Oh crossposted Java Programming - does anyone know what is wrong with this?
I'm out. Bye.Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 03-22-2010, 11:20 AM #5
- 03-22-2010, 11:25 AM #6
Member
- Join Date
- Nov 2009
- Location
- California
- Posts
- 55
- Rep Power
- 0
Similar Threads
-
Wrong output (well.. the one who's wrong is probably me ;) )
By shacht1 in forum New To JavaReplies: 4Last Post: 06-11-2013, 02:37 AM -
what am i doing wrong here?
By GPB in forum New To JavaReplies: 3Last Post: 03-21-2010, 05:04 PM -
what is wrong?
By pinguxxx in forum Advanced JavaReplies: 3Last Post: 07-15-2009, 01:33 PM -
What did i do wrong
By jpnym15 in forum New To JavaReplies: 8Last Post: 11-17-2008, 11:07 AM -
Can someone tell me what I did wrong??
By booter4429 in forum New To JavaReplies: 7Last Post: 08-13-2008, 09:35 PM
Bookmarks