Ok so this is my code
import java.util.Scanner;
public class AllisonBrittanyCalculateGrades {
public static void main(String [] args) {
Scanner sc = new Scanner(System.in);
double sum = 0;
double lowest = 100;
double score;
double ast;
double grad;
for(grad = 1; grad <= 5; grad++) {
System.out.println("Enter asignment grades");
score = sc.nextDouble();
sum = sum + score;
if (score < lowest)
{
lowest = score;
}
}
sum = sum - lowest;
sum = sum/4;
System.out.println("Your assignment average is " + sum);
System.out.println("Enter first exam grade");
double grade1 = sc.nextDouble();
System.out.println("Enter second exam grade");
double grade2 = sc.nextDouble();
System.out.println("Enter lab grade");
double lab = sc.nextDouble();
System.out.println("Enter final exam grade");
double fe = sc.nextDouble();
double average = sum*.20 + grade1*.15 + grade2*.20 + lab*.20 + fe*.25;
System.out.println("The weighted average is " + average);
if (average <= 100 && average >= 90) {
System.out.println("You will receive an A");
}
if (average < 90 && average >= 80) {
System.out.println("You will receive an B");
}
if (average < 80 && average >= 70) {
System.out.println("You will receive an C");
}
if (average < 70 && average >= 60) {
System.out.println("You will receive an D");
}
if (average < 60) {
System.out.println("You will receive an F");
}
Scanner scanner = new Scanner(System.in);
System.out.println("Do you want to calculate for another student? Please type true or false");
String truefalse = scanner.nextLine();
}
}
the issue I'm having is I need to be able to have it say bye bye if the user types in false and have it start from the beggining if the user types in true. I have tried everything I can think of and I have to turn this program in by the end of the say. Please help!