Computer Science, asked by renakumarisingh, 1 month ago

please write the cod e in java class 9​

Attachments:

Answers

Answered by anaytripathi27
1

Explanation:

import java. util. Scanner;

public class switchexample.{

public static void main(){

Scanner sc=new Scanner(System.in);

int num;

System.. out.println("enter value");

x=sc.nextInt;

switch.(x)

case 0:System.out.println("zero");

case 1: System.out.println("ONE") ;

case 2:System.out.println("Two") ;

case 3:System.out.println("Three");

case 4:System.out.println("four");

case 5:System.out.println("five");

case 6:System.out.println("six");

case 7:System.out.println("seven");

case 8 :System.out.println("eight");

case 9:System.out.println("nine");

case default:System.out.println("wrong input please give correct input");

}

}

Similar questions