c语言中多重循环
#include <stdio.h>
int main(void)
{
int label;
do
{
int i;
do
{
puts("please input an integer.");
printf("i = "); scanf("%d", &i);
if (i <= 0)
printf("\a please input an + integer.");
} while (i <= 0);
int j;
for (j = 1; j <= i; j ++ )
{
printf("%d\n", j);
}
puts("please input label 0 to continue or other to continue.");
printf("label = "); scanf("%d", &label);
} while (label == 0);
return 0;
}