这样行吗?
#include <stdio.h>
int main()
{
int sum = 0;
int i = 1;
for(i=1;i<=100;i++)
{sum=sum+i;
i++;
sum=sum-i;
}printf("sum=%d\n",sum);
return 0;
}
#include <stdio.h>
int main()
{
int sum = 0;
int i = 1;
for(i=1;i<=100;i++)
{sum=sum+i;
i++;
sum=sum-i;
}printf("sum=%d\n",sum);
return 0;
}
2020-02-19
举报