Advertisement
jhnksr

MIN

Sep 28th, 2023
68
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,min;
  6.     cout << "Enter two numbers: ";
  7.     cin >> a >> b;
  8.     if (a<b)
  9.     {
  10.         min = a;
  11.     }
  12.     else
  13.     {
  14.         min = b;
  15.     }
  16.    
  17.     {
  18.         cout << "Minimum = " << min;
  19.     }
  20.     return 0;
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement