jiaheng
发表于 2021-8-21 00:21:44
0. 100
1. 0
a1163675107
发表于 2021-8-21 13:22:36
fxj2002
发表于 2021-8-21 14:28:43
答案
LenCoc
发表于 2021-8-21 15:32:13
1
wataame
发表于 2021-8-21 17:19:22
#include <stdio.h>
int main() {
float money_xjy = 10000;
float money_hy = 10000;
int year = 0;
while (money_xjy >= money_hy) {
year++;
money_xjy += 10000*0.1;
money_hy *= 1.05;
}
printf("%d年后,黑夜的投资额超过小甲鱼!\n\
小甲鱼的投资额是:%.2f 元\n\
黑夜的投资额是:%.2f 元\n\
", year, money_xjy, money_hy);
return 0;
}
#include <stdio.h>
#define PRICE 4000000
#define OVERHEAD 500000
int main() {
int year = 0;
double fortune = PRICE;
do {
fortune -= OVERHEAD;
year++;
fortune *= 1.08;
} while (fortune > 0);
printf("%d年后,小甲鱼败了家产,再次回到一贫如洗...\n", year);
return 0;
}
#include <stdio.h>
#include <math.h>
int main() {
int i = 0;
double num = 1;
double den = 1;
double pi = 0;
while (num/den > pow(10, -8)) {
pi += pow(-1, i)*(num/den);
i++;
den += 2;
}
pi = pi*4;
printf("Pi = %.7f\n", pi);
return 0;
}
#include <stdio.h>
int main() {
long a=1, b=1, c, i;
for (i=3; i<=24; i++) {
c = a+b;
a = b;
b = c;
}
printf("2年后,总共有%ld只兔子!\n");
return 0;
}
mylifeaspy
发表于 2021-8-22 09:49:27
{:9_241:}
栗子吃咸菜
发表于 2021-8-22 11:06:10
{:5_106:}
Hydrogen.
发表于 2021-8-22 15:56:06
1
Gusion223
发表于 2021-8-22 18:36:51
看看答案
小粑17
发表于 2021-8-23 19:48:09
c
AaronWeiy
发表于 2021-8-23 21:55:57
0
guta8241
发表于 2021-8-24 15:17:09
宸哥来学c
发表于 2021-8-24 15:53:10
回复
w646996136
发表于 2021-8-24 19:11:57
1
莫萧阳
发表于 2021-8-24 21:49:17
。
卢本萎
发表于 2021-8-25 14:53:05
1
龙文章
发表于 2021-8-25 15:41:08
喵喵喵
1623658271
发表于 2021-8-25 16:00:24
呜呜呜
GalaxyRIF
发表于 2021-8-25 23:26:11
。
地灵晨曦
发表于 2021-8-26 11:09:55
测试题:
0:100个
1:12个
2:a,b,c,都是l-value
3:a= 3 b=3 c=9
4. z=x>0?x:-x;
5. A.
if (size > 12)
{
cost = cost * 1.05;
flag = 2;
}
else
{
bill = cost * flag;
}
B.
if (ibex > 14)
{
sheds = 3;
}
else
{
sheds = 2;
help = 2 * sheds;
}
C.
while(score > 0)
{
scanf("%d", &score);
if (score < 0)
{
printf("count = %d\n", count);
break;
}
count++;
}