#include.h>
int main()
{
float h = 100;
float s = 0;
for(int i = 0;i<10;i ++)
{
h= h/2;
s = s + 2*h;
}
s = s +100;
printf("%f,%f",s,h/2);
时间: 2024-10-15 15:18:24
#include.h>
int main()
{
float h = 100;
float s = 0;
for(int i = 0;i<10;i ++)
{
h= h/2;
s = s + 2*h;
}
s = s +100;
printf("%f,%f",s,h/2);