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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!