//for
#include<stdio.h>
int main()
{
int i=0;
for(i=1;i<=10;i++)
{
if(i==5)
continue;
printf("%d ",i);
}
return 0;
}
//结果为1 2 3 4 6 7 8 9 10
//while
#include<stdio.h>
int main()
{
int i=0;
while(i<=10)
{
if(i==5)
continue;
printf("%d ",i);
i++;
}
return 0;
}
//结果为1 2 3 4 -
标签:语句,10,return,int,while,continue,main From: https://blog.51cto.com/u_16329012/8133900