Answers for "Write a java program to accept two numbers and check which is same or not"

0

Write a java program to accept two numbers and check which is same or not

import java.util.Scanner;public class Main {public static void main(String[] args) {int m, n;Scanner s = new Scanner(System.in);System.out.print("Enter the first number");m = s.nextInt();System.out.print("Enter the second number");n = s.nextInt();if(m == n){System.out.println(m+" and "+n+" are same");}else{System.out.println(m+" and "+n+" are not same");}}}
Posted by: Guest on July-04-2021

Code answers related to "Write a java program to accept two numbers and check which is same or not"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language