Advertisement
JOHNYTHEWINNER

Simple cinema example

Jan 26th, 2020
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. # include <iostream>
  2. using namespace std;
  3. #include <iomanip>
  4. #include <math.h>
  5. #include <cmath>
  6.  
  7.  
  8.  
  9. int main()
  10. {
  11.     int rows;
  12.     int columns;
  13.     string projection;
  14.     cin >> projection;
  15.     cin >> rows;
  16.     cin >> columns;
  17.     int seats = rows * columns;
  18.     if (projection == "Premiere")
  19.     {
  20.         cout << fixed << setprecision(2) << (seats *12.00) << endl;
  21.         cout << "leva" << endl;
  22.     }
  23.     else if (projection == "Normal")
  24.     {
  25.         cout << fixed << setprecision(2) << (seats * 7.50) << endl;
  26.         cout << "leva" << endl;
  27.     }
  28.     else
  29.     {
  30.         cout << fixed << setprecision(2) << (seats * 5.00) << endl;
  31.         cout << "leva" << endl;
  32.     }
  33.  
  34.  
  35.    
  36.  
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement