请问dalao们我这个应该怎么修改
int main()
{
int sum = 0;
int i = 1;
while(i<=100)
{ do sum-=i;
while(i%2!=0);
do sum+=i;
while(i%2!=1);
i++;
}
printf("%d\n",sum);
return 0;
}
int main()
{
int sum = 0;
int i = 1;
while(i<=100)
{ do sum-=i;
while(i%2!=0);
do sum+=i;
while(i%2!=1);
i++;
}
printf("%d\n",sum);
return 0;
}
2020-12-08
举报