1 / 1100%
import java.util.Scanner;
public class Calculator {
public static void main(String[] args) {
//calc 1 thatcher values because i dont want to be super
abstract with this shit
Scanner scan = new Scanner(System.in);
double test1, test2, test3, masteryExam, hwQuizzes, finalExam,
finalScore, avgTestScore;
int run = 1;
while(!(run==0)) {
System.out.println("Please input the following scores you got
on each test in this format: (70.3% = 70.3)");
System.out.println("Test 1: ");
test1 = scan.nextDouble();
System.out.println("Test 2: ");
test2 = scan.nextDouble();
System.out.println("Test 3: ");
test3 = scan.nextDouble();
System.out.println("Mastery Exam: (value out of 50 here)
85=42.5 ");
masteryExam = scan.nextDouble();
System.out.println("Hw and Quizzes combined score: ");
hwQuizzes = scan.nextDouble();
System.out.println("Desired Final Grade: ");
finalScore = scan.nextDouble();
//test avg score
avgTestScore = (((test1+test2+test3+masteryExam)/350)*100);
avgTestScore = avgTestScore*.5;
hwQuizzes = hwQuizzes*.25;
finalExam = ((finalScore-(avgTestScore+hwQuizzes))/.25);
System.out.println("You need a "+finalExam+ "% on the final in
order to get your desired class score of "+finalScore+"%");
//System.out.printf(finalExam + "%.3f");
System.out.println("Would you like to quit? please enter an
integer that is not zero if you would like to keep going, otherwise enter 0");
run = scan.nextInt();
//finalScore = (finalExam-(.5*test))
}
}
}
Powered by TCPDF (www.tcpdf.org)
Students also viewed