write a code in javascript to accept numbers(1, 2,3,4,5) from user and display respective number names USING SWITCH CASE STATEMENT
Answers
Answered by
1
import java.util.*;
public class Number
{
public static void main( String args [])
{
Scanner in = new scanner (System.in);
int o, t, r, f, v;
System.out.println("enter the five numbers :");
o = in.nextInt();
t = in.nextInt();
r = in.nextInt();
f = in.nextInt();
v = in.nextInt();
System.out.println("One" +o);
System.out.println("Two" +t);
System.out.println("Three" +r);
System.out.println("Four" +f);
System.out.println("Five" +v);
}
}
Similar questions