Nightwish0810 发表于 2018-9-6 16:03:42

很好

AlexXu 发表于 2018-9-6 21:48:33

0

伊泽塔w 发表于 2018-9-7 14:13:52

11

liguai 发表于 2018-9-8 10:53:35

1

无意穿堂风 发表于 2018-9-8 12:49:37

{:9_219:}

82年的狗粮 发表于 2018-9-8 14:44:20

。。。

YuanYuDa 发表于 2018-9-10 15:03:47

查看答案

jzzoxo 发表于 2018-9-10 15:08:05

.

zxp0811 发表于 2018-9-10 21:43:22

{:9_241:}

albus12 发表于 2018-9-12 12:22:35

10个a

albus12 发表于 2018-9-12 12:52:21

z=x>0?x;-x

fan111488 发表于 2018-9-12 16:14:25

嗷嗷

albus12 发表于 2018-9-12 22:44:27

#include <stdio.h>

#define MONEY   4000000
#define cost500000
int main()
{
    double a;
    int count;
    count=0;
    a=MONEY;
    while(a>=0)
    {
      a-=cost;
      a+=a*0.08;
      count++;
    }
    printf("%d年后用完了\n",count);
    return 0;
}

一世等着你 发表于 2018-9-12 23:29:29

0. 打印10次'A' j=10退出内循环,j!=10退出外循环,结果打印10次‘A’
1.
打印 0个'B'
循环 while(0) 直接退出循环
如果i=1; 会打印9次‘B’
2.
a=5;
a=5;

一世等着你 发表于 2018-9-12 23:47:59

不小心多点了下回车,发表回复了 0.0 不看答案再重新做下
0. 打印10次'A' j=10退出内循环,j!=10退出外循环,结果打印10次‘A’
1.
打印 0个'B'
循环 while(0) 直接退出循环
如果i=1; 会打印9次‘B’
2.
c=5;
b=c;
a=b;
a=5;
3.
a=14
b=5
c=9
4.
z = x < 0 ? –x : x
5
scanf("%d", &score);
while (score >= 0)
{
      count++;
      scanf("%d", &score);
}
printf("count = %d\n", count);

JXZ 发表于 2018-9-13 15:44:26

支持小甲鱼

空中花园 发表于 2018-9-14 02:51:48

愿做萤火 发表于 2018-9-15 12:26:04

....

粤南靓仔 发表于 2018-9-15 18:21:02

{:10_282:}

ycwz 发表于 2018-9-15 19:05:25

页: 18 19 20 21 22 23 24 25 26 27 [28] 29 30 31 32 33 34 35 36 37
查看完整版本: S1E16:拾遗 | 课后测试题及答案