Write a program in java to enter a number and reverse it. now add the reversed number with the original number and print it.
Answers
Answered by
1
import Java. util. Scanner;
Class abc
{
public static void main(String args[]) ;
{
Scanner sc = new Scanner ( System. in) ;
int a, b;
a= sc. nextInt() ;
b= sc. nextInt() ;
a= a+b
b= a-b
a= a-b
System. out. println(''Sum= '' a+ b) ;
}
}
Class abc
{
public static void main(String args[]) ;
{
Scanner sc = new Scanner ( System. in) ;
int a, b;
a= sc. nextInt() ;
b= sc. nextInt() ;
a= a+b
b= a-b
a= a-b
System. out. println(''Sum= '' a+ b) ;
}
}
InikaBhattacharyya:
Did you check the program in java to see whether it is correct?
Similar questions