Computer Science, asked by roshan2342, 1 year ago

Write a program to input two digit number( your program should display the message If the number is not having two digit number). Split both the digit of that number and print corresponding number of each digit using switch statement.​

Answers

Answered by vaishnnavipronita68
0

Answer:

I don't know mate sorry

Answered by acecloud
9

Explanation:

impo....

class....

{

public.....

{

Scanner sc=new Scanner(System.in);

int n= sc.nextInt();

int r, d1, d2;

if(n<10&&n>99)

{

System.out.println("not a 2 digit no.");

}

else

{

d1=n%10;

d2=n/10;

}

Soptln("1:one's digit 2: ten's digit);

ch=sc.nextInt();

switch(ch)

{

case 1:

System.out.println(d1);

break;

case 2:

System.out.println(d2);

break;

}

}

}

Similar questions