From f13b9bbb632b8244b5faa4cdef8eb619f46f9336 Mon Sep 17 00:00:00 2001 From: Himanshi Gupta <86647588+HimanshiGupta010@users.noreply.github.com> Date: Sun, 10 Oct 2021 23:53:04 -0700 Subject: [PATCH] Create ModifiedDiscount.cpp --- ModifiedDiscount.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 ModifiedDiscount.cpp diff --git a/ModifiedDiscount.cpp b/ModifiedDiscount.cpp new file mode 100644 index 0000000..60bd07e --- /dev/null +++ b/ModifiedDiscount.cpp @@ -0,0 +1,32 @@ +#include +using namespace std; + +int main() +{ + + float pay,discount; + + cout << "Enter Payment amount : "; + cin >> pay; + + if (pay > 10000) + { + discount=pay*25/100; + } + + else if (pay > 5000) + { + discount=pay*15/100; + } + + else if (pay > 3000) + { + discount=pay*10/100; + } + + else + discount= 0; + + cout << "Discount is -> " << discount << endl; +return 0; +}