Homework lab project

Create a C++ Console application with an output similar to a store receipt with five items. Declare five string variables to hold the names of the items and five numeric variables to hold the prices of the items. Create a constant variable to hold the tax percentage of 9.25% (0.0925). Add codes to calculate the subtotal, tax amount, and total cost. Tax amount is calculated by multiplying subtotal by tax percentage. Choose your own names for the items, but use the following prices for them: $12.95, $33.14, $4.32, 5.18, 23.99. Display a list of the items and their prices, subtotal, tax amount, and total. Do not worry if the numbers display more than two decimals. How should i start this?

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / repl.it / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

This should be easy, but its a homework so i suggest you to do it by yourself and only ask for some helps if you have a trouble or got stuck. Googling about “how to declare variable in c++”, “math operation in c++”, and “print variables in c++” should do.

I can’t help you much if you haven’t started anything yet! as @davidchandra95 said, I’d start with some googling. If its intimidating to figure out where to put your first line of code, I’d start by looking at some code your instructor wrote and thinking about what you need to add or remove!

I think you should start something like this:

#include <cstdio>

And research what kind of functions this header includes
Then you can proceed to next header and repeat:

#include <string>

Good luck! :slight_smile: