What's new

Closed Help po sa mga magaling sa programing

Status
Not open for further replies.
Madali lang yan.
Declare a variable for meter then yung formula. Multiplication lang tapos System.out.print blah lbah or i get mo lang yung value.
 
ito oh
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
double meters,inches,feet;
System.out.print("Enter your height in meters :>");
meters=sc.nextDouble();
inches=(meters * 39.37);
feet=inches/12;
inches=inches%12;
System.out.printf("You are %.0f feet and %.2f inches tall",feet,inches);
}
}
 
Status
Not open for further replies.

Similar threads

Back
Top