-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGrading_Students.java
More file actions
33 lines (31 loc) · 819 Bytes
/
Grading_Students.java
File metadata and controls
33 lines (31 loc) · 819 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
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int a[] = new int[n];
for(int i = 0; i < n; i++){
a[i] = in.nextInt();
// your code goes here
if(a[i]>37){
if(a[i]%5==3){
a[i]=a[i]+2;
System.out.println(a[i]);
}
else if(a[i]%5==4) {
a[i] = a[i]+1;
System.out.println(a[i]);
}
else {
System.out.println(a[i]);
}
}
else
System.out.println(a[i]);
}
}
}