#include <iostream>
#define PRICE a=250000,b=1200000
using namespace std;
int order(int Q,int A,int D,int T);
void main()
{
int qty,amount,discount,total;
cout<<"상품명 : 1.mp3 플레이어n"
<<"가 격 :"<<PRICE a<<"원n";
cout<<"상품명 : 2.노트북n"
<<"가 격 :"<<PRICE b<<"원n";
//여기서 입력받아야함
//int select1; <-mp3인지 노트북인지 판단하기위한 변수
//cin>>select1; <<-입력을 받는거지
/* cout<<"주문수량 : ";
cin>>qty;
if(select1 ==1){ //입력을 1또는 2를 받았을꺼 아냐 그러면 1을 입력하면 250000*입력된 수량을 amount변수에 넣겠지
amount = PRICE a*qty;
}
else if(select1 ==2){
amount = PRICE b*qty;
}*/
//amount = PRICE*qty; <- 이건 if문으로 계산했으니까 필요없고필요없을듯
if(amount>=1000000) //amount 위에서 계산했으니까 나오겠지
discount = 100000; //그리고 이거말인데 할인 10%면 현재 가격에서 10%하는거 아닌가 ㅋㅋㅋ discount += (amount / 10);
else if(amount>=500000)
discount = 50000;
else
discount = 0;
total = amount-discount;
cout<<"********************"
<<"n상품명 : mp3 플레이어"
<<"n주문수량 : "<<qty
<<"n주문액 : "<<amount<<"원"
<<"n할인액 : "<<discount<<"원"
<<"n지불액 : "<<total<<"원"<<endl;
}
나도 병신이니까 그냥 참고만
형님 고마워요,, 도움주셔서..!!