Input problem in C++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Input problem in C++

What to do when directed to use other lines for multiple inputs in c++?

14th Feb 2019, 10:28 AM
Joaldine Albacite
Joaldine Albacite - avatar
33 Answers
0
Please explain your question for a better understanding
14th Feb 2019, 10:30 AM
Sahil Bhakat
Sahil Bhakat - avatar
0
What i mean is when i try to run a program which requires input there is this box prompting me to make use of other lines for multiple inputs. What to do?
14th Feb 2019, 10:34 AM
Joaldine Albacite
Joaldine Albacite - avatar
0
See if your program needs two inputs then you have to devide it into two line Just write the first input then type enter and then write your second input and so on
14th Feb 2019, 10:38 AM
Sahil Bhakat
Sahil Bhakat - avatar
0
Thank you I'll try it
14th Feb 2019, 10:40 AM
Joaldine Albacite
Joaldine Albacite - avatar
0
Your welcome
14th Feb 2019, 10:41 AM
Sahil Bhakat
Sahil Bhakat - avatar
0
Can you mark my answer as best if your question gets solved
14th Feb 2019, 10:41 AM
Sahil Bhakat
Sahil Bhakat - avatar
0
On SL the input on not-web codes have to be submitted BEFORE run the code. Its a knowed limitaion of SL. In practice this make impossible make an not-web code true interactive on SL
14th Feb 2019, 11:11 AM
KrOW
KrOW - avatar
0
Does that mean I can't really run a program with different inputs here?
14th Feb 2019, 11:14 AM
Joaldine Albacite
Joaldine Albacite - avatar
0
No no that's not what he means
14th Feb 2019, 11:16 AM
Sahil Bhakat
Sahil Bhakat - avatar
0
Hoooh
14th Feb 2019, 11:17 AM
Joaldine Albacite
Joaldine Albacite - avatar
0
What to do?
14th Feb 2019, 11:17 AM
Joaldine Albacite
Joaldine Albacite - avatar
0
What you still didn't get it
14th Feb 2019, 11:18 AM
Sahil Bhakat
Sahil Bhakat - avatar
0
Can you please tell me the exact words to type on that box before submitting? Please
14th Feb 2019, 11:19 AM
Joaldine Albacite
Joaldine Albacite - avatar
0
How many inputs are there in your code ?
14th Feb 2019, 11:20 AM
Sahil Bhakat
Sahil Bhakat - avatar
0
Or just send me your code
14th Feb 2019, 11:21 AM
Sahil Bhakat
Sahil Bhakat - avatar
0
It was a simple code i just started with C++ i just tried to run a code requiring to input a value of x. Wait I'll send it
14th Feb 2019, 11:23 AM
Joaldine Albacite
Joaldine Albacite - avatar
0
#include <iostream> using namespace std; int x; int main() { cout<<"Enter value for x:"; cin>>x; return 0; }
14th Feb 2019, 11:24 AM
Joaldine Albacite
Joaldine Albacite - avatar
0
Just type any number you want Like 35
14th Feb 2019, 11:27 AM
Sahil Bhakat
Sahil Bhakat - avatar
0
i tried it still it didn't work☹️
14th Feb 2019, 11:28 AM
Joaldine Albacite
Joaldine Albacite - avatar
0
Try with this #include<iostream> using namespace std; int main() { int x; cout<<"Enter the value"; cin>>x; cout<<endl<<"you have entered : "<<x; return 0; }
14th Feb 2019, 11:32 AM
Sahil Bhakat
Sahil Bhakat - avatar