I have to write a program that asks for a costperitem, number of items purchased, and a discount rate. Then it should calculate the total cost, tax due, and amount due.
I have to use the formulas:
total cost = number of items * costperitem
total cost (discounted) = total cost  (discount rate * total cost)
tax due = total cost * TAXRATE
amount due = total cost + tax due
I am going to put what I have so far. Any suggestions would be helpful. Also, how do I put the discount rate as a percentage?

#include "stdafx.h"

#include <iostream>

#include <iomanip>

using namespace std;


int _tmain(int argc, _TCHAR* argv[])

{

const float TAXRATE = 0.06f;

double costPerItem, itemsPurchased, discountRate, totalCost, taxDue, totalCostDiscounted;


cout <<"\nEnter the costperitem: ";

cin >> costPerItem;

cout <<"\nEnter the number of items purchased: ";

cin >> itemsPurchased;

cout <<"\nEnter the discount rate: ";

cin >> discountRate;


totalCost = itemsPurchased * costPerItem;

totalCostDiscounted = totalCost  (discountRate * totalCost);

taxDue = totalCost * TAXRATE;

cout << setiosflags (ios::fixed)

<< setiosflags (ios::showpoint)

<< setprecision(2);


cout <<"\nThe total cost is: " << setw(4) << costPerItem*itemsPurchased << endl;

cout <<"\nThe tax due is: " <<setw(4)<<costPerItem*itemsPurchased*TAXRATE << endl;

cout <<"\nThe amount due is: "<<setw(4)<<totalCost + taxDue<<endl;


return 0;

}