求大神帮帮忙看一下,为什么我写的这个程序运行不出结果。#include#includevoid main(){int k=0,sum=0;do{if(k%2==1)continue;k++;sum+=k;}while(k<=10);printf("sum=%d\n",sum);system("pause");}
if(k % 2 == 1)continue;执行一遍后,k=1,if条件成立,执行continue,k的值不变,结果无限循环了。