Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- // 24.04.2021
- public class Ex05c {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Scanner in = new Scanner(System.in);
- double a, b;
- System.out.println("Enter two numbers: ");
- a = in.nextDouble();
- b = in.nextDouble();
- if (a < b) {
- // true
- System.out.print(a);
- System.out.print(", ");
- System.out.println(b);
- } else {
- // false
- System.out.println(b + ", " + a);
- }
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement