「C言語」while文のサンプル
構文
while(条件式){some code}
サンプルコード
#include <stdio.h>
int main()
{
int i;
i=5;
while(i < 10){
printf("i = %d\n", i);
i++;
}
return 0;
}
結果
i = 5
i = 6
i = 7
i = 8
i = 9
Coding Changes the World
構文
while(条件式){some code}
サンプルコード
#include <stdio.h>
int main()
{
int i;
i=5;
while(i < 10){
printf("i = %d\n", i);
i++;
}
return 0;
}
結果
i = 5
i = 6
i = 7
i = 8
i = 9