Error C2678

I keep getting error C2678 on my program for a basic integer multiplier program. A little while ago I was getting the same error on a simple output program, but somehow fixed it, though I'm not sure how.

The error reads:
"no operator found which takes a left-hand operand of type 'std::basic_istream<_Elem,_Traits>' (or there is no acceptable conversion)".

The code:

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

{ 
	cout << "Enter first number"<< endl;
	int x=
	cin >> x >> endl;

	cout << "Enter second number" <<endl;
	int y= 
	cin >> y >> endl;

	int result= x*y;

	cout<< result << endl;
	system ("pause")
	return 0;

}


Thank you!
You have syntax errors.
int y= should probably be int y;

And the same for x=
As well as that, change this line:
cin >> x >> endl;
to
cin >> x;
THANK YOU!
Topic archived. No new replies allowed.