Answer to Question #48805 in C++ for Cordero Reed

Question #48805
Create an algorithm for a program that asks the user for the price of an item. The program then must display the given price, calculate and display the tax based on a 6% rate, and then calculate and display the grand total (total + tax).
1
Expert's answer
2014-11-12T00:36:48-0500
#include <stdlib.h>
#include <iostream>
#include <stdio.h>
#include <cstdlib>
using namespace std;
int main()
{
float price;
float tax;
cout<<"Enter the price : ";
cin>>price;
tax = price * 0.06;
system("cls");
cout<<"Price : "<<price<<endl;
cout<<"Tax : "<<tax<<endl;
cout<<"Grand total : "<<price + tax<<endl;
system("pause");
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS