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.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);

    }

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
A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than a

write a program to solve e^x

Project Description: Boots capture video from your YouTube channel and upload your own video to our channel or the copyright of the videos, bang, 3 parties, automatically delete

A: no, can't. The names of, precedence of, associativity of, and arity of operators is fixed through the language. In C++, there is no operator** so you cannot create one for a

Explain the parts of operators Assignment Operators The equal (=) sign is used for assigning a value to another. The left hand side has to be a variable (lvalue, which exc

C Program for 5 FUNCTION OF VOWELS, CNT_WORDS, REVERSE void input(char a[]); void output(char a[]); void reverse(char a[], char b[]); char poli(char a[], char b[]);

find area under the curve y=f(x) between x=a &y=b integrate y=f(x)

I need plugin for amibroker using c++ Project Description: Need to prepare plugin for amibroker using c++. Should be system bound after installing. System should show based o

The program will ask the user to enter: '1' to List the cities(and their state abbrev)  from largest to smallest (by their population) with their population '2'  to List the