|
無限ループ版
#include <stdio.h>
int main(int argc, char *argv[])
{
int tate,yoko;
while(tate<10){
tate=0;
yoko=0;
/*
while(yoko<=tate){
printf("%d",yoko);
yoko++;
}
*/
printf("%d\n", tate);
tate++;
}
return 0;
}
修正版
#include <stdio.h>
int main(int argc, char *argv[])
{
int tate,yoko;
tate=0;
while(tate<10){
yoko=0;
/*
while(yoko<=tate){
printf("%d",yoko);
yoko++;
}
*/
printf("%d\n", tate);
tate++;
}
return 0;
}
こうすれば分かりますか?
|