辰笑笑 发表于 2021-1-25 22:29:34

0.10
1.我觉得 这个貌似不会跳到打印出来B
2.a,b,c
3.a=10 b=3 c=13

chenb 发表于 2021-1-25 23:38:36

已完成

居林 发表于 2021-1-26 13:23:29

1

情系小曈 发表于 2021-1-26 15:27:05

ANSWER

优雅永不过时 发表于 2021-1-26 21:28:57

c

随风缘 发表于 2021-1-27 14:45:47

害怕

huazhixuan 发表于 2021-1-27 14:52:29

查看答案

2233hhh 发表于 2021-1-27 15:34:32

回复

ghost321 发表于 2021-1-27 16:14:32

11

Haley_ 发表于 2021-1-27 17:11:43

加油

hhjdsd 发表于 2021-1-27 19:09:03

0.
10次

1.
0次

2.
a

3.
a = 9
b = 4
c = 5

4.

5.
A:

if (size > 15)
{
        cost = cost + 1.05;
        flag = 2;
}
else
{
        bill = cost * flag;
}

B:

if (ibex > 14)
{
        sheds = 3;
}
else
{
        sheds = 2;
        help = 2 * sheds;
}

C:

while (1)
{
        scanf("%d",&score);
        if (score < 0)
        {
                printf("count = %d\n",count);
                break;
        }
        else
        {
                count++;
                continue;
        }
}



0.

#include <stdio.h>

int main ()
{
        int year = 0;
        double ic = 10000.0,heiye = 10000.0,jiayu = 10000.0;
       
        do
        {
                year++;
                jiayu = jiayu + (ic * 0.1);
                heiye = heiye + (heiye * 0.05);
        }while (jiayu > heiye);
       
        printf("%d年后,黑夜的投资额超过小甲鱼!\n小甲鱼的投资额是:%.2f\n黑夜的投资额是:%.2f",year,jiayu,heiye);
       
        return 0;
}


1.

#include <stdio.h>

int main ()
{
        int year = 0;
        float money = 400.0;
       
        do
        {
                year++;
                money = (money - 50)*(1 + 0.08);
        }while (money > 0);
       
        printf("%d年之后,小甲鱼败光了所有的家产,再次回到了一贫如洗.....",year);
       
        return 0;
}


2.

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

int main()
{
        int count = 0;
        double result = 0.0,i,a = 1.0,b = 1.0;
       
        while (1)
        {
                i = a / b;
                if (fabs(i) >= pow(10,-8))
                {
                        if (!(count % 2))
                        {
                                result += i;
                       }
                        else
                        {
                                result -= i;
                        }
                        b += 2.0;
                }
                else
                {
                        if (!(count % 2))
                        {
                                result += i;
                       }
                        else
                        {
                                result -= i;
                        }
                        printf("%.7f",result *= 4.0);
                        break;
                }
                count++;
        }
       
        return 0;
}


3.

#include <stdio.h>

int main ()
{
        int parent = 1,children = 0,count = 0,time = 24;
        long result;
       
        while (time)
        {
                children += parent;
                if (count == 2)
                {
                        parent += children;
                        count = 0;
                }
                count++;
                time--;
        }
       
        result = (parent + children)*2;
        printf("%d",result);
       
        return 0;
}

帅气的火山 发表于 2021-1-28 12:53:32

看看

jtwo 发表于 2021-1-28 21:07:59

//

a13766971255 发表于 2021-1-29 14:26:06

1

悭臾 发表于 2021-1-29 20:12:56

朕想知道

adonis33 发表于 2021-1-29 20:42:07

1

就这还没认真呢 发表于 2021-1-29 20:59:41

666

小schnappi 发表于 2021-1-29 21:30:29

小甲鱼

八戒253 发表于 2021-1-29 22:12:33

我太菜了!

GGdeng 发表于 2021-1-30 00:55:06

1
页: 138 139 140 141 142 143 144 145 146 147 [148] 149 150 151 152 153 154 155 156 157
查看完整版本: S1E16:拾遗 | 课后测试题及答案