Computer Science, asked by simyy04, 10 months ago

write a program that inputs the class marks and the exam marks for a student and determines whether he has passed the course or not. the requirement is that a student must get at least 50% for the class marks and at least 40% for the exam msrks. the class marks counts upto one third and the exam marks upto two thirds of the final marks. the final marks must be at least 50% to pass the course​

Answers

Answered by rupamsaha2424
0

Answer:class Marks

{

public static void man(String args[])throws IOException

{

InputStreamReader in=new InputStreamReader(System.i);

BufferedReader br=new BufferedReader(in);

System.out.println("enter the final marks");

int n=Integer.parseInt(br.readLine());

System.out.println("enter class marks");

int a=Integer.parseInt(br.readLine());

System.out.println("enter exam marks");

int b=Integer.parseInt(br.readLine());

int c=(1*n)/3;

int d=(2*n)/3;

int e=(50*a)/100;

int f=(40*b)/100;

if(c<e || d<f)

{

System.out.println("failed");

}

else

{

System.out.println("passed");

}

}

}

Explanation:

Answered by priyaagari650
0

Explanation:

in following program we have taken one variables i.e mark. We will take input from the user and using if else condition we will calculate grade. in the following program in first condition we will print wrong entry if the marks is either less than 0 or greater than 100.

Similar questions