Computer Science, asked by sitarapand, 3 months ago

int n=20
{
switch (ch)
{
case 1:++n;
System.out.print(n+ "and");
case 2: ++n
System.out.println(n+ "and");
case 3:++n
System.out.print(n+ "and") ;
break;
default. System.out.println("Wrong choice") ;
break;
}
System.out.print ("out of switch ")
}​

Answers

Answered by dbuntyz
1

Answer:

case 1 & 3 should have space in order to compile the code correctly

Similar questions