#include<stdio.h>
int main(void)
{ int i = 1;
int a,s=0;
printf("please enter a number:\n");
scanf("%d",&a);
while (i <= a)
{
if (i % 2 != 0)
s+=i;
i++;
}
printf("%d\n", s);
return 0;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)