tljoe
发表于 2019-1-5 23:28:43
1
culifoo
发表于 2019-1-6 13:33:57
嘤
怪咖野牛
发表于 2019-1-6 15:50:59
6666
a3979897
发表于 2019-1-6 18:39:59
喜羊羊Vinnie
发表于 2019-1-8 02:08:22
文体两开花
fishpoke
发表于 2019-1-9 12:26:52
0.
81
1.
8
2.
a
3.
4.
x>0?x:-x
5.
if (size > 12)
{
cost = cost * 1.05;
flag = 2;
}
else
{
bill = cost * flag;
}
---
if (ibex > 14)
{
sheds = 3;
}
else
{
sheds = 2
help = 2 * sheds;
}
----
scanf("%d", &score);
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
scanf("%d", &score);
----
#include <stdio.h>
#include <math.h>
int main()
{
double money = 10000;
double fish;
double black;
int year;
for (year=1;year<100;year++)
{
fish = money + money*0.1*year;
black = 10000*pow(1.05,year);
if (black>fish)
{
printf("after %d year black >fish\n",year);
printf("fish = %.2f \n",fish);
printf("black = %.2f \n",black);
break;
}
}
}
------
#include <stdio.h>
#include <math.h>
int main()
{
double fish=4000000;
int year;
for (year=1;year<100;year++)
{
fish = fish*1.08;
if (fish<0)
{
printf("after %d year \n",year);
//printf("fish = %.2f \n",fish);
break;
}
fish = fish-500000;
}
}
------
#include <stdio.h>
#include <math.h>
int main()
{
double number;
int i,j;
for(i=3;i<1000;i++)
{
j=1;
number = 1;
if(j%2!=0)
{
number = number - (1/(double)i);
}
else
{
number = number + (1/(double)i);
}
if(number)
j++;
i++;
printf("%.5f\n",number);
}
}
---------
wtb18951101
发表于 2019-1-10 14:30:51
1
Nuri
发表于 2019-1-10 17:38:53
123
jxp425
发表于 2019-1-11 13:28:00
kaka
sophisticated
发表于 2019-1-11 17:31:03
感谢分享
心镜如一TYB
发表于 2019-1-12 23:34:53
2019年1月12日 10:34:49
xieyx2003
发表于 2019-1-14 19:26:15
这个有意思
FE0636556
发表于 2019-1-14 21:44:26
qqq
aaa4d56
发表于 2019-1-14 22:48:00
I love FishC.com!
荆皎
发表于 2019-1-14 23:02:29
a
兔子TUZI
发表于 2019-1-15 09:44:28
1
牛奶刺身
发表于 2019-1-16 19:15:20
对答案啦
聊生于污
发表于 2019-1-17 17:05:08
第4题没看懂
水中望月
发表于 2019-1-17 17:05:14
0.
100次
1.
0次
2.
a,b,c
3.
a=15,b=5,c=10
4.
z = x>=0 ? x : -x;
5.
A.
if(size > 12)
{
cost = cost * 1.05;
}
bill = cost * flag;
flag = 2;
B.
if(ibex > 14)
{
sheds = 3;
}
sheds = 2;
help = 2 * sheds;
C.
if(score < 0)
{
scanf("%d", &score);
}
count++;
scanf("%d", &score);
0.
#include <stdio.h>
#include <math.h>
int main()
{
int year = 0, money = 10000;
float xjy = 10000.0, hy;
while(++year)
{
xjy +=money * 0.1;
hy = money * pow(1+0.05, year);
if(hy > xjy)
{
goto A;
}
}
A: printf("%d年后,黑夜的投资额超过小甲鱼!\n\
小甲鱼的投资额是:%.2f\n黑夜的投资额是:%.2f\n",year,xjy,hy);
return 0;
}
1.
#include <stdio.h>
int main()
{
int year;
float money = 400.0;
for (year = 1; money >= 50; year++)
{
money = (money - 50) * (1 + 0.08);
}
printf("%d年之后,小甲鱼败光了所有的家产,\
再次回到一贫如洗......\n",year);
return 0;
}
2.
#include <stdio.h>
#include <math.h>
int main()
{
float Pi = 0,n = 1.0;
int i = 1;
while(fabs(n) > pow(10, -8))
{
n = 1.0 / (i * 2 - 1);
if(i % 2 == 0)
{
n = -n;
}
Pi += n;
i++;
}
Pi = Pi * 4;
printf("Pi的近似值为:%.7f\n",Pi);
return 0;
}
3.
#include <stdio.h>
int main()
{
int a = 1, b = 1, i, sum = 0;
for (i=3; i<=24; i++)
{
sum = a + b;
a = b;
b = sum;
}
printf("两年之后可以繁殖%d对兔子!\n", sum);
return 0;
}
路易大魔王
发表于 2019-1-18 20:47:22
2019.1.18记录看答案