Question: import java.util.*; public class Test { public static void main (String [ ] args) { Scanner sc=new Scanner(System.in); char choice='y'; while(choice!='n'&&choice!='N') { System.out.println(Enter number of
import java.util.*;
public class Test {
public static void main (String [ ] args) { Scanner sc=new Scanner(System.in); char choice='y'; while(choice!='n'&&choice!='N') { System.out.println("Enter number of dozen: "); int n=sc.nextInt(); System.out.println("The are "+(n*12)+" eggs"); System.out.println("Do you want to test another?(y/n): ");
choice=sc.next().charAt(0); } }
}
It keeps saying:
main.cpp:3:1: error: 'import' does not name a type 3 | import java.util.*; | ^~~~~~
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
