Guest User

Untitled

a guest
May 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int total, response, answer;
  4. int figure();
  5.  
  6. int main() {
  7.  
  8.    std::cout << "Question 1 - 5 + 5" << endl;
  9.    std::cin >> response;
  10.    answer = 10;
  11.    figure(int response, answer)
  12.  
  13.    std::cout << "Question 2 - 10 + 10" << endl;
  14.    std::cin >> response;
  15.    answer = 20;
  16.    figure(int response, answer)
  17.  
  18.    std::cout << "Your score is: " << total;
  19.  
  20.    return 0;
  21. }
  22.  
  23. void figure(int y, x) {
  24.    if(y == x) {
  25.       total = total + 1;
  26.    }
  27.  
  28.    else {
  29.    std::cout << "Wrong answer, next question";
  30.    }
  31. }
Add Comment
Please, Sign In to add comment