continue

Do not execute the statement below the loop, return to the execution loop

#include<stdio.h>
#include<stdlib.h>
int main(){
int i=1;
int total=0;
for(i=1;i<=100;i++){
if(1==i%2){
continue;
}
total+=i;
}


printf("%d\n",total);
system("pause");
return 0;
}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324683629&siteId=291194637