// A simple program to find the smallest of three numbers
// Version 1:  using simple if-then statements
 
#include <iostream.h>

int main (void) 
{  int i1, i2, i3;

   cout << "Program to determine the smallest of three integers" << endl;
   cout << "Enter three integer values:  ";
   cin >> i1 >> i2 >> i3;

   if ((i1 <= i2) && (i1 <= i3))
      cout << "The smallest value is " << i1 << endl;

   if ((i2 < i1) && (i2 <= i3))
      cout << "The smallest value is " << i2 << endl;

   if ((i3 < i1) && (i3 < i2))
      cout << "The smallest value is " << i3 << endl;

   return 0;
}
