Write the flowchart of this code import java.io.*; import java.util.Scanner; public class StudentGrades { public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.println("Enter Quiz grade for 30:"); float quiz = sc.nextInt(); System.out.println("Enter Requirement grade for 20:"); float requirement = sc.nextInt(); System.out.println("Enter major exam grade for 50:"); float major = sc.nextInt(); float average = ((quiz + requirement + major)/100 ) * 100; System.out.println("The Average Grade: "+average); char grade; if(average>=80){ grade = 'A'; }else if(average>=60 && average<80){ grade = 'B'; } else if(average>=40 && average<60){ grade = 'C'; } else { grade = 'D'; } System.out.println("The Rating is: " + grade); } }
Write the flowchart of this code
import java.io.*;
import java.util.Scanner;
public class StudentGrades {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter Quiz grade for 30:");
float quiz = sc.nextInt();
System.out.println("Enter Requirement grade for 20:");
float requirement = sc.nextInt();
System.out.println("Enter major exam grade for 50:");
float major = sc.nextInt();
float average = ((quiz + requirement + major)/100 ) * 100;
System.out.println("The Average Grade: "+average);
char grade;
if(average>=80){
grade = 'A';
}else if(average>=60 && average<80){
grade = 'B';
}
else if(average>=40 && average<60){
grade = 'C';
}
else {
grade = 'D';
}
System.out.println("The Rating is: " + grade);
}
}
Step by step
Solved in 2 steps with 2 images