星期二, 9月 27, 2005

Homework3

作業三已完成public class homework3
{
public static void main(String[] args)
{
int running6mph=10;
int basketball=8;
int sleeping=1;
int MET= 0;
double weight=150/2.2;
System.out.println("Running 6 MPH =" + running6mph + " METS");
System.out.println("Basketball =" + basketball + " METS");
System.out.println("Sleeping =" + sleeping + " MET");
System.out.println("for a 150-pound person who run 6MPH for 30 minutes,plays basketball for 30 minutes0,and then sleeps 6 hours.");
running6mph *=30;
basketball *=30;
sleeping *=360;
MET=running6mph+basketball+sleeping;
System.out.println("total MET=" + MET + "METS");
System.out.println("Calories/Minute=" +0.0175*MET*weight);
System.out.println("that person's calories burned =" +0.0175*MET*weight);


}
}
程式結果

1 Comments:

Blogger Yao Jen said...

You can use "Hello" to place figures on your blog.
http://www.hello.com

6:37 上午  

張貼留言

<< Home