home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C by Discovery (4th Edition)
/
C_By_Discovery_4th_Edition.tar
/
C_By_Discovery_4th_Edition
/
_DISK_
/
ch2
/
exrcse1.c
< prev
next >
Wrap
C/C++ Source or Header
|
2005-06-16
|
689b
|
26 lines
/* exrcse1.c
*
* Synopsis - Prints out values for several
* expressions involving combinations
* of relational operators.
*
* Objective - To give practice with precedence
* of the relational expressions.
*/
/* Include Files */
#include <stdio.h>
int main( void )
{
int x = 4, y = 2;
printf( "3<x<y has value %d.\n", 3<x<y );
printf( "x<3<y has value %d.\n", x<3<y );
printf( "3<x<1 has value %d.\n", 3<x<1 );
printf( "3<x<2 has value %d.\n", 3<x<2 );
printf( "3<(x=y) has value %d.\n", 3<(x=y) );
printf( "y=x<4 has value %d.\n", y=x<4 );
return 0;
}