#include<stdio.h>
int main() {
float h=100;
int i = 1;
float sum = 100;
while (i <= 10) {
h = h / 2;
sum += 2*h;
i++;
}
printf("%f\n", sum);
printf("%f", h);
return 0;
}
C语言经典100例(20)小球落地
最新推荐文章于 2024-11-08 23:39:16 发布