shadowsmile 发表于 2017-5-9 17:42:19

答案

dnfpk001 发表于 2017-5-10 15:52:05

{:10_269:}

neil123 发表于 2017-5-13 22:08:24

我想知道答案

neil123 发表于 2017-5-14 21:55:33

小甲鱼,编程题的第二题题目表达的不过清晰,我一开始以为是先投资后消费,但看了答案才发现并不是而是先消费在投资。{:10_247:}

趁年轻GO 发表于 2017-5-15 23:38:05

朕想知道

F91 发表于 2017-5-16 10:37:38

顶楼主

makefile 发表于 2017-5-16 22:48:47

查看

minl 发表于 2017-5-17 20:18:11

答案

tlang2052 发表于 2017-5-17 21:09:33

·······················

rock5442107 发表于 2017-5-18 00:40:10

太好了 , 終於到了這邊了 .. 之前課程真的很努力在學習...

清水2918 发表于 2017-5-22 22:20:52

{:9_227:}

富裹 发表于 2017-5-23 14:59:20

JH_Lau 发表于 2017-5-24 23:53:08

test

pda999 发表于 2017-5-26 13:18:32

0 10, 因为是先用后加,第一次循环完,j的值是10
1 0, 因为开始i的值是0,并没有进入while循环
2 c, b, a
3 a=15, b=5, c=10
4 z=x<0?-x:x;
5
(1)
        if (size>12)
        {
                cost=cost*1.05;
                flag=2;               
        }
        bill=cost*flag;
(2)
        if (ibex>14)
        {
                sheds=3;
        }
        else{sheds=2;}
        help=2*sheds;
(3)
        scanf("%d", &score)
        while (score>=0)
        {count++; scanf("%d", &score);}

陌蚁 发表于 2017-5-28 11:53:28

看看答案

fishc_break 发表于 2017-5-28 14:59:23

1.10次,因为第一个for的判断语句为逗号运算符所以判断第二个表达式是否为真,第二个表达式j=10时为假,所以i++,然后判断j!=10为假,结束循环。
2.0次,因为i++为先运算后自加1,所以while的值为为假。
3.a,b,c,。
4.14,5,9。不懂??
5.???
6. A if(size > 12)
        {
                cost = cost * 1.05;
                flag = 2;
        }
Else
{
                   bill = cost * flag;
}
B      if(ibex > 14)
        {
                sheds = 3;
        }
        else
        {
                sheds = 2;
        }
        help = 2 * sheds;
C         do
        {
                scanf("%d",&score);
                if(score>0)
                {
                        count++;
                }
        }
        while(score>0);
        printf("count = %d\n",count);

安室透 发表于 2017-5-28 16:30:50

{:10_243:}

奥普瓯江 发表于 2017-5-31 20:13:24

对一下答案

殇X黯夜 发表于 2017-6-3 08:53:28

11

lntouchables 发表于 2017-6-5 20:58:21

测试题:
0.10个
1.0个
2.a,b,c
3.14,5,9
4.
#include<stdio.h>
int main()
{
    int x,z;

    printf("请输入一个数字: ");
    scanf("%d",&x);

    z=(x<0)?-x:x;

    printf("%d",z);

    return 0;
}
5.
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: scanf("%d", &score);
if (score < 0)
{
      printf("count = %d\n", count);
}
count++;
readin;
动动手:
0.
#include<stdio.h>
int main()
{
    float p = 10000.00;
    float xjy ,hy;
    int n = 0;

    while (xjy > hy)
    {
      n++;

      xjy = p + p*0.1*n;
      hy = p * pow(1+0.05,n);

    }

    printf("%d年后,黑夜的投资额超过小甲鱼!\n",n);
    printf("小甲鱼的投资额是:%.2f",xjy);
    printf("黑夜的投资额是:%.2f",hy);

    return 0;

}
页: 1 2 3 4 5 6 7 8 [9] 10 11 12 13 14 15 16 17 18
查看完整版本: S1E16:拾遗 | 课后测试题及答案