Java

No description

fork
loading
Files
  • Main.java
Main.java
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
34
35
9.9");
        System.out.println ("Obese:       30 or greater");
  }import java.util.Scanner;
import java.lang.Math;

class Main{     
public static void main(String[] args){
  Scanner in = new Scanner(System.in);
  double a = 0;
  double b = 0;
  double c = 0;
   System.out.println("HYE...Guys!!!");
  System.out.println(" Nak tahu BMI sendiri tak?");
   System.out.println("*********************************************************");
  System.out.println("Berat");
    b = in.nextDouble();
    System.out.print("Tinggi(dlm meter)?");
    c = in.nextDouble();
    a = b/(Math.pow(c,2)); 
    System.out.println ("jangan lupa bundarkan yer..");
    System.out.print("BMI = ");
    System.out.println(a);
    System.out.println("*********************************************************");
     {
    System.out.println(" Jom tengok kita ideal ke tak?");
    
        System.out.println ("Underweight: less than 18.5");
        System.out.println ("Normal:      between 18.5 and 24.9");
        System.out.println ("Overweight:  between 25 and 2
  {
    System.out.println("OK BYE..!!THANK YOU..JOM EXERCISE!!!");
  }
  }
 }