tanghuanfe
发表于 2019-6-18 13:32:34
么么哒小甲鱼
村名阿钊
发表于 2019-6-20 16:18:32
I love FishC.com!
piaoycws
发表于 2019-6-22 21:56:41
12
Vinci_ovo
发表于 2019-6-23 17:36:39
over
junyue
发表于 2019-6-23 22:06:45
坚持胜利
lulukay
发表于 2019-6-24 07:33:35
2
就是怂
发表于 2019-6-24 12:09:58
1
月蚀
发表于 2019-6-25 19:55:54
难受
飘逸的光头
发表于 2019-6-26 15:47:07
看答案
cage233
发表于 2019-6-26 16:15:14
0.10
1.0
2.5
3.出错
欣然_coder
发表于 2019-6-26 20:31:11
.
KulobaY_xiao
发表于 2019-6-27 19:52:22
0.10次
1.10次
2.c,b,a
3.a=4,b=5,c=9
4.x>=0?z=x:z=0-x;
5.
夜雨闻铃
发表于 2019-6-27 20:58:41
看看
夜雨闻铃
发表于 2019-6-27 20:59:16
看看
xdlcj
发表于 2019-6-28 16:35:26
答案
ietar
发表于 2019-6-29 10:50:09
本帖最后由 ietar 于 2019-6-29 10:53 编辑
0
just 10
1
...没进循环啊
2
a
3
b=3,c=8 b=4 c=9 b=5 a=14
4
void main(){
float x,z;
printf("x=:");
scanf("%f",&x);
z = x>0?x:-x;
printf("z=%f",z);
}
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
scanf("%d", &score);
while (score >= 0)
{
count++;
scanf("%d", &score);
}
printf("count = %d\n", count);
0
#include <stdio.h>
void main(){
int year;
const float i1=0.1;
const float i2=0.05;
double xjy=10000, heiye=10000;
for(year=0;heiye<=xjy;year++){
xjy += 10000*i1;
heiye *= (1+i2);
}
printf("after %d years, heiye gets more than xjy!\n",year);
printf("xjy:%.2f\nheiye:%.2f",xjy,heiye);
}
1
#include <stdio.h>
void main(){
int year;
double base = 4000000;
for(year=0;base>=0;year++){
base -= 500000;
base *= 1.08;
}
printf("after %d years, sjy sucks!\n",year);
}
2
#include <stdio.h>
#include <math.h>
void main(){
double qpi=0,each=1;
int n,count=0;
for(n=1;fabs(each)>=1e-8;n++){
each = pow(-1,(n+1))/(2*n-1);
qpi += each;
count += 1;
}
printf("pi=%.7f\ncount=%d",4*qpi,count);
}
这tm循环了5000万零1次 怪不得这么慢
3
92736 初项是2 2的fib嘛
#include <stdio.h>
#include <math.h>
void main(){
int a1 = 2, a2=2, limit = 24, temp;
// n1=2, n2=2, n3=n2+n1=4, n4=n3+n2=6, n5=n4+n3=10;
for(int i=3;i<=limit;i++){
temp = a2;
a2 = a1+a2;
a1 = temp;
}
printf("sum=%d",a2);
}
啊是‘对‘ 结果除以2就行了 46368
yjh19961228
发表于 2019-7-1 09:38:42
3
w7813396
发表于 2019-7-1 18:45:07
我爱你小甲鱼
996982937
发表于 2019-7-1 20:57:53
0.100个
1.9个
2.c=5;b=c;a=b;
3.a=3
b=5
c=9
4.z=x?x>=0:z=-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)
{
stage2: printf("count = %d\n", count);
}
count++;
scanf("%d", &score);
重楼倚城隅
发表于 2019-7-1 22:36:03
1