🔒 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

Online now

Members online
1,004
Guests online
1,176
Total visitors
2,180

Forum statistics

Threads
2,275,816
Posts
28,965,737
Members
1,231,946
Latest member
tripitropi
Back
Top