Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- To do list if you don't know where to start:
- 1. Main menu that print selection for arithemetic operations [+ - or *] (for assignment specification: description I)
- 2. get user input for the option (use scanf())
- 3. second menu that select difficulty levels [beginner, intermediate, advanced] (for description II)
- 4. get user input for the option (use scanf())
- 5. have num1 = rand() % [number you want] (see line 135 for example)
- 6. have answer = num1 + num2 [or num1 - num2] (see line 139 for example, but if you just started, do + first then only do if else after step 8)
- 7. get user input and compare answer (see line 155 to 173)
- 8. do a for/while/do-while loop to give 10 questions (codes you coded in 5 to 7 should be inside the loop, or make it as a function, then call it like i did in line 59 to 62)
- 8.5. use if else or switch case to be able to get correct answer and print correct question if user choose - or *, line 139 to 152)
- 9. use if else or switch case to modify ranges [eg: beginner give number between 0-10, intermediate between 0-100] (see line 121 to 131)
- 10.use while/do-while loop to let the user able to get back to menu from in game if they select return to menu (line 51, 107, 108, 110 and 112)
- 11.use while/do-while loop to let the user able to get back to menu from level selection if they select return to menu (line 37 and 112)
- 12.finish things up, make your codes clear and readable, and make sure the format is right
- eg: dont do this
- if(A){
- if(B){
- dosomething();
- }
- else if(C){
- donothing();
- }
- }
- or this
- if(A){
- if(B){
- dosomething();
- }
- else if(C){
- donothing();
- }
- }
- do this
- if(A){
- if(B){
- dosomething();
- }
- else if(C){
- donothing();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment