#include <iostream>
using namespace std;

class Rectangle {
public:
    int width;
    int height;

    void type() {
    if (width > 0 && height > 0) {
        if (width == height) {
            cout << "정사각형" <<endl;
        }else{
            cout << "직사각형" <<endl;
        }
    }else{
            cout << "잘못된 도형"<<endl;
         }

    }
};

int main() {
    Rectangle r;

    cin >> r.width;
    cin >> r.height;
    r.type();
}

Embed on website

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