省略手动输入测试是对的
#include<stdio.h>
int main()
{
int sum=0,i,s[100];
for(i=0; i<50; i++)
s[i] = i+1;
//scanf("%d",&s[i]);
for(i=49; i>-1; i--)
{
printf("%d ",s[i]);
if(i%2!=0)
sum=sum+i;
}
printf("\n%d",sum);
return 0;
}