Horje
c++ program to calculate discount Code Example
c++ program to calculate discount
/*no:Departmental store offers 2.5% discount on shopping of 20,000
and more Rs. 1.5% discount on shopping of 5000 Rs and more.
and no discount on shopping of less than 5000Rs to those customer who have
membership cards. Design a program that accepts total bill
of buyer and membership card(Y/N) as input and calculates amount to be paid after
applying discount?*/

#include<iostream>
using namespace std;
int main()
{
	float a;
	char b;
	cout<<"Enter a Total bill=";
	cin>>a;
	cout<<"Do you a Membership card=";
	cin>>b;
	if(a>=2000&&b=='y')
	{
		cout<<a-(a*2.5/100);
	}
	else if(a>=5000&&b=='y')
		{
			cout<<a-(a*1.5/100);
		}
	else
	cout<<a;
}




Cpp

Related
what is the system function in c++ Code Example what is the system function in c++ Code Example
1ll Code Example 1ll Code Example
reference variablesr in c++ Code Example reference variablesr in c++ Code Example
C is widely used for systems-level software and embedded systems development. Code Example C is widely used for systems-level software and embedded systems development. Code Example
print hola mundo Code Example print hola mundo Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8