Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int funkyshun(int thisNum1, int thisNum2, int thisNum3); // The function prototype goes here
- class holo_room
- {
- public:
- int test;
- private:
- int sum;
- };
- int main()
- {
- int num1, num2, num3, num4;
- cout << "Please enter three numbers" << endl;
- cin >> num1;
- cin >> num2;
- cin >> num3;
- num4 = funkyshun(num1, num2, num3); // Here we invoke the function
- cout << "The sum is " << num4 << endl << endl;
- return 0;
- }
- int funkyshun(int thisNum1, int thisNum2, int thisNum3) // And here is the function definition
- {
- sum = thisNum1 + thisNum2 + thisNum3;
- return sum;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement