From acb331c8e0400f551713781befd94853a95b8e48 Mon Sep 17 00:00:00 2001 From: varunmukherjee1 Date: Mon, 11 Oct 2021 10:49:47 +0530 Subject: [PATCH 1/2] Errors have been resolved --- Discount.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Discount.cpp b/Discount.cpp index 69cd677..38af281 100644 --- a/Discount.cpp +++ b/Discount.cpp @@ -1,32 +1,29 @@ -#include -using namespace stdd; +#include +using namespace std; int main() { float pay,discount; - cout << "Enter Payment amount : " - cout >> pay; + cout<<"Enter Payment amount : "; + cin>>pay; - if (p > 10000) + if (pay > 10000) { - discount=pay*25/100 + discount=pay*25/100; } - else if (pay > 5000) { discount=pay*15/100; } - else if (pay > 3000) { discount=pay*10/100; } - else - discount= 0; + discount= 0; - cout << "Discount is -> " << pay << endl; + cout << "Discount is -> " << discount << endl; } From 0c0e85eda1ba5465a06b33c422c6244d4cbe14fe Mon Sep 17 00:00:00 2001 From: varunmukherjee1 Date: Mon, 11 Oct 2021 13:40:30 +0530 Subject: [PATCH 2/2] return statement added --- Discount.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Discount.cpp b/Discount.cpp index 38af281..f15f77a 100644 --- a/Discount.cpp +++ b/Discount.cpp @@ -26,4 +26,5 @@ int main() cout << "Discount is -> " << discount << endl; + return 0; }