十口木 发表于 2022-7-23 22:54:54

wuhu1

b612 发表于 2022-7-24 14:43:40

1

PSHong 发表于 2022-7-25 09:47:30

a

乔布斯2 发表于 2022-7-25 22:29:18

我我2我

小白学不会 发表于 2022-7-26 15:12:35

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

int main()
{
        float num1=10000.00,num2=10000.00,lx1=0.00,lx2=0.00;
        int count=0;
        do
        {
                lx1=10000*0.1;
                num1=num1+lx1;
                lx2=num2*0.05;
                num2=num2+lx2;               
      count++;
        }
        while (num1>num2);
        printf("%d年后,黑夜的投资额超过小甲鱼!\n", count);
        printf("小甲鱼的投资额是:%.2f\n",num1);
        printf("黑夜的投资额是:%.2f\n",num2);

    return 0;
}
1.
#include <stdio.h>

int main()
{
        float num=4000000.00,lx=0.00;
        int count=0;
        do
        {
               
                num=num+lx-500000.00;
                lx=num*0.08;               
      count++;
        }
        while (num>0);
        printf("%d年后,小甲鱼败光了所有的家产,再次回到一贫如洗...\n", count);

    return 0;
}
2.
#include <stdio.h>
#include <math.h>
int main()
{
        float num1=0,i,temp=0,num2=0;
       
        for(i=1;(fabs(temp))>(10^(-8));i=-i)
        {       
                num2=num1;
                num1+=1/i;
                if(i>0)
                {
                        i+=2;
                }
                else
                {
                        i-=2;
                }
                temp=num1-num2;
        }
        printf("pi的近似值为:%f\n", num1*4);

    return 0;
}
3.
#include <stdio.h>
#include <math.h>
int main()
{
        int num=2,i,temp=2,ltemp=1;
       
        for(i=3;i<24;i++)
        {       
                temp+=ltemp;
                ltemp=temp-ltemp;
                num+=temp;
        }
        printf("兔子数为:%d\n", num*2);

    return 0;
}

青藤徐渭 发表于 2022-7-26 16:37:05

zhaowenzhe5 发表于 2022-7-26 18:37:49

我又来刷积分了

CharlotteVV 发表于 2022-7-26 19:29:17

aaa

bingochina 发表于 2022-7-27 17:52:22

0,10个
1,11个
2,;c=5;b = c;a=b
3,a=3,b=4,c=10
4,if (x<0)
       x = (-x);
else
x=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++;

a13325497142 发表于 2022-7-27 22:41:42

1

540 发表于 2022-7-28 09:55:01

1

小橘猫爱吃鱼 发表于 2022-7-28 11:55:04

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

hengji 发表于 2022-7-28 19:18:28

0:10个A
1:0个
2:

2841239465 发表于 2022-7-29 15:17:47

let me see see

落枫` 发表于 2022-7-30 22:42:49

{:10_282:}

折耳布偶 发表于 2022-7-31 16:00:46

11111111111

沉默的你 发表于 2022-7-31 19:10:40

本帖最后由 沉默的你 于 2022-7-31 19:13 编辑

我太菜了,怕丢人。。。。

szj123456 发表于 2022-8-1 09:14:54

{:5_95:}

lizkn 发表于 2022-8-1 09:30:03

1

刘若辰 发表于 2022-8-1 15:26:01

朕想知道
页: 223 224 225 226 227 228 229 230 231 232 [233] 234 235 236 237 238 239 240 241 242
查看完整版本: S1E16:拾遗 | 课后测试题及答案