查看
wxl
0.10
1.0
2.a,b,c
3.b=5,c=4,a=9
4.if(x>=0)
{
z=x;
}
else
{
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.readin:
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
scanf("%d", &score);
啊
0 10次
1 11次
2 a
3a=14 ,b=5,c=8
4 z=x>0?x:-x
5 if (size > 12)
{
cost = cost * 1.05;
flag = 2;
}
bill = cost * flag;
if (ibex > 14)
{
sheds = 3;
}
sheds = 2;
help = 2 * sheds;
readin: scanf("%d", &score);
while(score>=0)
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
最后一题是一道伦理学问题,生下来的是公是母也会影响结果吧
答案
1
1
{:10_277:}
嘿嘿嘿
跟不上
0:10次;
1:不会打印字母B;
2:char a=5; char b=5;char c=5;
3:a=14,b=4,c=10;
4:abc(int i);
5:
A:
if(size>12)
{
cost=cost*1.05;
flag=2;
break;
}
else
{
bill=cost*flag;
}
B:
if(ibex>14)
{
sheds=3;
break;
}
else
{
sheds=2;
help=2*sheds;
}
C:
while(score<0)
{
count ++;
readin:scanf("%d",&score);
}
stage2:printf("count=%d\n",count);
#include <stdio.h>
#include <stdlib.h>
#define MONEY 4000000
int main()
{
int n = 0;
float jiayu = MONEY;
do
{
jiayu -= 500000;
jiayu += jiayu * 0.08;
n++;
} while(jiayu >= 0);
printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗……\n",n);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int fenzi = 1, fenmu = 1;
double pi = 0.0, i = 1;
do
{
pi = pi + i;
fenmu += 2;
fenzi = -fenzi;
i = fenzi / (double)fenmu;
}while (fabs(i) >= 1e-8);
printf("i = %-10.8f\n",i);
printf("i = %-10.8f\n",pi);
pi = pi * 4;
printf("PI = %10.7f\n",pi);
system("pause");
return 0;
}
100
0
a,b,c
11,11,11
x >= 0?z =x;z = -x;
棒
测试题:
0.100次;
1.0;
2. c=5;b=c;a=b;
3.a=15;b=4; c=15;
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;
}
else
{
sheds = 2;
help = 2 * sheds;
}
C:
if (score < 0)
{
printf("count = %d\n", count);
}
else
{
count++;
scanf("%d", &score);
}
动动手:
0.代码如下:
#include <stdio.h>
int main()
{
int i=1;
float sjy;
float shy=10000;
while(1)
{
shy=shy*1.05;
sjy=(i*0.1+1)*10000;
if(shy>=sjy)
{
printf("在第%d年黑夜超过小甲鱼\n",i);
break;
}
printf("正在计算,i==%d年\n",i);
i=i+1;
}
return 0;
}
1.代码如下:
#include <stdio.h>
int main()
{
float sum=400;
int i=1;
while(1)
{
sum=(sum-50)*(0.08+1);
if(sum<=0)
{
printf("%d年后,小甲鱼重新一贫如洗",i);
break;
}
i=i+1;
}
return 0;
}
2.代码如下:
#include <stdio.h>
#include <math.h>
int main()
{
double sum=0;
double i;
double m;
int j;
j=1;
for(i=1.0000000000,j=1;i<100000000;j++)
{
m=fabs(1.0000000000/i);
if(j%2==0)
{
m=-m;
}
sum=sum+m;
printf("%.10f,%.10f,%d,%.10f\n",i,m,j,sum);
i=i+2.0000000000;
}
sum=sum*4.0000000000;
printf("PI的值约为~~%.7f",sum);
return 0;
}
3.代码如下:
#include <stdio.h>
int main()
{
int a=0;
int b=1;
int t;
int i;
for(i=1;i<=24;i++)
{
printf("Fibonacci数列的值依次为:%d月份 %d对\n",i,b);
t=a+b;
a=b;
b=t;
}
return 0;
}
想看