import java.util.*;
class apswitch
{
public static void main (String arg[])
{
Scanner in = new Scanner (System.in);
int a;
System.out.print ("\n\t Enter the number = ");
a=in.nextInt();
switch (a)
{
case 1:
System.out.println ("\n\t One ");
break;
case 2:
System.out.println ("\n\t Two");
break;
case 3:
System.out.println ("\n\t Three");
break;
case 4:
System.out.println ("\n\t Four ");
break;
case 5:
System.out.println ("\n\t Five ");
break;
default:
System.out.println ("\n\t Out of range ");
}
}
class apswitch
{
public static void main (String arg[])
{
Scanner in = new Scanner (System.in);
int a;
System.out.print ("\n\t Enter the number = ");
a=in.nextInt();
switch (a)
{
case 1:
System.out.println ("\n\t One ");
break;
case 2:
System.out.println ("\n\t Two");
break;
case 3:
System.out.println ("\n\t Three");
break;
case 4:
System.out.println ("\n\t Four ");
break;
case 5:
System.out.println ("\n\t Five ");
break;
default:
System.out.println ("\n\t Out of range ");
}
}
No comments:
Post a Comment