csansoon

P1.04 X59678 Minimum of three different integers

Sep 19th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main () {
  5.     int a,b,c;
  6.     cin >> a >> b >> c;
  7.     if (a<b) {
  8.         if (a<c) {
  9.             cout << a << endl;
  10.         }
  11.         else {
  12.             cout << c << endl;
  13.         }
  14.     }
  15.     else {
  16.         if (b<c) {
  17.             cout << b << endl;
  18.         }
  19.         else {
  20.             cout << c << endl;
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment