Program to calculate tax - c++, C/C++ Programming

Assignment Help:

Program to calculate tax:

float tax (float) ;

int main()

{

                float purchase, tax_amt, total;

                cout << "\nAmount of purchase: ";

                cin >> purchase;

 

                tax_amt = tax(purchase);

                total = purchase + tax_amt;

                cout.precision(2);

                cout << "\nPurchase is: " << purchase;

                cout << "\nTax: " << tax_amt;

                cout << "\nTotal: " << total;

 

                return 0;

}

float tax (float amount)

    {

        float rate = 0.065;

                return(amount * rate);

    }


Related Discussions:- Program to calculate tax - c++

Memory management by c program, Memory management by c program: Write ...

Memory management by c program: Write a program to memory management in c program unsigned max( unsigned, unsigned );   int BaseMemBlocks::allocBlock( size_t sz )

Integer parameters, write a static method with one integer parameter, x tha...

write a static method with one integer parameter, x that returns the value of the polynomial 3x(2)- 7x + 2

Decode the code, Smugglers are becoming very smart day by day. Now they hav...

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Can a copy constructor admit an object of the similar class , Can a copy co...

Can a copy constructor admit an object of the similar class as parameter, rather than reference of the object?

Source code for decoe to code, i am using mobile phone if i want to communi...

i am using mobile phone if i want to communicate via massage but that should be very secret

Write a program to illustrate array, Write a Program to illustrate Array? ...

Write a Program to illustrate Array? int x[100]; char text[80]; float temp[30]; static int marks[5]; We are able to use symbolic constants instead of expression. The valu

What are literals, Literals (Constants) Constants are data storage loca...

Literals (Constants) Constants are data storage locations whose address is not accessible for the user. Their value is not altered during the course of the program. Literal

C program to show overloading of matrix operator, C program to show overloa...

C program to show overloading of matrix operator: Write a program for matrix operator overloading. class matrix{                   private :                 int x[

I need script for auto seating poker, Project Description: Not just like...

Project Description: Not just like that though. I want a similar program that can scan through poker lobbys (pokerstars, full tilt, ongame and ipoker) and seat me to the left of

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd