Computer Science, asked by mehuleedas, 5 months ago

Write a program in Java:-
Input 2 numbers and check whether they are equal or not.​

Answers

Answered by samkalin
1

Java Program to Accept two Integers and Check if they are Equal

public class Equal_Integer.

int m, n;

Scanner s = new Scanner(System.

System. out. print("Enter the first number:");

m = s. nextInt();

System. out. print("Enter the second number:");

n = s. nextInt();

if(m == n)

There are three ways to reverse a number in Java.

1) Using while loop

2) Using for loop

3) Using recursion

4) Reverse the number without user interaction

1 Input your number and press enter:

145689

Reverse of input number is: 986541

2 Input your number and press enter:

56789111

Reverse of specified number is: 11198765

3 Input your number and press enter:

5678901

Reverse of the input number is:1098765

Similar questions