Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. package zadanie;
  2.  
  3. /**
  4. *
  5. * @author iker
  6. */
  7.  
  8. import java.util.Scanner;
  9. public class Zadanie {
  10.  
  11.  
  12. public static void main(String[] args) {
  13. Scanner scanner = new Scanner(System.in);
  14.  
  15.  
  16. System.out.println("Podaj pierwszą liczbę:");
  17. double pierwsza = scanner.nextDouble();
  18. System.out.println("Podaj drugą liczbę:");
  19. double druga = scanner.nextDouble();
  20. System.out.println("Podaj trzecia liczbę:");
  21. double trzecia = scanner.nextDouble();
  22.  
  23. if (pierwsza>druga){
  24. if (pierwsza>trzecia){System.out.println("Największa liczba jest:" + pierwsza);}
  25.  
  26. else if (druga>trzecia){
  27. } if (druga>pierwsza){System.out.println("Największa liczba jest:" + druga);
  28. }
  29. else if (trzecia>pierwsza) {
  30. if (trzecia>druga){System.out.println("Największa liczba jest:" + trzecia);
  31. }
  32.  
  33.  
  34.  
  35. }
  36. }
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement