#include <stdio.h>
int main() {
int sum = 0,num = 1;
while (num <= 10){
sum += num;
num++;
}
printf("1 부터 10까지의 합 = %d \n", sum);
printf("while문이 끝난 후의 num의 값 = %d \n", num);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: