时间与雪
发表于 2022-7-13 08:52:17
666
uzwhxmfg
发表于 2022-7-13 16:31:24
1
XiaoLiYv
发表于 2022-7-15 01:45:57
1
K-Bird
发表于 2022-7-15 18:54:17
0 0或10
1 0
2 a b c
3 14 5 9
4 z = ( x>0 ? x : -x)
5A
if (size > 12)
{
cost = cost * 1.05;
flag = 2;
}
bill = cost * flag;
B
if (ibex > 14)
{
sheds = 3;
}
else
{
sheds = 2;
}
help = 2 * sheds;
C
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
scanf("%d", &score);
0
#include <stdio.h>
int main()
{
float a=10000,b=10000,c=10000;
int year=0;
do
{
a = a + c * 0.1;
b = b * (1 + 0.05);
year++;
}
while(a>=b);
printf("%d年后,黑夜的投资额超过小甲鱼!\n", year);
printf("小甲鱼的投资额是:%.2f\n", a);
printf("黑夜的投资额是:%.2f\n", b);
return 0;
}
1
#include <stdio.h>
int main()
{
int year = 0;
long long a = 4000000;
do
{
a = (a - 500000) * 1.08 ;
year++;
}
while(!(a < 0));
printf("%d年以后,小甲鱼败光了所有的家产,再次回到一贫如洗……\n", year);
return 0;
}
2(算了7秒钟,并且是3.1415927,毕竟第8位是数字5)
#include <stdio.h>
#include <math.h>
int main()
{
double a = 1, pi = 1;
unsigned long long b = 1;
int m = 1;
do
{
b = b + 2;
a = pow(-1, m) / b;
pi = pi + a;
m = m + 1;
}
while(b < 100000000);
pi = pi * 4;
printf("pi = %.7f", pi);
return 0;
}
3(近亲繁殖会出问题的){:10_297:}
#include <stdio.h>
int main()
{
int a = 1, b = 0, c = 0, t, month = 1; //能生殖的,差1个月的,差2个月的,用来交换量的,月份
for( ; month <= 12; month++)
{
t = a;
a = a + b;
b = c;
c = t;
}
printf("两年后有%d只兔子\n", 2 * (a + b + c));
return 0;
}
总共258只
Cocopolo
发表于 2022-7-16 15:44:51
{:5_90:}
华思宣
发表于 2022-7-16 19:28:01
u
Orange_1019
发表于 2022-7-17 13:03:09
{:7_112:}
绅士之道
发表于 2022-7-17 21:44:14
666666666666666
4k1ng
发表于 2022-7-18 21:11:31
{:7_139:}
Petter123
发表于 2022-7-19 08:26:59
1
zxy138527
发表于 2022-7-19 15:43:30
参考答案
孙浩磊
发表于 2022-7-19 21:49:21
1
陈家沟帅帅帅
发表于 2022-7-20 15:17:51
dddd
1449620085
发表于 2022-7-20 19:50:26
{:10_281:}
苦力不怕苦力怕
发表于 2022-7-20 20:16:27
学习
细狗开
发表于 2022-7-21 14:04:43
1
18199673236
发表于 2022-7-21 21:32:46
JIAYOU
木子木子不死心
发表于 2022-7-22 04:10:30
{:10_277:}
黑板钉子户
发表于 2022-7-22 16:11:38
对答案{:10_266:}
玛莲妮亚的椅子
发表于 2022-7-23 16:00:56
麻了