Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- /**
- * 8. Es soll ein Winkel in Grad einlesen und in Bogenmaß ausgegeben werden!
- * 90º -> 1.57 Bogenmaß [ sin(1.57) = 1 ]
- * 45º -> 0.79 [ sin(0.79) = 0.71 ]
- * -277º -> -4.83 [ sin(-4.83) = 0.99 ]
- *
- */
- int main() {
- /*
- * VARIABLES
- */
- float f_grad;
- float f_bogenmass;
- /*
- * INPUT
- */
- cout << "Berechnung einen Winkel in Grad in Bogenmass." << endl;
- cout << "Bitte geben Sie den Winkel in Grad ein: ";
- cin >> f_grad;
- /*
- * LOGIC
- */
- f_bogenmass = f_grad / 180 * 3.1416;
- /*
- * OUTPUT
- */
- cout << endl;
- cout << "ERGEBNIS" << endl;
- cout << f_grad << " Grad sind " << f_bogenmass << " Bogenmass" << endl;
- /*
- * END OF PROGRAM
- */
- getchar();
- getchar();
- return (0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement