Advertisement
Guest User

AWP: 11 Variablen -- 9. Bogenmaß und Grad

a guest
Apr 18th, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. /**
  6.   * 9. Ändern Sie die Umrechnung so, dass Bodenmaß in Grad umgerechnet werden!
  7.   *
  8.   */
  9.  
  10. int main() {
  11.     /*
  12.      * VARIABLES
  13.      */
  14.     float f_bogenmass;
  15.     float f_grad;
  16.  
  17.     /*
  18.      * INPUT
  19.      */
  20.     cout << "Berechnung einen Winkel in Bogenmass in Grad." << endl;
  21.     cout << "Bitte geben Sie den Winkel in Bogenmass ein: ";
  22.     cin >> f_bogenmass;
  23.  
  24.     /*
  25.      * LOGIC
  26.      */
  27.     f_grad = f_bogenmass * 180 / 3.1416;
  28.  
  29.     /*
  30.      * OUTPUT
  31.      */
  32.     cout << endl;
  33.     cout << "ERGEBNIS" << endl;
  34.     cout << f_bogenmass << " Bogenmass sind " << f_grad << " Grad" << endl;
  35.  
  36.     /*
  37.      * END OF PROGRAM
  38.      */
  39.     getchar();
  40.     getchar();
  41.     return (0);
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement