Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int add(int a, int b)
- {
- int result = a + b;
- return result;
- }
- int main()
- {
- int x = 5;
- int y = 10;
- int sum = add(x, y);
- std::cout << "The sum of " << x << " and " << y << " is " << sum << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment