Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help in Java!

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Kingdom
Grandmaster Cheater Supreme
Reputation: 0

Joined: 16 Jan 2007
Posts: 1638

PostPosted: Wed Apr 09, 2008 7:22 am    Post subject: Help in Java! Reply with quote

Who is good at programming in Java?
_________________
Back to top
View user's profile Send private message MSN Messenger
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Wed Apr 09, 2008 8:19 am    Post subject: Reply with quote

Please post the problem.
Back to top
View user's profile Send private message
newb09
Master Cheater
Reputation: 0

Joined: 02 Feb 2007
Posts: 350

PostPosted: Wed Apr 09, 2008 12:33 pm    Post subject: Reply with quote

lol i mean depends on what you wanna do as he said post problem
_________________
NOOBXOR = Comes from the root words noob and haxor, hence noobxor.
word created by: newb09 & ferenzo
Back to top
View user's profile Send private message AIM Address
Kingdom
Grandmaster Cheater Supreme
Reputation: 0

Joined: 16 Jan 2007
Posts: 1638

PostPosted: Wed Apr 09, 2008 12:46 pm    Post subject: Reply with quote

I need help with this assignment...
If someone can do it or just help out that would be nice...=)
+Rep for helping!

The Body Mass Index (BMI) is a calculation used by doctors to assess a person’s health. The BMI is calculated using the formula:
BMI = weight
height2
Create a program that prompts the user for a patient’s height (in meters) and weight (in kg’s) and calculates the BMI and displays the corresponding message:

BMI Category Message
> 25 Overweight
> 18.5 and <= 25.0 Normal weight
< 18.5 Underweight

Example:
Input Weight:69
Input Height: 1.73
Output: BMI is 23.05 - Normal weight

_________________
Back to top
View user's profile Send private message MSN Messenger
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Wed Apr 09, 2008 1:19 pm    Post subject: Reply with quote

Try this:
Code:
public static void main(String[] args)
   {
      Scanner in = new Scanner(System.in);
      double Weight,Height,BMI;
      System.out.println("Enter Weight:");
      Weight = in.nextDouble();
      System.out.println("Enter Height:");
      Height = in.nextDouble();
      BMI = Weight/(Height*Height);

      if (BMI>25)
         System.out.println("BMI is "+BMI+" - Overweight.");
      else
         if ((BMI<=25)&&(BMI>18.5))
            System.out.println("BMI is "+BMI+
                  " - Normal weight.");
         else
            if (BMI<=18.5)
               System.out.println("BMI is "+BMI
                     +" - Underweight.");
      
      
   }
Back to top
View user's profile Send private message
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Wed Apr 09, 2008 4:41 pm    Post subject: Reply with quote

Quote:
I need help with this assignment...
If someone can do it...

If you don't do the work, you'll never understand it or get better.
Back to top
View user's profile Send private message
Kingdom
Grandmaster Cheater Supreme
Reputation: 0

Joined: 16 Jan 2007
Posts: 1638

PostPosted: Thu Apr 10, 2008 6:41 am    Post subject: Reply with quote

What class is the scanner in?
_________________
Back to top
View user's profile Send private message MSN Messenger
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Thu Apr 10, 2008 8:57 am    Post subject: Reply with quote

I think java.util.Scanner.
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Thu Apr 10, 2008 11:47 am    Post subject: Reply with quote

Did you even try coding this yourself?
Back to top
View user's profile Send private message
Kingdom
Grandmaster Cheater Supreme
Reputation: 0

Joined: 16 Jan 2007
Posts: 1638

PostPosted: Thu Apr 10, 2008 6:56 pm    Post subject: Reply with quote

Yeah, I did.
Then it just got confusing and my head was hurting so I was like meh...

_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites