Advertisement
Felanpro

Code Calculator Function (Knowledge)

Nov 21st, 2015
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. //Simple function code calculator
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int addNumbers(int x, int y);
  6.  
  7. int main()
  8. {
  9.       cout << addNumbers(40, 60);
  10.       system("pause");
  11.     return 0;
  12.     }
  13.  
  14. int addNumbers(int x, int y)
  15. {
  16.     int answer = x + y;
  17.      return answer;
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement