Advertisement
jhnksr

MAX

Sep 28th, 2023
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | Source Code | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int a,b,max;
  6.     cout << "Enter two numbers: ";
  7.     cin >> a >> b;
  8.     if (a>b)
  9.     {
  10.         max = a;
  11.     }
  12.     else
  13.     {
  14.         max = b;
  15.     }
  16.    
  17.     {
  18.         cout << "Maximum = " << max;
  19.     }
  20.     return 0;
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement