1. wrote a program; please review/comment

Will this program run?
Any suggestions?

Problem: write a c++ program that prompts the user for a cost per item, number of items purchased, and a discount rate. The program should then calculate and print the total cost, tax due, and amount due.

My program and algorithm:
//prompt the user for a cost per item
//prompt the user for number of items purchased
//prompt the user for a discount rate
//calculate the total cost, tax due, and amount due.
//print the total cost, tax due and amount due
#include <iostream.h>
int main()
{
const float salestax = 0.06;
float numberitems, costperitem, discountrate, totalcost, taxdue, amountdue, taxrate, newtotal;

totalcost = numbitems * costperitem;
newtotal = totalcost - (discountrate * totalcost)
taxdue = newtotal * taxrate
amountdue = newtotal + taxdue

cout<<"enter cost per item";
cin>> costperitem
cout<<"enter number of items";
cin>> numberitems

cout<<"enter discount rate";
cin>> discountrate
cout<< “Your amount due is”<< amountdue
return 0;
}

2. Nope, it will not run as you would have expected The flow is incorrect and you forgot some line treminators. Here, I rearranged it for you:
Code:
```#include <iostream.h>
int main()
{
const float salestax = 0.06;
float numberitems, costperitem, discountrate, totalcost;
float taxdue, amountdue, taxrate, newtotal;

cout<<"enter cost per item";
cin>> costperitem;
cout<<"enter number of items";
cin>> numberitems;
cout<<"enter discount rate";
cin>> discountrate;

totalcost = numbitems * costperitem;
newtotal = totalcost - (discountrate * totalcost);
/*You forgot to compute the taxrate*/;
taxdue = newtotal * taxrate;
amountdue = newtotal + taxdue;

cout<< "Your amount due is"<< amountdue;
return 0;
}```

3. Rez, you put a semicolon after your comment about leaving out the calculation of sales tax, and also, don't use <iostream.h>. Use <iostream> and using namespace std;.

4. Oops hehe sorry. But even if it has a semicolon, it won't affect the execution anyway.

5. I know, I just thought I'd point it out.