Hello, does anybody know why when I build this code, none of the values show up?
Am I missing anything important or did I make a mistake in the code?
For those curious, I need to write a program to compute the tax on items that cost $1 to $25 in increments of 1 dollar.
• declare three float variables price, tax and fullPrice
• print a line that has the words (string literal) Price, Tax and Full Price which will serve as a header for the list
• Use a loop that starts price at 1 and continues to loop while price is less than or equal to 25.
• Inside the loop calculate
o tax, which is equal to the price times .0825
o fullPrice, which is equal to the sum of price and the tax
o print price, tax and fullPrice – leave a space between each number. You can do this by including a literal string in the cout that has a blank space between two double quotes. For example, this cout statement will print a blank space between the value of x and the value of y:
cout<<x<<” “<<z<<endl;
• Each time the loop repeats, price is increased by 1.
The results of your program should look like this:
Price Tax Full Price
1 0.0825 1.0825
2 0.165 2.165
3 0.2475 3.2475
4 0.33 4.33
5 0.4125 5.4125
6 0.495 6.495
7 0.5775 7.5775
8 0.66 8.66
9 0.7425 9.7425
10 0.825 10.825
11 0.9075 11.9075
12 0.99 12.99
13 1.0725 14.0725
14 1.155 15.155
15 1.2375 16.2375
16 1.32 17.32
17 1.4025 18.4025
18 1.485 19.485
19 1.5675 20.5675
20 1.65 21.65
21 1.7325 22.7325
22 1.815 23.815
23 1.8975 24.8975
24 1.98 25.98
25 2.0625 27.0625