arrovart 发表于 2020-3-15 10:05:21

谢谢谢谢万分感谢

afu 发表于 2020-3-15 11:30:26

答案

Aiboer 发表于 2020-3-15 15:13:14

答案

tjudongxin 发表于 2020-3-15 18:13:58

0 100个A
1 0个B
2 a b c
3 a=14,b=5,c=9
4 z=(x>=0?x:-x)
5 aif(size>12){cost = cost*1.0e5; flag = 2;}
      else bill = cost*flag;
   bif(ibex>14)sheds = 3;
       else {sheds = 2; help = 2 * sheds;}
   c if(score<0) printf("count = %d\n", count);
   else {count++; scanf("%d", &score);}tjudo

limaxer 发表于 2020-3-15 19:30:12

学习~

月明风清1 发表于 2020-3-15 22:07:14


qianchen 发表于 2020-3-16 00:52:22

0、10
1、不打印
2、a,b,c
3、14
4、x>0? z=x:z=-x

小冥冥 发表于 2020-3-16 13:59:40

1

口欠火丁 发表于 2020-3-16 14:57:21

答案案

小翔迷妹 发表于 2020-3-16 16:02:28

oh~

冰のCirno 发表于 2020-3-16 16:29:44

111

初级小白 发表于 2020-3-16 21:06:23

0、100个
1、11
2、a
3、b=6,c=10,a=15
4、z=|x|
5、if (size>12)
{
cost=cost*1.05;
flag=2;
}
else

bill=cost*flag;

B
if(ibex>14)
{
   sheds=3;
}sheds=2;
help=2*sheds;
C
if (score<0)
{
printf("count=%d\n",count);
}
else
{
count ++;
scanf("count = %d\n",count);
动动手
0、

即将起飞的明哥 发表于 2020-3-17 23:41:01

1111111111111111111111111

jack22_22 发表于 2020-3-18 10:21:48

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

int main()
{
        int i = 10000, year;
        float j, k;
       
        j = 10000 * (1 + 0.1) * year;
        k = 10000 * pow(1.05,year);
       
        while(k > j)
        {
                printf("%d年后,黑夜的投资额超过小甲鱼!\n",year);
        }
       
        printf("小甲鱼的投资额是:%.2f\n",j);
        printf("黑夜的投资额是:%.2f\n",k);
       
        return 0;
}

莫扎特666 发表于 2020-3-18 12:26:35

加油!

猜猜我叫啥 发表于 2020-3-18 17:44:32

打卡完成

lpyhhh 发表于 2020-3-18 19:19:58

0. 请问下边代码将打印多少个 'A'?
10个
1. 请问下边代码会打印多少个 'B'?
0个
2. 请写出表达式 a = b = c = 5 中的"l-value"?
a
3. 请问表达式 a = (b = 3, 4, c = b++ + 5, ++c + ++b); 执行后,整型变量 a、b、c 的值是?
a=4,b=3,c=3
4. 请使用条件运算符求出变量 x 的绝对值,并存放到变量 z 中。
z = x > 0 ? x : -x;
5. C 语言其实在大部分情况下不使用 goto 语句也能做得很好,请尝试将下列代码段写成不带 goto 语句的版本。
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:
readin:
do
{
      scanf("%d", &score);
      count++;
}while(score < 0);
printf("count = %d\n", count);

Iris_Utaha 发表于 2020-3-18 21:40:20

1

3063611955 发表于 2020-3-18 23:06:52

5464

Dlow 发表于 2020-3-19 09:27:52

6
页: 84 85 86 87 88 89 90 91 92 93 [94] 95 96 97 98 99 100 101 102 103
查看完整版本: S1E16:拾遗 | 课后测试题及答案