sales tax problem...

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

int main()
{
	float x;		  //price of item
	double y = 0.06;   //sales tax
	float slstax;
	float total;

	cout<<"input your item's price";
	cin>>x;

	x * y = slstax;
	x + slstax = total;

	cout<<"this is your final price, in pennsylvania"<<total<<endl;
	return 0;
}



its telling me this...
1>c:\users\trey\documents\visual studio 2010\projects\sales tax\sales tax\sales tax source code.cpp(15): error C2106: '=' : left operand must be l-value


i am believing that something HAS to go infront of the x in both of these statements but...idk... help would be great! :D ty in advance!
Change it to:
1
2
slstax = x * y;
total = x + slstax;
i do suppose that WOULD make more sence ty :D
Topic archived. No new replies allowed.