Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. package Test;
  2.  
  3. import java.util.Scanner;
  4. public class Zadanieif {
  5. public static void main(String [] args){
  6. Scanner odczyt = new Scanner(System.in);
  7.  
  8. System.out.println("Podaj 1 liczbę");
  9. int a = odczyt.nextInt();
  10. System.out.println("Podaj 2 liczbę");
  11. int b = odczyt.nextInt();
  12.  
  13. if(a==b)
  14. System.out.println("Podane liczby są równe");
  15. else if(a > b)
  16. System.out.println("Pierwsza liczba jest większa");
  17. else(a < b)
  18. System.out.println("Pierwsza liczba jest mniejsza");
  19.  
  20. }
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement