Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package zadanie;
- /**
- *
- * @author iker
- */
- import java.util.Scanner;
- public class Zadanie {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- System.out.println("Podaj pierwszą liczbę:");
- double pierwsza = scanner.nextDouble();
- System.out.println("Podaj drugą liczbę:");
- double druga = scanner.nextDouble();
- System.out.println("Podaj trzecia liczbę:");
- double trzecia = scanner.nextDouble();
- if (pierwsza>druga){
- if (pierwsza>trzecia){System.out.println("Największa liczba jest:" + pierwsza);}
- else if (druga>trzecia){
- } if (druga>pierwsza){System.out.println("Największa liczba jest:" + druga);
- }
- else if (trzecia>pierwsza) {
- if (trzecia>druga){System.out.println("Największa liczba jest:" + trzecia);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement