Advertisement
Da_Gamer

Function Example 3

Dec 17th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <stdlib.h>
  3.  
  4. using namespace std;
  5.  
  6. int addTwoNumbers(int a, int b)
  7. {
  8.     int result = a + b;
  9.     return result;
  10. }
  11.  
  12. int addThreeNumbers(int addTwoNumbers(int a, int b), int c)
  13. {
  14.     int result = addTwoNumbers(a, b) + c;
  15.     return result;
  16. }
  17.  
  18. int main ()
  19. {
  20.     cout << result;
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement