-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathseriesofstudent2.java
87 lines (76 loc) · 2.99 KB
/
seriesofstudent2.java
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import java.util.Scanner;
public class seriesofstudent2 {
static Scanner s = new Scanner(System.in);
public static void main(String[] args) {
int x = 1, y = 100;
int series;
String studname;
String studno;
String course;
do {
System.out.println("Enter a series of number of Student: ");
series = s.nextInt();
for (int i = 1; i <= series; i++) {
System.out.println("");
System.out.println("Enter Student Name: ");
studname = s.next();
s.nextLine();
System.out.println("Enter Student Number: ");
studno = s.next();
System.out.println("Enter Student Course: ");
course = s.next();
int rmrk;
System.out.println("Enter Transmuted Grade in Midterm: ");
rmrk = s.nextInt();
System.out.println("");
System.out.println("Student Name: "+ studname);
System.out.println("Student Number: "+ studno);
System.out.println("Course: "+ course);
System.out.print("Remarks: ");
if (rmrk <= 49 || rmrk >= 101) {
System.out.print("Out of Scale! Please Try Again!");
System.exit(0);
}
if (rmrk >= 75) {
System.out.println("PASSED");
} else {
System.out.println("FAILED");
}
System.out.print("Equvalent Rating: ");
if (rmrk >= 100 || rmrk >= 96) {
System.out.print("1.00");
} else if (rmrk >= 95 || rmrk >= 93) {
System.out.print("1.25");
} else if (rmrk >= 92 || rmrk >= 90) {
System.out.print("1.50");
} else if (rmrk >= 89 || rmrk >= 87) {
System.out.print("1.75");
} else if (rmrk >= 86 || rmrk >= 84) {
System.out.print("2.00");
} else if (rmrk >= 83 || rmrk >= 81) {
System.out.print("2.25");
} else if (rmrk >= 80 || rmrk >= 78) {
System.out.print("2.50");
} else if (rmrk >= 77 || rmrk >= 76) {
System.out.print("2.75");
} else if (rmrk == 75) {
System.out.print("3.00");
} else if (rmrk < 74.55) {
System.out.print("5.00");
} else {
System.out.println("Out of Scale! Please Try Again!");
}
System.out.println("");
}
System.out.println("Do you want to restart again? Press[1] if Yes & [2] if No.");
int choice = s.nextInt();
s.nextLine();
if (choice == 1) {
y = 10;
} else if (choice == 2) {
System.exit(0);
}
}while (x < y);
System.out.println("");
}
}