Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Úloha 3
- public static void main(String[] args) {
- Scanner num = new Scanner(System.in);
- System.out.println("Program na výpočet aritmetického priemeru 3 čísel");
- //Scanner
- System.out.println("Zadaj 3 čísla");
- double a = num.nextDouble();
- double b = num.nextDouble();
- double c = num.nextDouble();
- //Výpočet
- double p = ( a + b + c ) / 3;
- System.out.println("Aritmetický priemer čísel ktorý si zadal je" + " " + p);
- num.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement