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;
} But now I am getting these errors. Sorry I don't mean to be a pain but I am really new to programming:
27 2 E:\Lab_3Katz.cpp [Error] 'MarkupPercent' was not declared in this scope
36 35 E:\Lab_3Katz.cpp [Error] invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator<<'
42 17 E:\Lab_3Katz.cpp [Error] no match for 'operator=' (operand types are 'std::basic_ostream<char>' and 'double')