-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest2.cpp
More file actions
31 lines (21 loc) · 835 Bytes
/
test2.cpp
File metadata and controls
31 lines (21 loc) · 835 Bytes
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
//Logan Wultsch-Fuller
//Last Modified: 1/25/2023
// Program used to understand sine, cosine, and tangent //
#include <cmath>
#include <iostream>
using namespace std;
int main(){
float num_frac; //variable for the numerator of a fraction
float den_frac; //variable for the denominator of a fraction
float frac; //variable for fraction // numerator/denominator
float pi_times_fraction; //variable for the decimal representation of the fraction multiplied by pi
cout << " Enter the numerator of the fratcion ";
cin >> num_frac;
cout<< " Enter the denominator of the fraction ";
cin >> den_frac;
frac = num_frac / den_frac;
pi_times_fraction = frac * M_PI;
sin(M_PI);
cout << " Fraction entered " << frac << " Pi multiplied by fraction " << pi_times_fraction << " pi " << M_PI << endl;
return 0;
}