罪是没有给出正确的价值

Sin is not giving the correct value

本文关键字:      更新时间:2023-10-16
#include <iostream>
#include <cmath>
Using namespace std;
void main ()
{
   double z,a;
   cout <<"input a"<<endl;
   cin>>a;
   z=sin (a);
   cout <<"z="<<z <<endl;
   system("pause");
}

当我输入值为 90 的变量 a 时,它给我 0.893997当我使变量 int 或 float 时,它会给出相同的值

"sin"的输入以弧度为单位(http://en.cppreference.com/w/cpp/numeric/math/sin)

所以答案是,事实上,正确的

相关文章:
  • 没有找到相关文章