9.27.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." );
}
}

0 Comments:

Post a Comment

<< Home