005. 조건문 개념 배우기(if~else)005. 조건문 개념 배우기(if~else)

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

main()
{
	int x;
	int y;

	x = 20;
	y = 10;

	if( x > y )
	{
		printf("x의 값이 y보다 큽니다.");
	}
	else
	{
		printf("x의 값이 y보다 작거나 같습니다.");
	}
}
//

004. 연산자 개념 배우기004. 연산자 개념 배우기

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

main()
{
	int x;
	int y;

	x = 10;

	y = x - 5;

	if( x > y )
	{
		printf("x의 값이 y보다 큽니다.");
	}
	else
	{
		printf("x의 값이 y보다 작거나 같습니다.");
	}
}
//

003. 상수형 개념 배우기003. 상수형 개념 배우기

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

#define X 1
#define PI 3.141592

main()
{
	double z;

	z = X + PI;

	printf("%f",z);
}
//