【十二题解 】| #求小球落地5次后所经历的路程和第5次反弹的高度#
求小球落地5次后所经历的路程和第5次反弹的高度
http://www.nowcoder.com/practice/2f6f9339d151410583459847ecc98446
#include<stdio.h>
int main(){
int height;
scanf("%d", &height);
float all= 0.0;
all+=height;
all+=height;
all+=height/2.0;
all+=height/4.0;
all+=height/8.0;
float h = 0.0;
h=height/32.0;
printf("%.6f\n%.6f", all, h);
}