+ 3
why doesn't the program ask for input twice ?
#include <iostream> using namespace std; int main() { int a, b; int sum; cout << "Enter a number \n"; cin >> a; cout << "Enter another number \n"; cin >> b; sum = a + b; cout << "Sum is: " << sum << endl; return 0; } it just ask the users once and if you enter just one number you will run into an error
4 Réponses
+ 4
Please check your code again.
It's asking for input..
Sometimes this happens when network connection is slow..
It also shows no output once network issue occurs.
Answer to edited question:
It will not ask for twice input.
You have to use new lines in that for multiple input
+ 2
Check this code for SoloLearn playground input behaviour..
it shows how to input to console in Sololearn. Hope it helps you understand SoloLearn console behaviour..
https://code.sololearn.com/WhiNb9BkJUVC/?ref=app
0
When you enter the first number then you have press enter to enter the 2nd number.