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
Reference Oddities A reference variable can demote to any integer variable, be it in an array or a member variable from structure or class. Reference variables can demote to co

Find out the largest torque: A flat belt is taken in use to transmit torque from pulley A to pulley B as shown in figure given below. The radius of each pulley is 50mm and co

Write a C# program to compute the Net Pay for employees. The program is to have a Main method and two user-defined methods. The Main method is to input the employee's name (string)

Here is a program that uses an inline function to compute and return the absolute value of its input argument. # include inline int abs(int x) {                  ret

Each of the following two procedures defines a method for adding two positive integers in terms of the procedures inc, which increments its argument by 1, and dec, which decrements

padovan string for natural numbers program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class Padov

Described the difference among "new" and "operator new" ? A:"operator new" works such as malloc.

requiredrequiredrequiredrequiredrequiredrequiredrequiredrequired

Convert a COV/CPE (Micosoft Fax Cover Page) file to a TIF image file Project Description: I would like a small API written that will take a COV/CPE file and replaced the corr