YHyuehen003
发表于 2021-6-25 15:25:24
朕想知道
古道月影
发表于 2021-6-26 11:13:03
0.81
1.10
2.a ,b ,c ;
3.a=14
b=3
c=9
4.x>=0? x=x:x=-x;
5.if (size > 12)
{
cost = cost * 1.05;
flag = 2;
}
bill = cost * flag;
if (ibex > 14)
{
sheds = 3;
}
else
{
sheds = 2;
}
help = 2 * sheds;
while(1)
{
scanf("%d", &score);
if (score < 0)
{
break;
}
count++;
}
printf("count = %d\n", count);
16beat
发表于 2021-6-27 03:54:10
{:10_281:}
Anonymous
发表于 2021-6-27 08:31:00
本帖最后由 匿名 于 2021-6-27 08:32 编辑
后面两题运行是死循环,一直不出来结果……{:10_266:}
丶磊子
发表于 2021-6-27 21:20:08
的机会
心瘾6
发表于 2021-6-28 14:33:59
1
YXiangbao
发表于 2021-6-28 18:06:25
0.100个
1.
2.a,b,c
3.14,5,8
4.
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;
}
LucasChen
发表于 2021-6-29 11:19:55
。。。。
bangec
发表于 2021-6-29 20:44:02
。。。。。。。。。。。。。。
七月何夕
发表于 2021-6-29 21:56:05
看看
XuPeng12345
发表于 2021-6-30 00:04:57
111
乌萨斯的凛冬
发表于 2021-6-30 15:24:45
i got it
17711704510
发表于 2021-6-30 21:59:24
1
沐羽尘
发表于 2021-7-1 01:43:05
10
0
a,b,c
14 5 9
z = x > -x ? x : -x
if (size > 12)
{
cost = cost * 1.05;
flag = 2;
break;
}
else
{
bill = cost * flag;
}
if (ibex > 14)
{
sheds = 3;
}
sheds = 2;
help = 2 * sheds;
while (scanf("%d", &score))
{
if (score < 0)
{
printf("count = %d\n", count);
break;
}
count++;
}
0.#include <stdio.h>
int main()
{
float a = 10000, b = 10000;
int count = 0;
while (a >= b)
{
count++;
a += 10000 * 0.1;
b *= 1.05;
}
printf("%d年后,黑夜的投资超过了小甲鱼!\n黑夜的投资额是%.2f\n小甲鱼的投资额是%.2f\n", count, b, a);
}
1.#include <stdio.h>
int main()
{
float money = 400;
int year = 0;
while (money > 0)
{
year++;
money -= 50;
money *= 1.08;
}
printf("%d年后,小甲鱼又变得一贫如洗!\n", year);
}
2.#include <stdio.h>
#include <math.h>
int main()
{
double i = 3.0;
double num = 1.0;
int count = 1;
int max =pow(10, 8);
while (fabs(i) <= max)
{
if (count%2)
{
num += (1.0/-i);
}
else
{
num += (1.0/i);
}
i += 2.0;
count++;
}
printf("%.8f", num * 4);
}
3.#include <stdio.h>
int main()
{
int m1 = 2, m2 = 0, m = 0;
int count1, count2, count;
int mon;
m1 = 2;
for (mon = 0; mon < 24; mon++)
{
count1 = m1;
count2 = m2;
count = m;
m2 += count1;
m += count2;
m1 += count;
m2 -= count2;
m1 -= count1;
}
printf("总共有%d只兔子\n", m1+m2+m);
}
破口袋
发表于 2021-7-1 09:48:12
查看参考答案
木辛白告
发表于 2021-7-1 13:41:43
1
番茄特ma的
发表于 2021-7-1 18:44:46
1
Tohkaa
发表于 2021-7-1 23:08:40
0.10
1.11
2.abc
3.a14,b5,c9
4.z=x>=0 ? x : -x;
5.A:if(size>12){a;}
b;
B:if(ibex>14){sheds=3;}
else{sheds=2;}
help=2*sheds;
C:while(scanf()){count++;}
破口袋
发表于 2021-7-2 10:46:17
#include<stdio.h>
int main()
{
int t1 = 1, t2 = 0, t3, i = 1;
for(i; i <= 24; i ++)
{
t3 = t1 + t2;
t2 = t1;
t1 = t3;
}
printf("两年后有%d只兔子",t2);
return 0;
}
阿凯加油
发表于 2021-7-2 15:22:08
我没做对生气了