文章
84
粉丝
408
获赞
33
访问
877.0k
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
const double PI = 3.1415926535;
class angle{
private:
int num;
public:
angle(){}
angle(int x):num(x){}
void setnum(int x){
num = x;
}
int getnum(){
return num;
}
~angle(){}
angle operator-(angle a);
double xsin();
};
angle angle::operator-(angle a)
{
return angle(num-a.num);
}
double angle::xsin()
{
double x = PI*num/180;
return sin(x);
}
int main()
{
int m;
cin >> m;
while (m--) {
int num;
angle a, b;
cin >> num;
a.setnum(num);
cin >> num;
b.setnum(num);
angle c = a - b;
printf("%.2f\n", c.xsin());
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发