ddzeng2020
发表于 2020-7-7 22:27:39
兔子那道题,递归方式怎么写?
淡淡草急
发表于 2020-7-8 14:15:38
感谢小甲鱼
小小假余
发表于 2020-7-8 16:45:39
真想知道
欢快的小白
发表于 2020-7-8 22:53:09
6666666
YHDTD
发表于 2020-7-9 15:39:23
0. 10
1. 0
2. a, b, c
3. a = 3, b = 3, c = 3
4. int main()
{
int x, z;
scanf("%d", &x);
if(x < 0)
{
z = -x;
}
else
{
z = x;
}
printf("%d", z);
}
5. A. if (size > 12)
{
cost = cost * 1.05;
flag = 2;
break;
}
bill = cost * flag;
B. if (ibex > 14)
{
sheds = 3;
break;
}
sheds = 2;
help = 2 * sheds;
C. while(score >= 0)
{
scanf("%d", &score);
count++;
}
printf("count = %d\n", count);
0. int main()
{
int y = 0;
float rate1 = 0.1, rate2 = 0.05, c1 = 10000, c2 = 10000, interest1, interest2;
interest1 = c1 * rate1;
do
{
c1 = c1 + interest1;
interest2 = c2 * rate2;
c2 += interest2;
y += 1;
}while(c1 > c2);
printf("After %d years\n", y);
printf("The investment of one is %.2f\n", c1);
printf("The investment of two is %.2f", c2);
return 0;
}
1. int main()
{
long m = 3500000, y;
float rate = 0.08;
for( y = 1; m >= 0; y++)
{
m = m + m * rate;
m = m - 500000;
}
printf("After %d years, my money will be run out.", y);
}
2. int main()
{
int j = 1;
double Pi, i;
for(Pi = 1, i = 3; pow(fabs(i), -1) > pow(10, -8); j++)
{
Pi = Pi - pow(i, -1);
i = fabs(i) + 2;
i = pow(-1, j) * i;
}
printf("%.7f", 4 * Pi);
}
3. int main()
{
long sum, i;
int m;
for(m = 1, sum = 2, i = 0; m <= 24; i += 2, m++)
{
sum += i;
}
printf("%ld", sum);
}
杉崎键
发表于 2020-7-9 17:15:45
赞美小甲鱼
monkey__
发表于 2020-7-10 09:47:31
看看答案= =
远雨流长
发表于 2020-7-11 07:22:45
谢谢大佬
WaysHub
发表于 2020-7-11 12:20:28
Make evveryday counts.
y1qcy
发表于 2020-7-11 14:45:56
1
对方正在输入.
发表于 2020-7-12 08:04:41
1
dingviola
发表于 2020-7-12 11:23:23
{:10_243:}
zc17616151315
发表于 2020-7-12 17:14:49
加油
赖贝尔
发表于 2020-7-12 20:05:10
1
Jzshidagege
发表于 2020-7-13 10:05:56
告诉朕
lvc
发表于 2020-7-13 11:39:52
1
图快之人
发表于 2020-7-14 14:21:45
{:5_107:}
154664
发表于 2020-7-14 16:48:18
又是遨游知识的一天
Canly
发表于 2020-7-14 18:16:42
先打卡~
盼望流星
发表于 2020-7-14 22:13:30
第二题不会