houqing1999 发表于 2023-2-3 09:17:48

{:10_333:}

浮春梦雪 发表于 2023-2-3 09:59:03

0

时刻提醒自己噢 发表于 2023-2-3 11:53:17

Mamma 发表于 2023-2-3 15:44:41

学习学习

84144402100 发表于 2023-2-4 01:36:29

1

Hubim 发表于 2023-2-4 20:10:12

110
10
cba
b = 5,c= 10 a= 15
x > 0 ? z = x : z = - x;

darklucient 发表于 2023-2-6 09:17:36

1

wednesdayyy 发表于 2023-2-6 14:59:38

{:5_90:}

BaldingCargo 发表于 2023-2-7 15:58:31

加油

lmx1 发表于 2023-2-8 10:17:08

{:9_241:}

892706423 发表于 2023-2-8 21:21:53

1

suanwei 发表于 2023-2-9 15:17:25

1

火腿柴 发表于 2023-2-10 23:15:16

a

不染以柒 发表于 2023-2-11 00:09:58

本帖最后由 不染以柒 于 2023-2-11 00:13 编辑

0.10次
1.0个
2.a,c,b
3.a=14,b=5,c=9
4.z = (x>=0)?x:-x;
5.
A. if(size>12){count = cost*1.05;flag=2;}bill=cost*flag;
B. if(ibex>14){sheds = 3;}else{sheds = 2;}help = 2*sheds;
C. scanf("%d",&score);while(score>0){count++;scanf("%d",&score);}printf("count = %d\n",count);

HanCh 发表于 2023-2-11 01:08:00

4

rohde 发表于 2023-2-11 19:57:59

1

seriya 发表于 2023-2-12 17:46:42

tainanli

ZETAXR 发表于 2023-2-13 19:58:25

1

好学的派小星 发表于 2023-2-13 21:49:51

0.10
1.9
2.a,b,c
3.a14,b3,c9
4.x>0? z=x:z=-x

看图图的孩子 发表于 2023-2-13 23:38:03

0,10
1,11
2,c = 5;
b = c;
a = b;
abc都是
3,c = 9,b =5,a=14
4,z = x < 0?x*-1:x
5A,if (size > 12)
{
      cost = cost * 1.05;
      flag = 2;
}
bill = cost * flag;
b,if (ibex > 14)
{
      sheds = 3;
}
sheds = 2;
help = 2 * sheds;
c,
scanf("%d", &score);
if (score < 0)
{
      printf("count = %d\n", count);
}
count++;
0,#include <stdio.h>
#include<math.h>
int main()
{       
        double lwb = 10000.0,hy = 10000.0, year=0.0;
        double a=0.0,b=0.0;
        for(year = 0;;year++)
        {       
                if(a>=b)
                {
                        a = lwb + lwb * 0.1 * year;
                        b =hy * pow(1.05,(int)year);
                        printf("小甲鱼:%.2f,黑夜:%.2f\n",a,b);
                }
               
                else
                break;       
        }
       
               
        printf("%d年后,黑夜的投资额超过小甲鱼!\n小甲鱼的投资额是:%.2f\n黑夜的投资额是:%.2f\n",(int)year-1,a,b);
        return 0;
}
1,#include <stdio.h>
#include<math.h>
int main()
{       
        float money = 400.0,year;
        for(year= 1;money>= 50;year++)
        {
                money -= 50;
                money *= 1.08;
        }
        printf("%d年之后,小甲鱼一贫如洗,%f",(int)year,money);
        return 0;
}
2,
#include <stdio.h>
#include<math.h>
int main()
{       
        double PI=0.0,fm=1.0,fz=1.0,result;int i;
        for(i = 1;fm<=pow(10,8);i++)
        {       
                result = fz/fm;
                if(i%2==0)
                {
                        result *= -1.0;
                }
                PI+= result;
                fm += 2.0;
        }
        printf("%.8f",PI);
        return 0;
}
3,#include <stdio.h>
#include<math.h>
int main()
{       
        int month,result,tnum=0,tnum0=0,tnum1=0;
        for(month = 0;month<=24-1;month++)
        {       
                tnum0 = tnum;
                tnum = tnum1;
                if(month==0)
                {
                        tnum = 0;
                }
                else if(month==1)
                {
                        tnum =1;
                }
                else
                {
                        result = tnum+ tnum0;
                }
               
                tnum1 = result;
        }
        printf("%d",result);
        return 0;
}
页: 243 244 245 246 247 248 249 250 251 252 [253] 254 255 256 257 258 259 260 261 262
查看完整版本: S1E16:拾遗 | 课后测试题及答案