I am looking to make a small program for a friend who likes to play roulette. I am looking to make a program that reads from a file which contains numbers (the numbers that come out in roulette) and then counts the amount of numbers that fall in certain groups.
For example, I am going to have 3 groups of numbers...(1,4,7,10,13,16,19,22,25,28,31,34) and (2,5,8,11,14,17,20,23,26,29,32,35) and (3,6,9,12,15,18,21,24,27,30,33,36)
Now let's say my file contains the following numbers:
Then I want to read through that file and print out how many of those numbers fall in which of the three groups above. So based off of this example, there would be 6 numbers in that first group of numbers above (1,5,4,2,8,1)....there would be 6 numbers in that second group above (22,24,21,19,24,23)....and there would be 3 numbers in that third group above (35,34,36).....
So I want the program to print out:
There are 6 numbers in the first group
There are 6 numbers in the second group
There are 3 numbers in the third group
Can anybody help me?? I know this is easy, but I am just getting my feet wet. By the way, this is not a homework assignment. It is simply for fun. We are going to the casino tomorrow night so I want to use this program to count up which numbers come out and keep some stats.