星期三, 9月 28, 2005

Lab2


public class lab2
{
public static void main(String[] args)
{
double mouseWeight=4;
double mouseLossWeight=0.02;
double sweetener=20;
double mouseDrink=100;
double WomanWeight=60;
double mouseSodaLimit=sweetener*1000;
double WomanLimit=mouseSodaLimit*(WomanWeight/mouseWeight);
double loseWeight=mouseLossWeight*(WomanLimit/mouseDrink);
System.out.println("Now the mouse is "+mouseWeight+"kg.");
System.out.println("Then the mouse drinks "+mouseDrink+"cc soda will lose "+mouseLossWeight+"kg.");
System.out.println("The mouse eats "+sweetener+"g artificial sweetener will die,");
System.out.println("So if it drinks "+mouseSodaLimit+"cc soda will die.");
System.out.println("A Woman is "+WomanWeight+"kg.");
System.out.println("She can drink "+WomanLimit+"cc soda. ");
System.out.println("She also can lose "+loseWeight+"kg .");
System.out.println("And she will not died." );
}
}

1 Comments:

Blogger winni said...

跟我一樣弄些好笑的圖上去吧!ㄏㄏㄏ

9/30/2005 1:36 下午  

張貼留言

<< Home