1/18/00
COM1100 Winter2000 Yuhong Yin Northeastern University
19
if statement -- 3
nCondition is sometimes a mathematical expression
nint x  = 5;
n int y = 3;
n int sum = 14;
n int result; 
n if ( x - y  ) // equals to if ( (x-y) !=0 )
n result = sum / (x - y );
n else
n cout << “Error: Divided by zero ! \n”
n