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
#include stdio.h> #include conio.h> #include string.h> void main() {           int i=0,j=0,k=0,l=0;           int a[3][3],temp[3][3];           clrscr();

Write a C program to calculate the output Y for a given value of X for the following formula   Y=X 2 + 2X +3   #include stdio.h   void main()   {   char promt;   float y,x

Explain about the String Constants in c language? A collection of characters included within a pair of double quotes is treated as string constant. The character may be numbers

#write code for rotation in c

Question: a) Give two uses of NFS. b) Give one advantage of using NFS. c) Explain the following lines as they would be interpreted in the /etc/exports file i. /usr/local

C Program for SORTING OF LONG WORD WITH DIFFERENT STRING #include stdio.h> #include conio.h> #include string.h>   void main() {           char n[50],c[25][25]

Project Description: P2P media streaming browser (IE, Chrome, Firefox) plug-in needed that is compatible with Win Xp,7,8 that is Windows Firewall friendly Example like Swarm

Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.

Need Payment Gateway Integration Expert Project Description: I am seeking for expert payment gateway integration. You must have done or have experience with integrating me