🔒 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.

About this Thread

  • 22
    Replies
  • 1K
    Views
  • 13
    Participants
Last reply from:
SecretProfile

Trending Topics

Online now

Members online
1,145
Guests online
4,564
Total visitors
5,709

Forum statistics

Threads
2,311,972
Posts
29,165,406
Members
1,185,996
Latest member
sholy
Back
Top