Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.kurs_java;
- import java.util.*;
- /**
- *
- * @author Jakub
- */
- public class zadanie21 {
- public static void main(String[] args){
- Scanner scan = new Scanner(System.in);
- System.out.println("Podaj swoją masę");
- float masa = scan.nextFloat();
- System.out.println("Podaj swój wzrost w metrach");
- float wzrost = scan.nextFloat();
- float a = wzrost*wzrost;
- double BMI = masa/a;
- System.out.println("Twoje BMI wynosi: " + BMI);
- }
- }
Add Comment
Please, Sign In to add comment