#include <iostream>
using namespace std;

class Shop {
private:
    int price;
    int quantity;
public:
    Shop(int p, int q) : price(p), quantity(q) {}

    double finalPrice() {
        double total = price * quantity;
        if (total >= 100000) total *= 0.8;
        else if (total >= 50000) total *= 0.9;
        return total;
    }
};

int main() {
    int p, q;
    cin >> p >> q;
    Shop shop(p, q);
    cout << "최종 결제 금액: " << shop.finalPrice() << endl;
}

Embed on website

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