- #1
AstroIreland
- 12
- 0
Hey guys, I am studying astrophys but i have a programming module, so hopefully this is the right place to ask.
I have a few questions that I am having difficulty with so I am going to pose it in the form of a program if that's cool? I can then take it apart to see how its done.
I'd appreciate it if someone has the time!
So, I need a program that can read in exam results that are in putted (the input is in-between 0 to 100) and it is an unknown number of exam results to be inputted.
The program is to look for a repeat number that has been typed in before.
So for example the numbers may be inputted for the next 4000 years until the same two come up.
So how would I go about the program (maybe using arrays?) that can keep accepting inputs to an unknown quantity. When the matching pair of results are found, I would then like all of the user inputted results to be summed and printed to screen.
Any ideas?
Thanks in advance!
I have a few questions that I am having difficulty with so I am going to pose it in the form of a program if that's cool? I can then take it apart to see how its done.
I'd appreciate it if someone has the time!
So, I need a program that can read in exam results that are in putted (the input is in-between 0 to 100) and it is an unknown number of exam results to be inputted.
The program is to look for a repeat number that has been typed in before.
So for example the numbers may be inputted for the next 4000 years until the same two come up.
So how would I go about the program (maybe using arrays?) that can keep accepting inputs to an unknown quantity. When the matching pair of results are found, I would then like all of the user inputted results to be summed and printed to screen.
Any ideas?
Thanks in advance!