Computer Science, asked by girlpower101, 5 months ago

I WILL MARK YOU BRAINLIEST IF YOU DO THIS

A teacher would like a program which works out the grade of a student when given their mark from a test. Read the steps below and then create a flowchart based on these steps.

1. The teacher would INPUT the students mark out of 100

2. If the mark is less than 40 the grade would be F

3. If the mark is 40 or above but less than 60 the grade would be a B

4. If the mark is 60 or above but less than 80 the grade would be a A

5. If the mark is 80 or above the grade would be an A*

6. The final grade would be OUTPUT to the screen.

( Please draw a diagram of the flowchart on paper )

No silly answers or replies otherwise I will report you!

Answers

Answered by siddharthasingh15
1

Answer:

import java.util.*

class grade

{

public static void main (String args[])

{

Scanner in=new Scanner(System.in);

System.out.println("Enter marks");

double m=in.nextDouble();

String gr="";

if(m<40)

gr="F";

else if(m>=40||m<60)

gr="B";

else if(m>=60||m<80)

gr="A";

else if(m>=80)

gr="A*";

System.out.println("Grade = "+gr);

}

}

Similar questions