-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskArray.java
More file actions
63 lines (33 loc) · 870 Bytes
/
TaskArray.java
File metadata and controls
63 lines (33 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
public class TaskArray{
public static void main(String[]args){
int[] score = {4,5,7,23,44,55,65,76,22,12,0};
for(int counter =0;counter<score.length;counter++){
int mini = counter;
for(int index=counter+1; index<score.length;index++){
if(scores[index] < score[mini]){
mini = index;
}
}
int tempValue = score [mini];
score[mini]= score[count];
score[count] = tempValue;
}
for(int count = 0;count< score.length; count++){
System.out.print(score[count]+ "");
}
}
}
//
// System.out.print("Enter first integer ");
// int number1 = input.next int();
//
// System.out.print("Enter second integer ");
// int number2 = input.nextInt();
//
// int[]scores= new int[10];
//for(int scores = 0;scores <=10; scores++){
//
//
//
//
//}