035. 조건 순환문 이해하기 1(while~continue~break)035. 조건 순환문 이해하기 1(while~continue~break)
Posted at 2010. 11. 13. 23:30 | Posted in Computer/초보자를 위한 C 언어 300제
#include <stdio.h>
main()
{
int i = 1;
int hap = 0;
while( i <= 10 )
{
hap = hap + i;
i++;
}
printf( "hap = %d",hap );
}
'Computer > 초보자를 위한 C 언어 300제' 카테고리의 다른 글
| 037. 무조건 분기문 이해하기 (0) | 2010.11.13 |
|---|---|
| 036. 조건 순환문 이해하기 2(do~while~continue~break) (0) | 2010.11.13 |
| 034. 조건 선택문 이해하기(switch~case~default) (0) | 2010.11.13 |
| 033. 중첩 순환문 이해하기(for~continue~break) (0) | 2010.11.13 |
| 032. 중첩 조건문 이해하기(if~else) (0) | 2010.11.13 |
034. 조건 선택문 이해하기(switch~case~default)034. 조건 선택문 이해하기(switch~case~default)
Posted at 2010. 11. 13. 23:29 | Posted in Computer/초보자를 위한 C 언어 300제
#include <stdio.h>
main()
{
int i = 5;
switch( i )
{
case 1:
printf( "i는 1입니다." );
break;
case 2:
printf( "i는 2입니다." );
break;
default:
printf( "i는 %d입니다.",i );
break;
}
}
'Computer > 초보자를 위한 C 언어 300제' 카테고리의 다른 글
| 036. 조건 순환문 이해하기 2(do~while~continue~break) (0) | 2010.11.13 |
|---|---|
| 035. 조건 순환문 이해하기 1(while~continue~break) (0) | 2010.11.13 |
| 033. 중첩 순환문 이해하기(for~continue~break) (0) | 2010.11.13 |
| 032. 중첩 조건문 이해하기(if~else) (0) | 2010.11.13 |
| 031. sizeof 연산자 이해하기 (0) | 2010.11.13 |
033. 중첩 순환문 이해하기(for~continue~break)033. 중첩 순환문 이해하기(for~continue~break)
Posted at 2010. 11. 13. 23:27 | Posted in Computer/초보자를 위한 C 언어 300제
#include <stdio.h>
main()
{
int i;
int j;
for( i = 1; i <= 9; i++ )
{
for( j = 1; j <= 9; j++ )
{
printf( "%d * %d = %2d\n",i,j,i*j );
}
}
}
'Computer > 초보자를 위한 C 언어 300제' 카테고리의 다른 글
| 035. 조건 순환문 이해하기 1(while~continue~break) (0) | 2010.11.13 |
|---|---|
| 034. 조건 선택문 이해하기(switch~case~default) (0) | 2010.11.13 |
| 032. 중첩 조건문 이해하기(if~else) (0) | 2010.11.13 |
| 031. sizeof 연산자 이해하기 (0) | 2010.11.13 |
| 030. 캐스트 연산자 이해하기 (0) | 2010.11.12 |
