大师求解答
#include
int main() { int sum = 0; int i = 1; int flag = 1; while(i<=100) { if(i%2==0) { i=-i; } else { i=i; } sum+=i; i++; } printf("sum=%d",sum); return 0; } 为何不行呢#include
int main() { int sum = 0; int i = 1; int flag = 1; while(i<=100) { if(i%2==0) { i=-i; } else { i=i; } sum+=i; i++; } printf("sum=%d",sum); return 0; } 为何不行呢2016-03-24
举报