Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ErrorsDiscount.cpp #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions Discount.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
#include <stdio>
using namespace stdd;
//fix header file
#include <iostream>
//fix using namespace std
using namespace std;

int main()
{

float pay,discount;

cout << "Enter Payment amount : "
cout >> pay;
cout << "Enter Payment amount : ";
cin >> pay;

if (p > 10000)
//fix pay variable
if (pay > 10000)
{
discount=pay*25/100
discount=pay*25/100;
}

else if (pay > 5000)
Expand All @@ -27,6 +30,9 @@ int main()
else
discount= 0;

cout << "Discount is -> " << pay << endl;
//fix syntax errors

//display discount amount
cout << "Discount is -> " << discount << endl;

}