Answer to Question #222270 in Java | JSP | JSF for Isha

Question #222270
Develop the internal mark calculation system based on the attendance percentage using java on given condition attendance percentage>=80and<90-4 marks attendance percentage>=75and<80-3 marks,attendance percentage<75-0 marks
1
Expert's answer
2021-08-02T07:13:20-0400
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);
		
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS