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
Math,
1 month ago
Social Sciences,
1 month ago
World Languages,
1 month ago
Math,
3 months ago
Science,
3 months ago
Math,
9 months ago
English,
9 months ago
Math,
9 months ago