|
发表于 2022-2-3 19:12:32
|
显示全部楼层
/* 测 0.110
1. 11
2. a
3. a=13 b=4 c=9
4. if(x<0){x=-x;
}else{
x=x;}
z=x;
5.
A:
if(size>12){
cost=cost*1.05;
flag=2;
}else{
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++;
readin:scanf("%d",&score);
*/
/*
#include <stdio.h>
#define b 10000
#define xp 0.1
#define hp 0.05
int main(){
double x=b,h=b;
int i;
for(i=1;;i++){
x=x+xp*b;
h=h+h*hp;
if(h>x){
printf("%d年后 , 黑夜的投资额超过小甲鱼 !\n",i);
printf("小甲鱼的投资额是 : %.2lf\n",x);
printf("黑夜的投资额是 : %.2lf",h);
break;
}
}
return 0;
}*/
/*1.
#include <stdio.h>
int main(){
double b=4000000,p=500000,i=0.08;
int j;
for(j=1;;j++){
b=b-p;
b=b+b*i;
if(b<=0){
printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗......",j);
break;
}
}
return 0;
}*/
/*
#include <stdio.h>
#include <math.h>
int main(){
double d,p,s=0,flag=1;
for(d=1;;d+=2){
if(flag=-1){
d=-d;
}
p=1/d;
s+=p;
flag=-flag;
if(fabs(p)<pow(10,-8)){
break;
}
}
printf("Pi等于%.7lf",s*4);
return 0;
}*/
|
|