import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
String student_name;
int d;
System.out.println("Enter the name of the student: ");
student_name=in.next();
System.out.println("Enter total number of according days present: ");
d=in.nextInt();
double at_perc=(100*d)/7.0;
int marks=0;
if (at_perc>=80 && at_perc<90){
marks=4;
}
else if(at_perc>=75 && at_perc<80){
marks=3;
}
else if(at_perc<75){
marks=0;
}
System.out.println("Name: "+student_name);
System.out.println("Number of days: "+d);
System.out.println("Marks: "+marks);
}
}
Comments
Leave a comment