how to calculate trigonometric values in c++
C++
*
* C++ Program to Illustrate Trigonometric functions
*/
#include <iostream>
#include <iomanip>
#include <cmath>
const double PI = 3.14159265;
int main()
{
double degrees, radians;
std::cout << "Enter angle in degrees ";
std::cin >> degrees;
// Trigonometric functions accept angles in radians
radians = degrees * PI / 180.0;
std::cout << "Value of trigonometric ratios " << std::endl;
std::cout << "cos(radians) = " << std::setprecision(3)
<< cos(radians) << std::endl;
std::cout << "sin(radians) = " << std::setprecision(3)
<< sin(radians) << std::endl;
std::cout << "tan(radians) = " << std::setprecision(3)
<< tan(radians) << std::endl;
return 0;
}
Also in C++:
- Title
- opencv compile c++
- Category
- C++
- Title
- matrix multiplication c++ eigen
- Category
- C++
- Title
- convert integer to string c++
- Category
- C++
- Title
- c++ string^ to char*
- Category
- C++
- Title
- regexp_like oracle c++
- Category
- C++
- Title
- how to convert a string to a double c++
- Category
- C++
- Title
- maximum subarray sum equal with K in c++
- Category
- C++
- Title
- c++ initialization list
- Category
- C++
- Title
- how to turn int into string c++
- Category
- C++
- Title
- binary tree search
- Category
- C++
- Title
- c++ read matttrix from text file
- Category
- C++
- Title
- if vector contains value c++
- Category
- C++
- Title
- what is time complexity of min_element()
- Category
- C++
- Title
- what is difference between ciel and floor
- Category
- C++
- Title
- rosrun actionlib_msgs genaction.py
- Category
- C++
- Title
- sort function in c++
- Category
- C++
- Title
- c++ ternary operator
- Category
- C++
- Title
- namespace file linking c++
- Category
- C++
- Title
- recursion in cpp with reference
- Category
- C++
- Title
- int to float c++
- Category
- C++
- Title
- level order traversal
- Category
- C++
- Title
- c++ variable arguments
- Category
- C++
- Title
- caesar cipher program in c++
- Category
- C++
- Title
- unordered_map c++ insert
- Category
- C++
- Title
- recursive in c++
- Category
- C++
- Title
- c++ string to stream
- Category
- C++
- Title
- clear file before writing c++
- Category
- C++
- Title
- how to write an or in c++
- Category
- C++
- Title
- array<string, 7> c++
- Category
- C++
- Title
- variabili in c++
- Category
- C++
- Title
- compare function in sort c++ stl
- Category
- C++
- Title
- c++ server service ros
- Category
- C++
- Title
- substr c++
- Category
- C++
- Title
- c++ throw exception
- Category
- C++
- Title
- sqrt in c++
- Category
- C++
- Title
- two sum problem in c++
- Category
- C++
- Title
- shortest path with bfs in c++
- Category
- C++
- Title
- get elements of 2d array c++
- Category
- C++
- Title
- count a character in a string c++
- Category
- C++
- Title
- UPARAM(ref)
- Category
- C++
- Title
- is TLE means my code is correct but taking more time to computr
- Category
- C++
- Title
- Runtime Error: Runtime ErrorAbort signal from abort(3) (SIGABRT)
- Category
- C++
- Title
- Rectangle area hackerrank solution in c++
- Category
- C++
- Title
- unordered_set in c++ and ordered set diff
- Category
- C++
- Title
- c++ compare char
- Category
- C++
- Title
- length of string in c++
- Category
- C++
- Title
- c++ string to int
- Category
- C++
- Title
- kruskal's algorithm c++ hackerearth
- Category
- C++
- Title
- c++ files
- Category
- C++
- Title
- statement that causes a function to end in c++
- Category
- C++
- Title
- remove element by index from vector c++
- Category
- C++
- Title
- calling by reference and pointers c++
- Category
- C++
- Title
- c++ get type name of object
- Category
- C++
- Title
- min coin change problem dp
- Category
- C++
- Title
- find_if c++
- Category
- C++
- Title
- how to include seld declared header file in c++
- Category
- C++
- Title
- singleton c++
- Category
- C++
- Title
- convert stirng to int c++
- Category
- C++
- Title
- placement new c++
- Category
- C++
- Title
- c++ function return array
- Category
- C++
- Title
- double ended queue in c++ stl
- Category
- C++
- Title
- google spreadsheets add two strings
- Category
- C++
- Title
- RLE Encoding/Compression c++
- Category
- C++
- Title
- c++ std::copy to cout
- Category
- C++
- Title
- new class * [] c++
- Category
- C++
- Title
- c++ functions
- Category
- C++
- Title
- sort a string alphabetically c++
- Category
- C++
- Title
- c++ dereference a pointer
- Category
- C++
- Title
- convert int to binary string c++
- Category
- C++
- Title
- char* to int in cpp
- Category
- C++
- Title
- graph using djacency matrix c++
- Category
- C++
- Title
- c++ declare variable
- Category
- C++
- Title
- check if key exists in map c++
- Category
- C++
- Title
- how to sort in descending order c++
- Category
- C++
- Title
- c++ vector lower_bound index
- Category
- C++
- Title
- newline in c++
- Category
- C++
- Title
- create new file c++
- Category
- C++
- Title
- c++ get last element in vector
- Category
- C++
- Title
- fast input output in c++
- Category
- C++
- Title
- ceil in c++
- Category
- C++
- Title
- properties of a set c++
- Category
- C++
- Title
- c++ remove space from string
- Category
- C++
- Title
- switch case sinax c++
- Category
- C++
- Title
- declaring 2d vector in c++
- Category
- C++
- Title
- Find the duplicate in an array of N integers.
- Category
- C++
- Title
- vertical traversal of binary tree
- Category
- C++
- Title
- stringstream in c++
- Category
- C++
- Title
- appending a double to a string c++
- Category
- C++
- Title
- pointer related problems dangling/wild pointers c++
- Category
- C++
- Title
- find in set of pairs using first value cpp
- Category
- C++
- Title
- new c++
- Category
- C++
- Title
- c++ lettura file
- Category
- C++
- Title
- simple timer arduino blynk library error
- Category
- C++
- Title
- split string at index c++
- Category
- C++
- Title
- how to input multiple lines of a file in c++
- Category
- C++
- Title
- convert decimal to binary in c++
- Category
- C++
- Title
- initialization list c++
- Category
- C++
- Title
- c++ program for addition of two numbers using functions
- Category
- C++
- Title
- sqrt cpp
- Category
- C++
- Title
- pair in c++
- Category
- C++