Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problems with math methods

 
Roxanne Billings
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just when I think I am starting to get this stuff . . . I get stuck again. (please help)

I am writing a program that has a user enter their first name, last name, year of birth. Then I am trying to output their age, create a random amount of years in the future, and calculate their future age.

I have most of the beginning working so far. . . but now I am stuck between creating the random array of int years (future years) and calculating that result with a primitive type int.

Here is the code I have so far . . .



Thank you in advance for any assistance you can provide me!

RB
 
Greg Brannon
Bartender
Posts: 563
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check for an answer on DIC.
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12098
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "create a random amount of years in the future"? this could mean you're trying to find one date some random amount of time in the future, or you could be trying to find a random number of years, all of which are in the future.

Being a good programmer means knowing, understanding, and being able to explain the problem clearly to everyone else. So, let's focus on one small part...what EXACTLY are you trying to create?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic