蜜柑面包 发表于 2021-10-9 21:52:23

生物入侵的经典案例

void_1928 发表于 2021-10-10 09:12:45

111

wj227987 发表于 2021-10-10 13:07:25

{:9_241:}

路边的小蚂蚁 发表于 2021-10-10 14:26:04

.

bushguo 发表于 2021-10-10 16:42:04

0.10
1.0
2.abc
3.a=14,b=5,c=9
4.z=x>=0?x:-x;
5.

宫宸 发表于 2021-10-10 23:44:12

好难

早安的马丁 发表于 2021-10-11 09:05:37

1

C++太极门小弟子 发表于 2021-10-11 21:18:52

{:10_275:}

北笙哟 发表于 2021-10-12 09:14:44

1

负数零 发表于 2021-10-12 09:21:39

{:10_277:}

lzyemmm 发表于 2021-10-12 18:28:41

{:9_230:}

2576509614 发表于 2021-10-12 19:22:50

666

渝早茄 发表于 2021-10-12 20:48:34

查看参考答案

GNUfan 发表于 2021-10-12 21:09:27

0.10
1.0
2.a,b,c
3.a=14,b=5,c=9
4.z=x<0?-x:x;
5.A.
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.
while(1)
{
        scanf("%d", &score);
        if (score < 0)
        {
                break;
        }
        count++;
}
printf("count = %d\n", count);


0.
#include <stdio.h>

void main()
{
        double fish=10000,fish1=0,darknight=10000;
        int year=0;
        while(1)
        {
                if(darknight>fish+fish1)
                {
                        break;
                }
                fish1+=fish*.1;
                darknight+=darknight*.05;
                year++;
        }
        fish+=fish1;
        printf("%d年后,黑夜的投资额超过小甲鱼!\n",year);
        printf("小甲鱼的投资额是:%.2lf\n",fish);
        printf("黑夜的投资额是:%.2lf\n",darknight);
        return;
}

1.
#include<stdio.h>

void main()
{
        float money;
        int year=0;
        for(money=4000000;money>0;year++)
        {
                money-=500000;
                money+=money*.08;
        }
        printf("%d年后,小甲鱼败光了所有的家产,再次回到一贫如洗……\n",year);
}

2.
#include<stdio.h>
#include<math.h>

void main()
{
        double pi=0,current,stop;
        int n;
        stop=pow(10,-8);
        for(n=0;;n++)
        {
                current=1/(double)(n*2+1);
                if(current<stop)
                {
                        break;
                }
                if(n%2)
                {
                        current=-current;
                }
                pi+=current;
        }
        printf("%.7lf\n",pi*4);
}

3.
#include<stdio.h>

void main()
{
        int time;
        long long int adult,teen=0,child=0;
        long long int adult1,teen1,child1;
        adult=2;
        for(time=0;time<24;time++)
        {
                child1=child+adult;
                teen1=child;
                adult1=teen;

                child=child1;
                teen=teen1;
                adult=adult1;
        }
        printf("total:%ld\n",adult+teen+child);
        return;
}

akariya 发表于 2021-10-13 09:08:07

1

汉臣荀彧 发表于 2021-10-13 09:14:19

123

慢慢陪我长大 发表于 2021-10-13 18:53:38

1

琉璃逐影 发表于 2021-10-13 21:59:21

小甲鱼

woshiamaola 发表于 2021-10-14 10:04:10

fish

275470683 发表于 2021-10-14 11:55:10

答案
页: 184 185 186 187 188 189 190 191 192 193 [194] 195 196 197 198 199 200 201 202 203
查看完整版本: S1E16:拾遗 | 课后测试题及答案