您的位置:首页 > 其它

The 8th Zhejiang Provincial Collegiate Programming Contest / B - Conic Section

2011-04-16 18:15 483 查看
 返回目录

 

代码:

]#include<cstdio>
#include<cstring>
using namespace std;

void solve()
{
if(a!=0&&c!=0&&a==c)
printf("circle/n");
else if(a!=0&&c!=0&&a!=c&&a*c>0)
printf("ellipse/n");
else if((a==0&&c!=0&&d!=0)||(a!=0&&c==0&&e!=0))
printf("parabola/n");
else if(a!=0&&c!=0&&a!=c&&(a*c)<0)
printf("hyperbola/n");
}
double a, b, c, d, e, f;
int main()
{
int t;
scanf("%d", &t);
while(t--)
{
scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f);
solve();
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  c
相关文章推荐