Ellipse
不能用float
#include<stdio.h> #include<math.h> #include<stdlib.h> int main() { int a,b,i,j,n,s,t; double re,ans,ant; scanf("%d",&n); while(n--) { scanf("%d%d%d%d",&a,&b,&s,&t); ant=acos(t/(float)a); ans=acos(s/(float)a); re=a*b*((sin(2*ant)-sin(2*ans))/2-(ant-ans)); printf("%.3f/n",re); } //system("pause"); }
posted on 2010-07-15 18:47 草头菜 阅读(90) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 草头菜 Powered by .NET 8.0 on Kubernetes