0

Why does the second cin not work?

#include <iostream> using namespace std; int main() { cout << "Hello" << endl; int a; cout <<"Enter value A"<<endl; cin>>a; int b; cout <<"Enter Value B"<<endl; cin>>b; return 0; } I use Code::Blocks to run the code and when it runs, it only lets me put the first input.The second user input dosent work at all.What am I doing wrong guys?

20th Jul 2017, 5:29 PM
Kevin Paresh
3 ответов
0
Forget it.My bad, I just discovered that ints cannot be substituted by numbers. Thank You for the support!!
20th Jul 2017, 5:41 PM
Kevin Paresh
- 1
it works just fine with SoloLearn's own compiler
20th Jul 2017, 5:35 PM
Nirmal Kumar Bhakat
Nirmal Kumar Bhakat - avatar
- 1
yes but can anyone try on the Code::Blocks Compiler to see whats the problem?
20th Jul 2017, 5:36 PM
Kevin Paresh