Horje
trig in c++ Code Example
trig in c++
// C++ code to demonstrate the example of 
// trigonometric functions

#include <iostream>
#include <cmath>
using namespace std;

// main() section
int main()
{
    float x;
    float y;
    
    x = 0.25;
    cout<<"cos("<<x<<") : "<<cos (x)<<endl;
    cout<<"sin("<<x<<") : "<<sin (x)<<endl;
    cout<<"tan("<<x<<") : "<<tan (x)<<endl;
    cout<<"acos("<<x<<"): "<<acos(x)<<endl;
    cout<<"asin("<<x<<"): "<<asin(x)<<endl;
    cout<<"atan("<<x<<"): "<<atan(x)<<endl;
    y = 1.0;
    cout<<"atan2("<<y<<","<<x<<"): "<<atan2(y,x)<<endl;    
    
    return 0;
}




Cpp

Related
c++ regex to validate indian phone number pattern Code Example c++ regex to validate indian phone number pattern Code Example
how to bath without water Code Example how to bath without water Code Example
c++ list of pairs Code Example c++ list of pairs Code Example
Hash Sort in C++ Code Example Hash Sort in C++ Code Example
c++ enum Code Example c++ enum Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
14