954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Need help for logic design for the following

for a program that tries to dtermine how many votes are in each congressional district. the program reads records that each contain a name., a Social Security number(nine digits, no non-numeric characters), and a district number from 1 to 7.the records should be read until the end of the file. Once all of the records ahve been counted, teh program should generate a report listing all 7 district numbers with their respective voter counts


sample output:

VOTER COUNT REPORT

District Voters
1 123890
2 198765
3 165483
.......
7 144912

END OF REPORT

ohnow
Newbie Poster
2 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
 

You forgot to ask a question.

Note that questions along the lines of "can you write..." are not the sort of questions which will draw a response you'd like.

You also didn't read this.
http://www.daniweb.com/forums/announcement14-2.html

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

Ive come up with this so far

Start
string name
string district
num voterCount
num SSN
??????
print HEADER (VOTER COUNTER REPORT)
print BODY (District Voters)


and then im lost, im more along the line of confused. I know i can do a method but i get confused on the method part, like what keeps up with how many numbers do i put, do i put 999-99-9999, cause thats the max, next to ssn and do i make an array or method ,or add a sub for district count and voter countYou forgot to ask a question.

Note that questions along the lines of "can you write..." are not the sort of questions which will draw a response you'd like.

You also didn't read this.
http://www.daniweb.com/forums/announcement14-2.html

ohnow
Newbie Poster
2 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You