#include <stdio.h>
int main() {
/* while문
int sum=0; //합계를 저장하는 변수
int i; //i 변수 선언
i = 1; //초기식
while(i<=10){ //조건식
sum = sum + i; //sum+=i;
i++; //증감식
}
printf("%d\n",sum);
*/
/* do~while문
int i=1;
do{
printf("%d ", i);
i++;
}while (i<=10);
*/
/*
int i,j;
for(i=0;i<3;i++){
printf("첫번째 반복문: %d\n", i);
for(j=0;j<3;j++){
printf(" 두번째 반복문: %d\n", j);
}
}
*/
/* 구구단
int i,j;
for(i=2;i<10;i++){
for(j=1;j<10;j++){
printf("%d x %d = %d\n", i, j, i*j);
}
printf("\n");
}
*/
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: