MasterGun

Min_max

Sep 13th, 2020
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void max_min(int *a, int *b)
  2. {
  3.     if (*a > *b)
  4.     {
  5.         cout << *a << "is more than " << *b << endl;
  6.     }
  7.     else if (*b > *a)
  8.     {
  9.         cout << *b << "is more than " << *a << endl;
  10.     }
  11.     else {
  12.         cout << "Man, this is the same numbers" << endl;
  13.     }
  14. }
  15. int main() {
  16.  
  17.     string name = "Name";
  18.     string& ptr = name;
  19.     int a = 0;
  20.     int* a = &a;
  21.     int b = 0;
  22.     int* b = &b;
  23.     cin >> a;
  24.     cin >> b;
  25.     max_min(&a, &b);
  26.     return 0;
  27. }
RAW Paste Data