Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int sum (int x, int y){
- int z;
- z = x + y;
- return (z);
- }
- int main()
- {
- int a, b, result;
- cout << "enter two numbers: " << endl;
- cin >> a;
- cin.ignore();
- cin >> b;
- cin.ignore();
- result = sum(a,b);
- cout << "the result of " << a << " + " << b << " is " << result;
- cin.ignore();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement