lpo9640 发表于 2021-8-10 22:21:53

hhh

Yzi 发表于 2021-8-10 23:51:23

1

kongyunfei 发表于 2021-8-11 11:17:57

1

是我的帧 发表于 2021-8-11 11:35:24

1

cailia 发表于 2021-8-11 11:56:59

{:10_277:}

amy_tes 发表于 2021-8-11 14:41:17

查看

zuocheng4 发表于 2021-8-11 15:35:17

1

.Cx330. 发表于 2021-8-12 17:32:02

查看参考答案

zf2402435 发表于 2021-8-12 17:47:01

16

satisfaction 发表于 2021-8-12 17:47:03

0
100

1
11

2
c = 5;
b = c;
a = b;

3
a=10
b=5
c=5

4
x?x >= 0:x<0;

5
A
#include<stdio.h>

int main()
{
        int size,flag;
        float cost,bill;
       
        scanf("%d",&size);
        scanf("%f",&cost);
        if (size > 12)
        {
            cost = cost * 1.05;
            flag = 2;
        }       
        bill = cost * flag;
        printf("%d %.2f %d %.2f\n",size,cost,flag,bill);
       
        return 0;
}
B
#include<stdio.h>

int main()
{
        int ibex,sheds,help;
       
        scanf("%d",&ibex);
        if (ibex > 14)
        {
            sheds = 3;
        }
        else
        {
                sheds = 2;
        }
        help = 2 * sheds;
        printf("%d %d %d \n",ibex,sheds,help);
       
        return 0;
}
C
#include<stdio.h>

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


0
...

netbea 发表于 2021-8-13 10:14:36

好难

memissme 发表于 2021-8-13 12:29:04

{
        int yearN = 1, turNm = 10000, nightNm = 10000;
        int i, j;
        while (nightNm <= turNm)
        {
                turNm = 10000 * (1 + yearN * 0.1);
                nightNm = 10000 * pow(1.05, yearN);
                yearN++;
        }

        printf("经过%d年后\n甲鱼总资产为:%d\n黑夜超过甲鱼,总资产为:%d\n", yearN - 1, turNm, nightNm);


        return 0;
}{
/*中了双色球一等奖,扣除税收后还剩下 400 万人民币。假设小甲鱼把这些钱做固定投资,每年可以获得 8% 的红利,但在每年的第一天,小甲鱼都会取出 50 万作为本年度的开销……
计算需要多久小甲鱼才会败光所有家产,再次回到一贫如洗?
*/
        int wholeM = 400, yearN = 0;
        do
        {
                wholeM = wholeM - 50;
                wholeM = wholeM * 1.08;
                yearN++;
        } while (wholeM > 0);

        printf("经过%d年后\n甲鱼总资产败光!", yearN);
        return 0;
}

不抛弃,不放弃 发表于 2021-8-13 19:37:30

0:10个
1:10个
2:a=b;b=c;c=5
3:3,9,14
4:z = fabs(x)
5

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

int main()
{
        int year = 1, amount = 10000;
        float xiaojiayu = 0, heiye = 0;
       
        while (xiaojiayu >= heiye)
        {
                xiaojiayu = amount * 0.1 * year + amount;
                heiye = amount * pow((1 + 0.05),year);
                if (xiaojiayu >= heiye)
                {
                        year++;
                }
                else
                {
                        printf("%d年后,黑夜的投资数额超过小甲鱼!\n"
                        "小甲鱼的投资额是:%.2f元\n"
                        "黑夜的投资额是:%.2f元\n",year,xiaojiayu,heiye);
                }
        }
       
        return 0;
}

1:#include <stdio.h>

int main()
{
        int year = 0, amount = 4000000,x = 1;
       
        while(x = 1)
        {
                if (amount >= 0)
                {
                        amount = (amount - 500000) * 0.08 + amount - 500000;
                        year++;
                }
                else
                {
                        x = 0;
                        break;
                }
        }
       
        printf("%d年后,小甲鱼败光了所有的家产,再次回到一贫如洗~\n",year,amount);
       
        return 0;
}

凌风狂阳 发表于 2021-8-13 20:57:42

a

甘白水 发表于 2021-8-14 10:26:07

陈宁智 发表于 2021-8-14 19:43:07

加油向前冲 发表于 2021-8-15 12:01:38

答案

冥王星星 发表于 2021-8-15 14:43:07

六年小队长 发表于 2021-8-15 20:44:28

1

开飞机的羊驼 发表于 2021-8-15 22:06:07

1
页: 173 174 175 176 177 178 179 180 181 182 [183] 184 185 186 187 188 189 190 191 192
查看完整版本: S1E16:拾遗 | 课后测试题及答案