SHARE
TWEET

Untitled

a guest Jun 19th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int max(int num1, int num2);
  5.  
  6. int main () {
  7.    int a = 100;
  8.    int b = 200;
  9.    int ret;
  10.  
  11.    ret = max(a, b);
  12.    cout << "Max value is : " << ret << endl;
  13.  
  14.    return 0;
  15. }
  16.  
  17. int max(int num1, int num2) {
  18.    int result;
  19.  
  20.    if (num1 > num2)
  21.       result = num1;
  22.    else
  23.       result = num2;
  24.  
  25.    return result;
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top