Code:
int main(void)
{
// your code here
return 0;
}
I'm only joking a little bit. Seriously, you need to start this yourself. But before you start writing code, you have some preliminary work to do. Programming is much more about problem solving than it is writing code. There is no way you can program a computer to solve a problem if you yourself can't solve it.
- Understand the problem. What is being asked of you? What are the requirements? What do you need to complete this?
- Solve the problem with "paper and pencil". That is, imagine you had to be the purchase simulator yourself. What would you need to keep track of? Number of new and used games being purchased? Price for new/used games? How would you calculate that by hand?
- Write out some pseudo code. This will have the general flow of your final program, but you don't worry about little details. This should be more human-readable than computer-readable.
- Turn that pseudo code into real code. Work in small chunks, 5-10 lines at a time. Compile (with warning level set to maximum), fix all errors and warnings, then test to make sure it works correctly. Don't move onto the next 5-10 lines until all previous code is 100% working.
EDIT: If you get stuck at any of these points, then feel free to ask for more help here. But you need to ask more specific questions, not "can you do some of my homework for me". Perhaps "how do I best store the price of a used game? I was thinking an <your guess here> but am not sure."
Or maybe "I get this strange compiler error I don't understand, please explain my problem." That would of course be followed by the exact error message, with line number, copied and pasted from your terminal. And of course the code, properly formatted and indented, in [code][/code] tags.
Or "I'm getting the wrong answer for the following input". Of course, provide your code again, formatted and indented, in [code][/code] tags, and the exact input you provided, the incorrect output you get, and the correct output you should see.