0
Input problem in C++
What to do when directed to use other lines for multiple inputs in c++?
33 Answers
0
Please explain your question for a better understanding
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?
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
0
Thank you I'll try it
0
Your welcome
0
Can you mark my answer as best if your question gets solved
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
0
Does that mean I can't really run a program with different inputs here?
0
No no that's not what he means
0
Hoooh
0
What to do?
0
What you still didn't get it
0
Can you please tell me the exact words to type on that box before submitting? Please
0
How many inputs are there in your code ?
0
Or just send me your code
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
0
#include <iostream>
using namespace std;
int x;
int main() {
cout<<"Enter value for x:";
cin>>x;
return 0;
}
0
Just type any number you want
Like 35
0
i tried it still it didn't work☹️
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;
}