• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stuck on declaring int variables  RSS feed

 
Dan Good
Ranch Hand
Posts: 49
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He guys, I was given a problem in which I am unsure how to go about solving, and would really appreciate the help as to how to attack it!

Here is is:

 
Scott Winterbourne
Ranch Hand
Posts: 116
2
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Dan.

I would attach this problem one step at a time. First, figure out how to declare an int variable. Then initialize the variables with a value. Then print those values to the console. This is similar to a "Hello World" app but you'll be outputting the values of the variables rather than a String.

Once you have this working, figure out how to get input from a user via command line and assign the input to the variables.

Keep attacking each part of the problem individually and build on what you had from the previous parts.

Is this for a class? There should be examples of how to do each part of this problem in the text book or lecture materials for the class if it is.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!