如题,题主是个超级菜鸟的新手,已经改对了一道题了,实在是剩下的不知道错哪了。
救救!
下面是我的代码
(跪谢)
#include<stdio.h>
#include<math.h>
#include<iostream>
#define PI 3.141593
using namespace std;
int main ()
{
char x;
x=getchar();
if(x=='1')
printf("I love Luogu!");
else if(x=='2')
printf("6 4");
else if(x=='3')
printf("3\n12\n2\n");
else if(x=='4'){
float y;
y=500/3.0;
printf("%3.3f",y);
}
else if(x=='5'){
int t;
t=(260+220)/32;
printf("%d",t);
}
else if(x=='6'){
float l;
l=sqrt(6*6+9*9);
cout << l << endl;
return 0;
}
else if(x=='7'){
int one,two,three;
one=100+10;
two=one-20;
three=two-two;
printf("%d\n%d\n%d\n",one,two,three);
}
else if(x=='8'){
int r=5;
double C,S,V;
C=2*PI*r;
S=PI*r*r;
V=4.0/3*PI*r*r*r;
cout<<C<<"\n"<<endl;
cout<<S<<"\n"<<endl;
cout<<V<<"\n"<<endl;
}
else if(x=='9'){
int e,f,g,h;
h=1;
g=(h+1)*2;
f=(g+1)*2;
e=(f+1)*2;
printf("%d",e);
}
else if(x=='10'){
int z,m,v;
z=(240-60)/24;
m=240-30*z;
v=(m+10*z)/10;
printf("%d",v);
}
else if(x=='11'){
int T;
T=100/3;
printf("%d",T);
}
else if(x=='12'){
printf("13\nQ");
}
else if(x=='13'){
double tiji;
tiji=4.0/3*PI*4*4*4;
double L=pow(tiji,1.0/3);
printf("%.0ld",L);
}
else{
double price;
price=(100-sqrt(100*100-4*2400))/2;
printf("%.0lf",price);
}
return 0;
}