Tuesday, November 8, 2011
Help with my code using a switch statement?
here is my code. Here is a quick review of what i need to do: open a file of a list of numbers and get the first number and tally it for that number. Ex. number is 4563 it tallys 1 for number 4. And 2983 it tallys 1 for number 2. and loops through whole list and tallys numbers 1 - 9 and records them in the output. This outputs what i say but it outputs 0's for 1-9 instead of how many times it found a number that started with 1 and etc through 9. What it is doing is it outputs 0's for the 1 - 9 instead of what it was supposed to loop and find how many times 1-9 is used. Is it something with my num11 being set. If so could someone help me out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment