[c]代码库
#include <stdio.h>
#include<math.h>
int main()
{ /*float r,p;
int n,i;
i=1;
p=1.00;
scanf("%f%d",&r,&n);
for(i=0;i<n;i++)
p=p*(1+r);
printf("%lf\n",p);*/
/*3-2
float r,p,i;
int n;
scanf("%f%d",&p,&n);
if(n=1)
for(i=0;i<n;i++)
p=p*(1+0.00414);
if(n=2)
{
p=p*(1+2*0.00468);
p=p*(1+3*0.0054);
}
if(n=3)
{ p=p*(1+3*0.0054);
p=p*(1+2*0.00468);
}
if(n=4)
for(i=0;i<5;i++)
p=p*(1+0.0072/4);
if(n=5)
p=p*(1+0.0585);
printf("p=%f\n",p);*/
/*3-5
int a,b;
float x,y;
char c1,c2;
scanf("%d%d",&a,&b);
scanf("%f%f",&x,&y);
scanf("%c%C",&c1,&c2);
printf("a=%d\nb=%d\nx=%f\ny=%f\nc1=%c\nc2=%c\n",a,b,x,y,c1,c2);*/
/*3-6
char c1,c2,c3,c4,c5;
scanf("%c%c%c%C%c",&c1,&c2,&c3,&c4,&c5);
c1=c1+4;
c3=c3+4;
c4=c4+4;
c2=c2+4;
c5=c5+4;
printf("%c%c%c%C%c\n",c1,c2,c3,c4,c5);*/
/*3-7
float r,h,s,v,l,pi;
scanf("%f%f",&r,&h);
pi=3.14159;
l=2*pi*r;
s=2*pow(r,2)*pi;
v=2*pow(r,2)*h*pi;
printf("L=%f\nS=%f\nV=%f\n",l,s,v);*/
/*3-8
char c1,c2,c;
c1=getchar();
c2=getchar();
putchar(c1);
putchar(c2);
putchar('\n');*/
return 0;
}
by: 发表于:2017-08-10 09:26:22 顶(0) | 踩(0) 回复
??
回复评论