Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Function Prototyping
- #include<iostream>
- using namespace std;
- int sum(int num1, int num2);
- double sum(double num1, double num2);
- int main()
- {
- //var
- //code
- cout << "This should be an integer ----> "<< sum(1, 2) << endl;
- cout << "This should be a double number ----> " << sum(2.34, 3.56) << endl;
- return 0;
- }
- int sum(int num1, int num2)
- {
- int summ = num1 + num2;
- return summ;
- }
- double sum(double num1, double num2)
- {
- double summ = num1 + num2;
- return summ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement