Sim0o0na

Untitled

Jan 18th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. /**
  4. * Created by todor on 17.01.2017 г..
  5. *
  6. * Да се напише програма, която въвежда две цели числа и отпечатва по-голямото от двете.
  7. *
  8. */
  9. public class u04_GreaterNumber {
  10. public static void main(String[] args) {
  11.  
  12. Scanner scan = new Scanner(System.in);
  13.  
  14. int num1 = Integer.parseInt(scan.nextLine());
  15. int num2 = Integer.parseInt(scan.nextLine());
  16.  
  17. if (num1 > num2){
  18. System.out.println(num1);
  19. }
  20. else {
  21. System.out.println(num2);
  22. }
  23. }
  24. }
Add Comment
Please, Sign In to add comment