//debug6-2
// user enters price
// program computes tax rate
// 5% at prices $10 and under , otherwise 7%
#include<iostream>
using namespace std;
int main()
{
double price();
double calcTax(double);
double price;
double taxRate;
askPrice();
taxRate = calcTax()
cout <<" on $ << price << ", the taxRate is " << taxRate << endl;
return 0;
}
double price askPrice()
{
double price;
cout <<"Enter price $";
cin >> price;
return price;
}
double calcTax(double price)
{
double rate;
const double CUTOFF = 10.00;
const double LOWRATE = 0.05;
const double HIGHRATE = 0.07;
if(price <= CUTOFF)
rate=LOWRATE
else rate = HIGHRATE;
}
Maybe if you told us the problem?
Also, please use [CODE] tags...
im not sure . i have to correct the syntax and logic errors in here
Once again... what's the problem? How can we help you if we don't know what the "logic errors" are?