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

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

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

   if (i1 <= i2)
        smaller = i1;
   else smaller = i2;

   if (smaller <= i3)
        smallest = smaller;
   else smallest = i3;

   cout << "The smallest value is " << smallest << endl;

   return 0;
}
