Can you help debug my Java program? Attached is a screenshot of my code. Here are my bugs: i cannot be resolved to a variable (line 27) i cannot be resolved to a variable (line 28) n cannot be...


Can you help debug my Java program?


Attached is a screenshot of my code. Here are my bugs:


i cannot be resolved to a variable (line 27)
i cannot be resolved to a variable (line 28)
n cannot be resolved to a variable (line 27)
Scan cannot be resolved (line 15, 19)
Syntax error, insert ; to complete statement (line 19)
Syntax error, insert “.class” (line 28)
The left hand side of an assignment must be a variable (line 27)
The method char(at)int is undefined (line 19)
This method requires a body (line 24)
Void methods cannot return a value (line 31)


1 package factorial;<br>2<br>3 import java.util.Scanner;<br>4<br>5 public class Factorial {<br>public static void main(String []args) {<br>Scanner scan = new Scanner(System.in);<br>9.<br>10<br>11<br>int i;<br>int n;<br>char answ =<br>'y';<br>while (answ =='y'||answ =='Y') {<br>System.out.print(

Extracted text: 1 package factorial; 2 3 import java.util.Scanner; 4 5 public class Factorial { public static void main(String []args) { Scanner scan = new Scanner(System.in); 9. 10 11 int i; int n; char answ = 'y'; while (answ =='y'||answ =='Y') { System.out.print("Enter in N: "); int ņ = Scan. nextInt(); 12 13 14 15 16 17 18 19 System.out. println("Do you want to continue? Y/N"); answ = Scan.next()charAt(0); 20 21 22 23 240 25 26 public static int factorial (int n); { int solu = 1; 27 28 29 30 for (int = 1; į<=n; i++);="" {="" solu="solu" *="" i;="" return="" solu;="" system.out.println("the="" answer="" is:="" +="" solu);="" 32="" 33="" 34="" }="" 35="" 36="" 37="" 38="" }="">

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here