0

Basic c++ "what wrong"

compilation error #include <iostream> using namespace std; int main() { int a; int b; cin>> a >>endl; cin>> b >>endl; cout<<a<<endl; cout<<b; return 0; }

6th Feb 2017, 2:46 PM
Yuriy az
Yuriy az - avatar
5 Answers
+ 16
Don't use "endl" with cin, doesn't work. And write it like this: cin>>a>>b;
6th Feb 2017, 2:59 PM
Filip
Filip - avatar
+ 14
No problem
6th Feb 2017, 3:08 PM
Filip
Filip - avatar
+ 1
Thx that was the problem 😘
6th Feb 2017, 3:02 PM
Yuriy az
Yuriy az - avatar