sofiiiaaapiust

Untitled

Mar 20th, 2023 (edited)
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int add(int a, int b)
  4. {
  5. int result = a + b;
  6. return result;
  7. }
  8.  
  9. int main()
  10. {
  11. int x = 5;
  12. int y = 10;
  13. int sum = add(x, y);
  14. std::cout << "The sum of " << x << " and " << y << " is " << sum << std::endl;
  15. return 0;
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment