#include <iostream>
using namespace std;

class Book {
public:
    string name;
    int page;

    void isLongBook() {
    if (page > 0) {
        if (page >= 300) {
            cout << "장편소설" <<endl;
        }else{
            cout << "단편소설" <<endl;
        }
    }else{
            cout << "잘못된 입력"<<endl;
         }

    }
};

int main() {
    Book b;

    cin >> b.name;
    cin >> b.page;
    b.isLongBook();
}

Embed on website

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