A program that reads integers in the range of -25 to 25. The program should count how many times each value occurs. After all the integers have been processed, the program should print out a report showing each of the values and how many times it occurred.
How do you generate an array in C# that reads integers?
I dont know C#, but....
I would make an array where the index is the number you read in. (for neg make it up)
So if you read in a 6 *** 1 to the 6th index,
if you get another 6, add another 1 totaling 2.
When you are done, you can print out the values according to each index, which is the number itself.
floral centerpieces
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment