IT newbie needs immeadiate help with pseudo code algorithm

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Thread Solved

Join Date: Oct 2009
Posts: 2
Reputation: acm09 is an unknown quantity at this point 
Solved Threads: 0
acm09's Avatar
acm09 acm09 is offline Offline
Newbie Poster

IT newbie needs immeadiate help with pseudo code algorithm

 
0
  #1
Oct 18th, 2009
Here's the problem:
"Daily life magazine wants an analysis of the demographic characteristics of its readers. The Marketing department has collected reader survey records containing the age, gender, marital status, and annual income of readers. Design an application that accepts reader data and produces a count of readers by age groups as follows: under 20, 20-29, 30-39, 40-49, 50 and older."

I know that the answer should include an array but i'm very confused as to how to search the array then organize the results by age groups. I if you can help, this assignment is due at midnight tonight so please hurry, thanks!
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1,568
Reputation: BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all 
Solved Threads: 196
BestJewSinceJC BestJewSinceJC is offline Offline
Posting Virtuoso
 
1
  #2
Oct 18th, 2009
Originally Posted by acm09 View Post
Design an application that accepts reader data and produces a count of readers by age groups as follows: under 20, 20-29, 30-39, 40-49, 50 and older."
Essentially these are your requirements and the rest of the paragraph didn't matter whatsoever. I don't really see how we can help without designing the algorithm for you, but as a hint, consider that you only need to do these things:

1. create an array of size 5, one for each of your age groups, anmd initialize each index of the array to 0.
2. read in data and based on what age group each piece of data fits into, add one to the appropriate array index.
Out.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 2
Reputation: acm09 is an unknown quantity at this point 
Solved Threads: 0
acm09's Avatar
acm09 acm09 is offline Offline
Newbie Poster
 
0
  #3
Oct 18th, 2009
that was very helpful, thanks
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC