-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExercises1.java
More file actions
30 lines (26 loc) · 940 Bytes
/
Copy pathExercises1.java
File metadata and controls
30 lines (26 loc) · 940 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
package array;
import java.util.Scanner;
public class Exercises1 {
public static void main(String[] args) {
String id [] = new String[40];
String name [] = new String[40];
double score[] = new double[40];
int i,n;
Scanner objin = new Scanner(System.in);
System.out.print("Input Element of Array :");
n = objin.nextInt();
for(i=0;i<n;i++){
System.out.print("Input Id ["+i+"] :");
id[i] = objin.next();
System.out.print("Input Name ["+i+"] :");
name[i] = objin.next();
System.out.print("Input Score["+i+"] :");
score [i] = objin.nextDouble();
}
for(i=0;i<n;i++){
System.out.print("Input Id ["+i+"] :"+id[i]);
System.out.print("\tInput Name ["+i+"] :"+name[i]);
System.out.println("\tInput Score["+i+"] :"+score[i]);
}
}
}