Menu

One Error Says Left Hand Side Assignment Must Variable Dont Know Fix Q43830635

Ionly have one error and it says the left hand side of an assignmentmust be a variable and i dont know how to fix it

dow Help D lab 3 grades.java output Final Result.txt Scanner inputfile= new Scanner(myfile); // Creating a file for the outpudow Help D lab 3 grades.java output Final Result.txt Scanner inputfile= new Scanner(myfile); // Creating a file for the output PrintStream output = new PrintStream(“Final Result.txt”); while(inputfile.hasNext()) { ID = input file.nextInt(); correct = input file.nextInt(); Wrong = input file.nextInt(); Total = correct + Wrong; // Find the total correct answer and display them Total = correct + Wrong; // Check if the student answered more then 50 questions (Total > 50) output.println(“ID” + ID); output.printf(“%d right %d wrong”, correct, Wrong); output.println(); output.println(“Total Answered” + Total); if(Total > 50) { output.println(“Error: more than 50 Questions Answered”); else { int omit = total_questions – Total; output.println(“number omitted is” + omit); grades = correct * 2; if(grades > final_grades) { final grades = grades; best_ID = ID; output.println(“grade is” + grades); if(Total ==0) { output.println(“Error: No questions were answered “); d. Problems Javadoc Declaration Console 1 <terminated grades (lava Application CAProgram FilesJavaljdk-13.0.1binjavaw.exe (Jan 10, 2020, 9:43:10 AM) Exception in thread “main” java.lang.Error: Unresolved compilation problems The left-hand side of an assignment must be a variable Syntax error, insert “AssignmentOperator Expression to complete Expression at lab2.grades.main(grades.java:41) Show transcribed image text dow Help D lab 3 grades.java output Final Result.txt Scanner inputfile= new Scanner(myfile); // Creating a file for the output PrintStream output = new PrintStream(“Final Result.txt”); while(inputfile.hasNext()) { ID = input file.nextInt(); correct = input file.nextInt(); Wrong = input file.nextInt(); Total = correct + Wrong; // Find the total correct answer and display them Total = correct + Wrong; // Check if the student answered more then 50 questions (Total > 50) output.println(“ID” + ID); output.printf(“%d right %d wrong”, correct, Wrong); output.println(); output.println(“Total Answered” + Total); if(Total > 50) { output.println(“Error: more than 50 Questions Answered”); else { int omit = total_questions – Total; output.println(“number omitted is” + omit); grades = correct * 2; if(grades > final_grades) { final grades = grades; best_ID = ID; output.println(“grade is” + grades); if(Total ==0) { output.println(“Error: No questions were answered “); d. Problems Javadoc Declaration Console 1

Expert Answer


Answer to I only have one error and it says the left hand side of an assignment must be a variable and i dont know how to fix it …

OR