Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int total, response, answer;
- int figure();
- int main() {
- std::cout << "Question 1 - 5 + 5" << endl;
- std::cin >> response;
- answer = 10;
- figure(int response, answer)
- std::cout << "Question 2 - 10 + 10" << endl;
- std::cin >> response;
- answer = 20;
- figure(int response, answer)
- std::cout << "Your score is: " << total;
- return 0;
- }
- void figure(int y, x) {
- if(y == x) {
- total = total + 1;
- }
- else {
- std::cout << "Wrong answer, next question";
- }
- }
Add Comment
Please, Sign In to add comment