用C语言编程求:一球从100米高度自由落下,每次落地后反...
ncludestdio.h>
void main()
{
long a;int j,i=0,b[20];
scanf("%ld",&a);
while(a!=0)
{
b[i++]=a%10;
a=a/10;
}
for(j=i-1;j>=0;j--)
printf("%d ",b[j]);
printf("\n这是%d位数\n",i);
}
在繁忙的工作中请您接受我最真挚的祝福;愿我的祝福消除一天工作带来的疲劳;愿幸福和快乐伴随着您生活的每一天。
main()
{
float sn=100.0,hn=sn/2;
int n;
for(n=2;n<=10;n++)
{
sn=sn+2*hn;
hn=hn/2;
}
printf("the total of road is %f\n",sn);
printf("the tenth is %f meter\n",hn);
}