#include <iostream>
using namespace std;

class Car {
private:
    string brand;
    int speed;

public:
    Car(string b, int s) {
        brand = b;
        speed = s;
    }

    void setcar(string b, int s) {
        brand = b;
        speed = s;
    }

    void printcar() {
        cout << "브랜드: " << brand << ", 속도: " << speed << " km/h" << endl;
    }
};

int main() {
    Car c("BMW", 100);
    c.printcar();
    return 0;
}

Embed on website

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