SOURCE FILE: EX0405.CPP


//   
// Example 4.5.  Program to read a number less than    
// 10 and determine if the number is 7   
//    
/*
    Also notice what the program does *after* the if-then-part.
    (It returns to a sequential execution mode.)
*/   

#include <iostream>
   
using namespace std ;

int main(void)   
{   
   int num;   
    
   cout << "Enter a positive integer under 10: ";
   cin  >> num;
   
   if (num == 7)    
      cout << "I knew you'd select 7!\n";
   
   cout << "Thank you for your cooperation.\n";

   return 0;
}