Program of Sales Tax 6% in C++

 Write a program in C++ language : 

A customer in a store is purchasing five items. The prices of the five items are: 

Price of item 1 = $12.95 

Price of item 2 = $24.95 

Price of item 3 = $6.95 

Price of item 4= $14.95 

Price of item 5 = $3.95 

Write a program that 

(1)Holds the prices of the five items in five variables.

(2)Display each items price, the subtotal of the sale, the amount of sales tax, and the total.

 Assume the sales tax is 6%.


****************************************************************************************************************************************************************************************************************


# include <iostream>

using namespace std;

int main()

{

float a=12.95,b=24.95,c=6.95,d=14.95,e=3.95,f,g,h;

cout<<"|| PURCHASING STORE APP ||"<<endl;

cout<<"\tPrice of item 1 = $ "<<a<<endl;

cout<<"\tPrice of item 2 = $ "<<b<<endl;

cout<<"\tPrice of item 3 = $ "<<c<<endl;

cout<<"\tPrice of item 4 = $ "<<d<<endl;

cout<<"\tPrice of item 5 = $ "<<e<<endl;

cout<<endl;

cout<<"\tTotal Items Purshased is 5\n"<<endl;

f=a+b+c+d+e;                             // total sum

g=f*0.06;                                    //formula for 6% of tax

h= f+g;

cout<<"\t Total Amount with 6% Tax Is = $"<<h<<endl;

return 0;

}


*************************************************************************
*************************************************************************


OUTPUT :







NOTE : In  BScs PF LAB #1 Task in Basic C++ 

Comments