-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathitf.cpp
More file actions
37 lines (34 loc) · 1.04 KB
/
itf.cpp
File metadata and controls
37 lines (34 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <iostream>
#include <cmath>
#include <iomanip>
int main()
{
double value, result;
int choice;
std::cout << "Enter a choice " << std::endl;
std::cout << "1. Inverse Sine" << std::endl;
std::cout << "2. Inverse Cosine" << std::endl;
std::cout << "3. Inverse Tangent" << std::endl;
std::cin >> choice;
switch (choice) {
case 1:
std::cout << "Enter a value ";
std::cin >> value;
std::cout << "asin(val) = " << std::setprecision(3)
<< asin(value) << std::endl;
break;
case 2:
std::cout << "Enter a value ";
std::cin >> value;
std::cout << "acos(val) = " << std::setprecision(3)
<< acos(value) << std::endl;
break;
case 3:
std::cout << "Enter a value ";
std::cin >> value;
std::cout << "atan(val) = " << std::setprecision(3)
<< atan(value) << std::endl;
break;
}
return 0;
}