+ 1
Why does the 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; } The first user input works But the second just dosent work, can you guys tell me why?
6 Réponses
+ 7
Read the message in the prompt when you run the code.
The part about multiple inputs
+ 4
enter the next comment exactly as you see it.
format for multiple inputs
Line 1: 12
space
Line 2: 45
next comment for input example
you get one chance for inputing all your values in sololearn exept for javascript
+ 4
12
45
0
Remember if you're using the "CODE PLAYGROUND" you need to input both values at the same time, with an enter to seperate:
5
7
Just tested it with no errors.
0
int b declared 1st line in main
0
I use code Blocks to execute the code so it does not let me put more than one input.can you help me with it?