Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1.     float x ;
  2.     const float rabatt = 0.1;
  3.     const int rabattgrenze = 100;
  4.  
  5.  
  6.  
  7.   cout<< " Geben Sie den Wert ein :"<< endl;
  8.   cin >> x;
  9.  
  10.     if(x > 100) {
  11.  
  12.         cout << "Gesamtpreis: " << x - (x * rabatt) << endl;
  13.  
  14.     } else {
  15.  
  16.     if ((x >= 90) && (x < 100))
  17.     {
  18.  
  19.        cout << "Gesamtpreis: 90€" << endl;
  20.  
  21.     } else {
  22.          cout << "Gesamtpreis: " << x << endl;
  23.  
  24.     }
  25.  
  26.  
  27.  
  28.     }
  29.  
  30.  
  31. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement