社区讨论
c语言题解
P1423小玉在游泳参与者 12已保存回复 11
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 11 条
- 当前快照
- 1 份
- 快照标识符
- @mi868dt7
- 此快照首次捕获于
- 2025/11/21 09:18 4 个月前
- 此快照最后确认于
- 2025/11/21 09:50 4 个月前
#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char argv[]) {
float length=0,step=2.0,sum=0;
scanf("%f",&length);
int act=0,i=1;
for(act=1;sum<length;act++)
{
step=2.0;
if(act>1)
{
for(i=1;i<act;i++)
{
step=step0.98;
}
}
sum=sum+step;
}
printf("%d",i);
return 0;
}
回复
共 11 条回复,欢迎继续交流。
正在加载回复...