Skip to content

Commit

Permalink
이슈 #318에서 솔루션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 19, 2024
1 parent 8a9db74 commit 7253591
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Programmers/옷가게_할인_받기.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <string>
#include <vector>
using namespace std;

int solution(int price) {
if (price >= 500000) {
return price * 0.8;
}
if (price >= 300000) {
return price * 0.9;
}
if (price >= 100000) {
return price * 0.95; // 5% 할인
}
return price;
}

0 comments on commit 7253591

Please sign in to comment.