天边人影 发表于 2016-8-19 13:37:00

0. 10个A
1. 10个B
2. a?
3. a=9, b=4, c=5
4. z = x >=0 ? x: -x
5. A. if (size > 12) {
             cost = cost * 1.05;
             flag = 2;
            }
          bill = cost * flag;

B.          sheds = 2;
            help = 2 * sheds;

C.   while ((score = getchar()) > 0)
         { count++;
         }
          printf("count = %d\n", count);

心中的日月 发表于 2016-8-19 17:33:01

心中的日月 发表于 2016-8-19 17:36:41

我看看

oshapeman 发表于 2016-8-20 10:59:32

咳咳咳

5tao 发表于 2016-8-23 14:33:41

看看

江南孤雁 发表于 2016-8-23 16:10:21

{:5_99:}

snowcity 发表于 2016-8-25 17:24:21

s1e16
0.10

1.10

2.a

3.3,5,9

4.z = x >= 0 ? x : -x ;

5.A
if(size > 12){
        cost = cost * 1.05;
        flag = 2;
}
bill = cost * flag;

B
if(ibex > 14){
        sheds = 3;
}
sheds = 2;
help = 2 * sheds;

C
while(scanf("%d", &score)){
        if(score < 0){
                printf("count = %d\n", count);
        }
        count++;
}

动动手
0.
#include <stdio.h>
int main(){
        float xjy_money=0, hy_money=0;
        int y=1;
        float bj = 10000, hy_bj;

        while(1){
                xjy_money = bj + bj * 0.10 *y;
                if(1 == y){
                        hy_money = (1 + 0.05) *bj;
                }else{
                        hy_money = (0.05 + 1) * hy_money;
                }
                if(hy_money > xjy_money){
                        break;
                }
                y++;
        }

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

        return 0;
}


1.
#include <stdio.h>

int main(){
        int y;
        float money = 4000000,y_m = 500000;
       
        for(y = 1; money > 500000; y++){
                money = (money - y_m) *(1+ 0.08);
        }
       
        printf("%d年之后\n",y);

        return 0;
}


2.
#include <stdio.h>

int main(){
        int i=1, j=1;
        float temp;

        for(i; i< 100000000; i++){
                if(i%2 != 0){
                        temp += 1.0/j;
                        j += 2;
                }else{
                        temp -= 1.0/j;
                        j += 2;
                }
        }

        printf("PI约等于%.8f\n", temp*4);

        return 0;
}


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

int main(){
        int month = 24;
        int num = 2;
       
        num = pow(num,month);

        printf("%ld\n",num);
        return 0;
}

星云散落 发表于 2016-8-29 20:37:46

~~~~~~~

zzzz76 发表于 2016-8-30 15:39:12

{:10_275:}

nash_h9527 发表于 2016-9-2 12:20:15

我要做作業,讓自己更強大, 但看不懂睡不飽...冏!

szuatr 发表于 2016-9-6 18:35:59

dsafdsafdsafsafsa

set 发表于 2016-9-6 20:10:34

akkakaakaka

飞飞123 发表于 2016-9-11 11:19:53

1245

zhzv77 发表于 2016-9-12 18:50:17

检测

lk819 发表于 2016-9-22 15:16:59

看看答案

sks731953873 发表于 2016-9-22 21:39:20

KANKAN

satori 发表于 2016-9-30 11:48:41

{:10_277:}

Attila 发表于 2016-10-7 18:56:06

跟小甲鱼学C

sunnn 发表于 2016-10-9 10:34:21

2016-10-9 10:34:18

微凉 发表于 2016-10-13 14:13:32

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