Need help

#include <iostream>
using namespace std;

int main()
{
double purchase = 52;
double statetax = 0.04 * purchase;
double countytax = 0.02 * purchase;
double totaltax = statetax + countytax;

cout << "The total sales tax on a $" << purchase << " purchase is: $"
<< totaltax << endl;


return 0;
}


I have this code but i keep getting a error that says /usr/local/bin/run: line 7 [" Sales binary operator expected
Was wondering how to fix that error
Last edited on
it works for me

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
using namespace std;

int main()
{
double purchase = 52;
double statetax = 0.04 * purchase;
double countytax = 0.02 * purchase;
double totaltax = statetax + countytax;

cout << "The total sales tax on a $" << purchase << " purchase is: $"
<< totaltax << endl;


return 0;
}
Okay caused when i use source lair i get that error that pops up
Topic archived. No new replies allowed.