CuteDogAteMineFrog

zadanie21

Jan 25th, 2020
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package com.kurs_java;
  7. import java.util.*;
  8. /**
  9. *
  10. * @author Jakub
  11. */
  12. public class zadanie21 {
  13. public static void main(String[] args){
  14. Scanner scan = new Scanner(System.in);
  15. System.out.println("Podaj swoją masę");
  16. float masa = scan.nextFloat();
  17. System.out.println("Podaj swój wzrost w metrach");
  18. float wzrost = scan.nextFloat();
  19. float a = wzrost*wzrost;
  20. double BMI = masa/a;
  21. System.out.println("Twoje BMI wynosi: " + BMI);
  22. }
  23. }
Add Comment
Please, Sign In to add comment