tyk4028458 发表于 2017-12-29 13:02:39

z

tbarolcht 发表于 2017-12-30 13:46:36

0.10個A
1.0個B
2.c
3.a=8,b=3,c=3
4.
5.
A.
if (size > 12)
{
    cost = cost * 1.05;
}
else
{
    bill = cost * flag;
}
B.
if (ibex > 14)
{
    sheds = 3;
}
else
{
    sheds = 2;
help = 2*sheds;
}
C.

若相惜hb 发表于 2018-1-2 05:40:53

支持

scw2248697 发表于 2018-1-2 17:17:56

看答案

Martine 发表于 2018-1-2 19:52:45

tt

大约在冬季 发表于 2018-1-9 19:15:10

0. 100
1.10
2.
3.a = 5, b=5, c=4
4.
5.

dongf54 发表于 2018-1-9 22:03:59

测试题
0.
10个’A’
1.
不会打印
2.
a,b,c
3.
a = 14, b = 5, c = 9;
4.
#include<stdio.h>

int main()
{
        float x, z;
        printf("Please input the value of x:");
        scanf("%f",&x);
        z = x >= 0? x: (-1)* x;
        printf("|x| = %f\n",z);
       
        return 0;
}
5.
A.
If(size > 12)
{
        cost = cost * 1.05;
        flag = 2;
        bill = cost * flag;
}
else
{
        bill = cost * flag;
}
B.
if(ibex > 14)
{
        sheds = 3;
        help = 2 * sheds;
}
else
{
        sheds = 2;
        help = 2 * sheds;
}
C.
do
{
scanf(“%d”, &score);
count++;
}while(score >= 0);
printf(“count = %d\n”, count);


动动手
0.
#include<stdio.h>
#include<math.h>

int main()
{
        float fishc = 10000, night = 10000;
        int year = 0;
        while(night <= fishc)
        {
                fishc = 10000 + (10000 * 0.1) * year;
                night =10000 * pow( (1 + 0.05) , year);
                year++;
        }
        printf("%d年后,黑夜的投资额超过小甲鱼!\n",year);
        printf("小甲鱼的投资额是:%.2f\n黑夜的投资额是:%.2f\n",fishc, night);
       
        return 0;
}
1.
#include<stdio.h>


int main()
{
        double fishc = 400;
        int year = 0;
        while(fishc > 0)
        {

                fishc -= 50;       
                fishc = fishc * (1 + 0.08);
                year++;
       
        }
        printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗……",year);
       
        return 0;
}
2.
#include<stdio.h>

int main()
{
        double pi, temp, temp2, n = 1, sum = 0;
        int i = 1;
        do
        {
                temp = 1 / n;
                if(temp < 0.00000001)
                {
                        break;
                }
                temp2 = i * temp;
                sum = sum + temp2;
       
                i = -i;
                n += 2;        
        }while(1);
        pi = 4 * sum;
        printf("pi = %.7lf",pi);
       
       
        return 0;
}
3.
#include<stdio.h>

int main()
{
        int month, sum = 0;
        for(month = 24; month > 0; month -= 2)
        {
                sum += month;
        }
        printf("两年后可繁殖%d对兔子",sum);
       
        return 0;
}

Piziaa 发表于 2018-1-10 13:53:36

看看

4342315 发表于 2018-1-10 16:00:16

学习

可爱的失踪人口 发表于 2018-1-11 16:47:37

fulanmao 发表于 2018-1-12 08:17:49

做完了 謝謝小甲魚

Piziaa 发表于 2018-1-13 14:33:49

答案

Dr丶温 发表于 2018-1-14 16:35:48

咋不叫国产吃货过去吃兔子呢。。。

LICHT 发表于 2018-1-14 16:43:45

。。。这节课后对于数学渣来说是噩梦。。。。。。决定了!学完第一季C之后,我要先去学数学!!!

Blanc_sw 发表于 2018-1-15 16:35:45

1

陈小胖 发表于 2018-1-20 15:29:38

kkkkkkkkkkkkkkkkkkk{:10_249:}{:10_249:}{:10_249:}

hhdsz1 发表于 2018-1-21 08:16:27

AAAAAAAAAA

祈祷我成绝唱 发表于 2018-1-21 16:09:43

1

抄作业 发表于 2018-1-22 20:11:25

0.AAAAAAAAAA
1.10个B
2.a
3.b=5,c=8,a=15
4.x<0?-x:x
5.

c839061076 发表于 2018-1-23 00:42:01

1
页: 7 8 9 10 11 12 13 14 15 16 [17] 18 19 20 21 22 23 24 25 26
查看完整版本: S1E16:拾遗 | 课后测试题及答案