#include <iostream>
#include <string>
using namespace std;

class Cinema {
public:
    string title;
    int seats;

    Cinema(string t, int s) : title(t), seats(s) {}

    void reserve(int count) {
        if (count > seats)
            cout << "예약 불가" << endl;
        else
            seats -= count;
    }
};

int main() {
    Cinema c("Avengers", 2);
    c.reserve(3);
    cout << "남은 좌석: " << c.seats << endl; // 2
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: