025. 관계 연산자 이해하기(<, >, =, >=, <=, !=)025. 관계 연산자 이해하기(<, >, =, >=, <=, !=)

Posted at 2010. 11. 12. 03:03 | Posted in Computer/초보자를 위한 C 언어 300제
#include <stdio.h>

main()
{
	int x = 1;
	int y = 2;
	int z = 3;

	if( x == y ) printf( "x는 y와 같습니다. \n" );
	if( x != y ) printf( "x는 y와 같지 않습니다. \n" );
	if( x > y ) printf( "x는 y보다 큽니다. \n" );
	if( x < y ) printf( "x는 y보다 작습니다. \n" );
	if( y >= z ) printf( "y는 z보다 크거나 같습니다. \n" );
	if( y <= z ) printf( "y는 z보다 작거나 같습니다. \n" );
}
//