Advertisement
Spocoman

Movie Tickets

Sep 21st, 2023
592
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int a1 ,a2 ,n;
  7.     cin >> a1 >> a2 >> n;
  8.  
  9.     for (int i = a1; i < a2; i++) {
  10.         for (int x = 1; x < n; x++) {
  11.             for (int y = 1; y < n / 2; y++) {
  12.                 if (i % 2 == 1 && (i + x + y) % 2 == 1) {
  13.                     cout << (char)i << "-" << x << y << i << endl;
  14.                 }
  15.             }
  16.         }
  17.     }
  18.  
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement