WAP to swap to two numbers.
Answers
Answered by
1
Answer:
Hey,here is your answer...
But I'm writing only main program...
//to input no.
System.out.print( "Input two digit no." )
int n=Integer.parseInt(br.readline());
// to get first no.
int a =n%10
n=n/10;
// to get second no.
int b= n;
int c= b*10+a;
//to print
System.out.print(+c);
HOPE IT WILL HELP !
Similar questions
Math,
1 month ago
Computer Science,
1 month ago
Social Sciences,
1 month ago
Social Sciences,
3 months ago
English,
3 months ago
Geography,
9 months ago
Hindi,
9 months ago