KonradKonieczny

Ćwiczenia nr 1 - zadanie 3

Oct 18th, 2021 (edited)
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. package com.jetbrains;
  2. import java.util.Scanner;
  3.  
  4. public class Main
  5. {
  6.     public static void main(String[] args)
  7.     {
  8.         Scanner inp = new Scanner(System.in);
  9.  
  10.         System.out.print("Podaj 1 inta: ");
  11.         int a = inp.nextInt();
  12.  
  13.         System.out.print("Podaj 2 inta: ");
  14.         int b = inp.nextInt();
  15.  
  16.         System.out.print("Podaj 3 inta: ");
  17.         int c = inp.nextInt();
  18.  
  19.         if(a>b && a>c) System.out.println("Najwieksza to a: " + a);
  20.         else if(b>a && b>c) System.out.println("Najwieksza to b: " + b);
  21.         else System.out.println("Najwieksza to c: " + c);
  22.         inp.close();
  23.     }
  24. }
Add Comment
Please, Sign In to add comment