Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- System.out.println("Please enter your first number : ");
- double firstNum = scanner.nextDouble();//Get first num from user.
- System.out.println("Please enter your second number : ");
- double secondNumber = scanner.nextDouble();//Get second num from user.
- scanner.close();
- if (firstNum == secondNumber) {
- System.out.println("The two numbers are equals!");
- } else {
- System.out.println("The bigger number is : " + Math.max(firstNum, secondNumber) + " !");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement