hgmyh4977
发表于 2020-1-12 16:21:20
0 10个
1 0个
2
3 b=3,c=3+5=8,a=3;
4
大肥侃子
发表于 2020-1-12 21:50:06
0:100个
1:10个
2:a,b,c
3:a=5,b=5,c=10
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:
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
scanf("%d", &score);
动手:
0:
#include <stdio.h>
#define N 10000
int main()
{
int i,n;
float xiao,heiye;
xiao = heiye = N;
for (i = 1; xiao >= heiye; i++)
{
xiao += 0.1 * N;
heiye *= 1.05;
n = i;
}
printf("%d年后,黑夜的投资额超过小甲鱼!\n",n);
printf("小甲鱼的投资额是:%.2f\n",xiao);
printf("黑夜的投资额是:%.2f\n",heiye);
return 0;
}
1:
#include <stdio.h>
#define N 4000000
int main()
{
int i,y;
float n = N;
for (i = 1; n > 0; i++)
{
n -= 500000;
n *= 1.08;
y = i;
}
printf ("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗.....\n",y);
return 0;
}
2:
#include <stdio.h>
#include <math.h>
int main()
{
float n,Pi;
int i,c;
n = c = 1;
Pi = 0;
for (i = 1; n >= pow(10,-8); i = -i)
{
n = 1.0 / (float)c;
c += 2;
Pi += n * i;
}
Pi *= 4.0;
printf("圆周率Pi=%.7f",Pi);
}
3:啊啊啊啊啊我要吃兔兔
BIYU
发表于 2020-1-12 23:56:23
本帖最后由 BIYU 于 2020-1-13 00:21 编辑
0:10次
1:0次
2:a,b,c
3:a=14,b=5,c=9
4:
x>0?z=x:z=x*(-1)
5:
A
if(size > 12)
{
cost *=1.05;
flag = 2;
}
bill = cost * flag;
B
if(ibex>14)
{
sheds=3;
}else{
sheds = 2;
}
help = 2*sheds;
C
do{
scanf("%d",&score);
if(score<0)
{
break;
}
count++;
}while(1);
printf("count = %d\n",count);
6:
#include<stdio.h>
int main()
{
double fish=10000,back_e=10000,fish_e=10000;
int year=0;
do{
fish_e += fish*0.1;
back_e += back_e * 0.05;
year++;
}while(fish_e>=back_e);
printf("%d年后黑夜投资额超过小甲鱼\n",year);
printf("此时小甲鱼的投资额为:%.2lf\n",fish_e);
printf("此时黑夜的投资额为:%.2lf\n",back_e);
}
7:
#include<stdio.h>
int main()
{
double money=4000000,ti_money=500000;
int year=0;
do{
money -= ti_money;
money += money*0.08;
year++;
}while(money>0);
printf("%d年后,小甲鱼败光了所有家产,再次回到了一贫如洗.....\n",year);
}
8:
#include<stdio.h>
#include<math.h>
int main()
{
int i=1;
double num=1.0,pi=0.0;//注意,如果这里直接从1开始会出现误差
while(fabs(i/num)>=1e-8)
{
pi += i/num;
i = -i;
num+=2;
}
printf("%.7lf\n",4*pi);
}
9:
#include<stdio.h>
int main()
{
long long f1=1,f2=1;
int num,i;
printf("请输入次数:");
scanf("%d",&num);
for(i=2;i<=num/2;i++)
{
f1 = f1 + f2;
f2 = f2 + f1;
}
if(num%2)
{
printf("第%d次是%lld\n",num,f1+f2);
}else{
printf("第%d次是%lld\n",num,f2);
}
}
段黄鱼
发表于 2020-1-13 19:50:06
封印解除
阎建伟
发表于 2020-1-13 20:49:52
答案
DizzyK
发表于 2020-1-13 21:56:18
做完啦
十一面包
发表于 2020-1-13 22:16:04
daan
沐丶心
发表于 2020-1-14 16:07:20
11
沐丶心
发表于 2020-1-14 16:24:32
{:10_249:}{:10_249:}{:10_249:}{:10_249:}{:10_249:}{:10_249:}{:10_249:}{:10_249:}
YI.n
发表于 2020-1-14 21:47:27
看看
小石头i
发表于 2020-1-15 18:02:31
朕想知道
Gander
发表于 2020-1-15 22:31:26
{:5_109:}
qiuyu666
发表于 2020-1-16 12:19:26
666
Liu4Real
发表于 2020-1-16 14:54:03
.
wanyunyu
发表于 2020-1-16 16:13:42
兔子
三秋十梦
发表于 2020-1-17 10:21:08
1
杰里琉
发表于 2020-1-17 10:50:57
学习学习
大甲鱼873639952
发表于 2020-1-17 14:01:31
1
15197770865
发表于 2020-1-19 10:06:01
1532
minxin
发表于 2020-1-19 10:31:40
keep going