Computer/초보자를 위한 C 언어 300제
026. 논리 연산자 이해하기(||, &&, !)
Theo Kim
2010. 11. 12. 03:06
#include <stdio.h> main() { int x = 5; int y = 2; if( x > 0 && x < 10 ) { printf( "0 > x < 10 \n" ); } if( x < 0 || y == 2 ) { printf( "x가 0보다 작거나, y는 2입니다. \n" ); } if( !(x>y) ) { printf( "x가 y보다 크지 않습니다. \n" ); } }