-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbmi
More file actions
33 lines (24 loc) · 806 Bytes
/
Copy pathbmi
File metadata and controls
33 lines (24 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import java.util.Scanner;
public class BMI {
public static void main(String[] args) {
Scanner hyrjet = new Scanner(System.in);
double pesha, gjatesia, BMI;
System.out.println("Pesha juaj ne kilogram: ");
pesha = hyrjet.nextDouble();
System.out.println("Gjatsia juaj ne meter: ");
gjatesia = hyrjet.nextDouble();
BMI = pesha/(gjatesia*gjatesia);
if(BMI<=18.5)
{
System.out.print("Pesha juaj eshte " + BMI + " dhe eshte nen normales");
}
else if((BMI>=18.5) && (BMI<=24.9))
{
System.out.print("Pesha juaj eshte "+ BMI + " dhe eshte normale");
}
else if (BMI>30)
{
System.out.print("Obesitet");
}
}
}