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++

Data structure, convert BST into sorted doubly linked list

convert BST into sorted doubly linked list

Explain the function fseek, Question: (a) Explain the function fseek()....

Question: (a) Explain the function fseek(). Using an appropriate example, write the full syntax for this function. (b) Write a C or C++ program that will perform the follo

#title.faculty attendance system, how to create database of faculty databas...

how to create database of faculty database......... send me with program

Single string programme, write a programme that allows a user to enter 5 di...

write a programme that allows a user to enter 5 distinct words and returns them as a single string

Sizeof() operator, What is the specialty in sizeof() operator

What is the specialty in sizeof() operator

Explain about evaluation of expression in c language, Explain about Evaluat...

Explain about Evaluation of Expression in c language? An Expressions are evaluated using an assignment statement of the form: variable = expression; The Variable is any v

Explain external variables, External Variables Different functions of t...

External Variables Different functions of the similar program can be written in different source files and can be compiled together. The scope of a global variable is not limit

System programing, #quesdifferentiate betweenrelocatable and self relocatin...

#quesdifferentiate betweenrelocatable and self relocating program with exampletion..

Webcam driver static library or dll required for windows, Webcam Driver sta...

Webcam Driver static library or DLL required for Windows I want a .dll or .lib file using which i will take a snapshot from the webcam and it can't turn on the webcam LED while

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