Dev C 5.11
Dev C++ Programs
Sep 26, 2013 No, the program doesn't generate.hpp files. Maybe I should reassemble the project or use Orwell Dev-C.
Dev C Compiler
Here is the scenario: A local bookstore buys books at a certain cost from a wholesaler. The store then marks up the price by a certain percentage and adds sales tax to it. The marked up price plus the sales tax is what the customer will pay for a given book. Write a program to get from the user the cost of the book, the mark up percentage, and the sales tax rate. Then the program should calculate the mark up amount, the sales tax and the price the customer will pay.
Cost:$50.00 with mark up percentage 10% and sales tax rate 5%
Cost: $25.00 with mark up percentage 5% and sales tax rate 10%
Cost:$100.00 with mark up percentage rate 8% and sales tax rate 3%.
Here is what I did. Please let me know what I did wrong.
// Rebecca Carolina Katz
//Filename: lab3.cpp
//Lab 3
//calculating the markup amount, the sales tax, and price the customer has to pay for books.
include <iostream>
using namespace std;
int main ()
{
// variable declaration
int num1;
int num2;
int num3;
int markupPercent;
int Salestax;
int average;
cout <<'Rebecca Carolina Katz, Lab #3' << endl;
// Get all values for input variables
num1=50.00;
markupPercent=num1*0.10
salesTax=num1*0.05
average=num1*0.10*0.05
cout << num1*0.10*0.05<< endl;
num2=25.00
markupPercent=num2*0.05
salesTax=num2*.10
average=num2*0.05*0.10
cout << average=num2*0.05*0.10<< endl;
num3=100.00
markupPercent=num3*0.08
salesTax=num3*0.03
average=num3*0.08*0.03;
cout << average=num3*0.08*0.03
return 0;
}
Cost:$50.00 with mark up percentage 10% and sales tax rate 5%
Cost: $25.00 with mark up percentage 5% and sales tax rate 10%
Cost:$100.00 with mark up percentage rate 8% and sales tax rate 3%.
Here is what I did. Please let me know what I did wrong.
// Rebecca Carolina Katz
//Filename: lab3.cpp
//Lab 3
//calculating the markup amount, the sales tax, and price the customer has to pay for books.
include <iostream>
using namespace std;
int main ()
{
// variable declaration
int num1;
int num2;
int num3;
int markupPercent;
int Salestax;
int average;
cout <<'Rebecca Carolina Katz, Lab #3' << endl;
// Get all values for input variables
num1=50.00;
markupPercent=num1*0.10
salesTax=num1*0.05
average=num1*0.10*0.05
cout << num1*0.10*0.05<< endl;
num2=25.00
markupPercent=num2*0.05
salesTax=num2*.10
average=num2*0.05*0.10
cout << average=num2*0.05*0.10<< endl;
num3=100.00
markupPercent=num3*0.08
salesTax=num3*0.03
average=num3*0.08*0.03;
cout << average=num3*0.08*0.03
return 0;
}