|
发表于 2021-12-6 11:07:24
|
显示全部楼层
0.
100
1.
10
2.
a,b,c
3.
b=5 c=9 a=14
4.
z=(x>0?x:(-x))
5.
if (size > 12)
{cost = cost * 1.05;}
bill = cost * flag;
B.
if (ibex > 14)
{
sheds = 3;
}
sheds = 2;
help = 2 * sheds;
C.
readin: scanf("%d", &score);
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
readin: scanf("%d", &score);
0.
#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
int n,m1=10000,m0=10000;
for(n=0;m1>=m0;n++)
{
m1+=10000*0.1;
m0*=1.05;
}
cout<<n<<'\n'<<m1<<'\n'<<m0;
return 0;
}
1.
#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
int n,a=4000000;
for(n=0;a>=500000;n++)
{
a=(a-500000)*1.08;
}
cout<<n;
return 0;
}
2.
#include<stdio.h>
int main()
{
double PI=0.0,n,k=1;
for(n=1;1/n>0.00000001;n+=2)
{
PI=PI+k*(1/n);
k=-k;
}
printf("PI=%.7f",4*PI);
return 0;
}
3.
找不出函数关系式
|
|