晓毅
发表于 2023-11-6 20:16:09
{:5_90:}
cs宇帝
发表于 2023-11-6 20:40:56
1
英明神武李瓜皮
发表于 2023-11-7 16:25:35
1
mulif
发表于 2023-11-7 20:23:33
0.10次
1.0个
2.a
3.a = 12,b = 5,c = 10;
4.a? b:z;
x >= 0? z=a:z=-a;
5.
if(size > 12)
{
cost = cost * 1.05;
flag = 2;
}
else
{
bill = cost * flag;
}
}
if(ibex > 14)
{
sheds = 3;
}
else
{
sheds = 3;
help = 2 * shed;
}
while(1)
{
scnaf("%d",&score);
if(score < 0)
{
printf("count = %d\n",count);
break;
}
count ++;
}
0.#include<stdio.h>
#include<math.h>
int main()
{
float fish,night;
fish = night = 10000;
int count = 0;
while(1)
{
fish = fish + 10000 * 0.10;
night = night + night * 0.05;
count++;
if(fish < night)
{
printf("%d年后,黑夜的投资额超过小甲鱼!\n",count);
printf("小甲鱼的投资额是:%10.2f\n",fish);
printf("黑夜的投资额是:%10.2f\n",night);
break;
}
}
return 0 ;
}
1. #include<stdio.h>
int main()
{
int sum = 4000000;
int count = 1;
while((sum = sum - 500000) > 0)
{
sum = sum + sum * 0.08;
count ++;
}
printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗...(\n",count);
return 0;
}
2. #include<stdio.h>
#include<math.h>
int main()
{
double sum = 1;
double a ;
double i = 1;
double t = 3;
while(1)
{
i = -i;
a = 1 / (t * i);
//printf("%f\n",a);
if(fabs(a) < 0.00000001)
{
printf("pi的值为:%.7f",4*sum);
break;
}
sum = sum + a;
t += 2;
}
}
3.#include<stdio.h>
int main()
{
int year, month;
int i, rab = 2;
int rab1, rab2;
rab1 = 0, rab2 = 0;
printf("请输入几年过去了?");
scanf("%d",&year);
month = 12 * year;
for (i = 1; i <= month; i++ )
{
if(i % 2 == 1)
{
rab += rab2;
rab2 = rab1;
rab1 = rab;
}
if(i % 2 == 0)
{
rab += rab2;
rab2 = rab1;
rab1 = rab;
}
}
printf("%d年过后会有%d对兔子!",year,(rab+rab1+rab2)/2);
return 0;
}
DQYdqy1112
发表于 2023-11-7 21:58:37
66666
天亦涵
发表于 2023-11-8 09:32:09
答案
aokane
发表于 2023-11-8 17:18:29
(
timeroom
发表于 2023-11-15 08:31:45
1
timeroom
发表于 2023-11-15 10:52:46
1
liujiawen
发表于 2023-11-19 14:30:03
不会
Conceiver
发表于 2023-11-19 15:11:16
dq
mango10
发表于 2023-11-19 19:13:09
0.10个
1.11个
2.a b c
3.5 5 4
4. z = x > 0? x, -x;
384560686
发表于 2023-11-20 13:24:10
1
yeel
发表于 2023-11-20 16:12:57
1
苗生海海
发表于 2023-11-21 08:21:28
0:10
1:0
2:c, b, a
3: a = 9, b = 5, c = 4
4: z = x ? x>=0 : abs(x)
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:
while(1)
{
scanf("%d", &score);
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
}
动手0:
#include <stdio.h>
int main()
{
float xiaojiayu = 10000;
float heiyu = 10000;
int i = 0;
while (heiyu <= xiaojiayu)
{
i++;
xiaojiayu += 10000 * 0.1;
heiyu *= 1.05;
}
printf("%d年后,黑夜的投资额超过小甲鱼!\n", i);
printf("小甲鱼的投资额为%.2f\n", xiaojiayu);
printf("黑夜的投资额为%.2f\n", heiyu);\
return 0;
}
动手1:
#include <stdio.h>
int main()
{
float xiaojiayu = 4000000;
int i = 0;
while (xiaojiayu>0)
{
xiaojiayu -= 500000;
xiaojiayu = xiaojiayu * 1.08;
i++;
}
printf("%d年后,小甲鱼光了!\n", i);
return 0;
}
动手2:
#include <stdio.h>
#include <math.h>
int main()
{
float item = 1;
int i = 2;
float result = item;
int flag = -1;
item = 1.0 / (2*i-1);
while (item >= pow(10, -8))
{
result += flag * item;
flag = -flag;
i++;
item = 1.0 / (2*i-1);
}
printf("pi=%.7f", 4*result);
return 0;
}
动手3:
#include <stdio.h>
#include <math.h>
int main()
{
int f1 = 1;
int f2 = 1;
int i, result;
for (i = 3; i <= 24; i++)
{
result = f1 + f2;
f1 = f2;
f2 = result;
}
printf("两年后的兔子为%d个\n", result);
}
46368个
Trist、弈人
发表于 2023-11-21 08:30:10
90
司夜寒
发表于 2023-11-21 12:42:35
10
无数个
a
c=9 b=4 a=9
#include<stdio.h>
int main()
{
x=|x|
z=x
print(z)
}
if (size > 12)
{
a=cost
cost = cost * 1.05;
flag = 2;
print( a);
}
elif:
b=bill
bill = cost * flag;
print(b)
if (ibex > 14)
{
a=sheds
sheds = 3
print(a)
}
sheds = 2
help = 2 * sheds
b=help
print(b)
readin: scanf("%d", &score);
if (score < 0)
{
goto stage2;
}
count++;
goto readin;
stage2: printf("count = %d\n", count);
if (heiye>xiaojiayu)
{ xiaojiyu=10000*10%
heiye=10000*5%^n
printf(%d年后黑夜的投资额超过小甲鱼/n小甲鱼的投资额是%d/n,n,xiaojiayu,heiye)
}
if (count>result)
{ count=50n result=400*58%
printf(%d年后....,n)
}
3539974248
发表于 2023-11-21 18:05:49
kvvj
理想型肖鹿
发表于 2023-11-23 20:57:47
。
疯狗马德森
发表于 2023-11-24 09:52:38
0,9
1,10
2,a
3, c10b5a
4,z=x>=0?x:-x;
5A,if (size > 12)
{
cost = cost * 1.05;
flag = 2;
}
else{
bill = cost * flag;}