Joined
Last Seen
-2 Reputation Points
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
0% Quality Score
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
0 Endorsements
Ranked #107.55K
1 Posted Topic
Re: import java.util.*; public class DS2 { public static void main(String[] args) { Scanner k=new Scanner(System.in); int[] ds=new int[10]; for (int z=0;z<10;z++) { Random R=new Random(); int x=R.nextInt(999)+1; ds[z]=x; } System.out.println("Numbers Before Sort:\n"+ds[1]+","+ds[2]+","+ds[3]+","+ds[4]+","+ds[5]+","+ds[6]+","+ds[7]+","+ds[8]+","+ds[9]+"\n"); Arrays.sort(ds); System.out.print("Numbers After Sort:\n"+ds[1]+","+ds[2]+","+ds[3]+","+ds[4]+","+ds[5]+","+ds[6]+","+ds[7]+","+ds[8]+","+ds[9]); } } |
The End.