Hello,
I have been struggling with this program.
I am somewhat new to c and suck at logic.
I have a personal program I want to make that I will try to get extra credit for in school.
I have a printed set of winning lottery numbers form the last 10 years.
I chose the easiest one do do logically which is just 5 numbers none repeating.
I am trying to find out how I can print the least common 10 sets.
I think if there are any set which have not been picked I would have to print all of those because logically they would all be equal, then print sequentially the sets least picked up to 10.
I have pseudocode which I am sure is wrong but will post it just to show that I am trying. My first attempt was to add the numbers but quickly realized that that wouldn't work
Any help would be greatly appreciated.
5 Nums Pseudocode
Code:
Read Nums
Parse Into Ints
Make Array [185] //39+38+37+36+35 The highest the numbers added together can go
//LOGIC
Loop
Take Set of nums
arrange them every order possible // 5 ways
Somehow hold this set of 5 // Maybe a multidimensional array
// where each spot in main array held an array with the 5 combinations
//The seccond deimsion af the array would have an extra spot
incremement the extra spot in array by one
End
Loop While Counter is less than 10
Counter = 0
Look at the 5th element in the 2nd dimension of each array element and find the lowest number
print number
increment number by 100 // So next time around this number wont get picked
Increment Counter
End