Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int max(int num1, int num2);
- int main () {
- int a = 100;
- int b = 200;
- int ret;
- ret = max(a, b);
- cout << "Max value is : " << ret << endl;
- return 0;
- }
- int max(int num1, int num2) {
- int result;
- if (num1 > num2)
- result = num1;
- else
- result = num2;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement