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

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 << "\nPurchase is: " << purchase;

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

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


                return 0;


float tax (float amount)


        float rate = 0.065;

                return(amount * rate);


Posted Date: 10/18/2012 7:55:15 AM | Location : United States

Related Discussions:- Program to calculate tax - c++, Assignment Help, Ask Question on Program to calculate tax - c++, Get Answer, Expert's Help, Program to calculate tax - c++ Discussions

Write discussion on Program to calculate tax - c++
Your posts are moderated
Related Questions
Define Bitwise-AND Operator: &:? The bitwise-AND operator (&) compares every bit of its first operand to the corresponding bit of its second operand. If both bits are 1 the mat

Define Keywords in C++ K e y w o r d s: K e y w o rd s a r e t h e w o rd s a l r e a d y u s e d b y C + + i n i t s c

sample of program that use in bubble sort using assignment operator in c++

We are seeking a talented developer/team with great experience in programming apps for both Android and iOS. Our project needs great skills and experience in making good functional

Using the Constructor There are basically three ways of creating and initializing the object. The first way to call the constructor is explicitly as :

how to decode the numerals to string..

Aim: To implement a program to create, update & display account & admin record of person using display account & admin records of person using virtual base class.. Code:

I have a C++ programming assignment due on 8th January. As I am out of country and cannot complete it, I would like to know how much fees would you charge to complete the assignmen