Advertisement
Felanpro

Using multiple parameters in c++ functions

Nov 3rd, 2015
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. /*Using multiple parameters in a function :)*/
  2.  
  3. int addNumbers(int x, int y)
  4. {
  5.     int answer = x + y; //Declaring integer answer :)
  6.     return answer; //It will of course return the answer
  7. }
  8.  
  9. int main()
  10. {
  11.     cout << addNumbers(43, 86);
  12.     system("pause");
  13.     return 0;    
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement