+ 1
please how do i slit multiple input into separate lines if my program has an input?
18 Answers
+ 3
try it on pc, long codes, especially with a lot of input, on sololearn dont work too well
+ 3
i doubt of there is logical errors.,thanks alot..
+ 3
oh..thought as much..
thankx..its running on pc and cpp droid
+ 2
oh..thought much..
thanks anyway,it running we on pc and cpp droid
+ 1
everything looks right (input of position is address so double check that for logical errors). line 25
On sololearn you use a space between multiple inputs, on a computer it would work with multiple lines like you want
+ 1
at line 25 you have Enter employee's position
and you cin >> address after, you never use the position variable.
But anyway, happy to help :)
+ 1
just your spacebar, count the number of cin your program needs and type that many inputs.
spaces here wont read it as input.
+ 1
youre welcome
+ 1
you want like for example "john smith" as input?
you will have to use std::getline()
+ 1
int main() {
std::string name, title;
std::cout << "Enter your name: "; std::getline(std::cin, name); std::cout << "Enter your favourite movie: ";
std::getline(std::cin, title); std::cout << name << "'s favourite movie is " << title; }
Quick example i found online
+ 1
its ok
+ 1
oops..still cant get it running on solo learn
+ 1
cool, happy to help
0
hw do i use a space between multiple input?
0
hav correct the line 25..thankx
0
bt i stil cant get the split into multiple lines..
0
pls help
0
okay..
sorry,please,hold on a bit let give a try