0

I have a problem

I'm trying to learn C++ and I have no idea how to solve the projects. The website uses an input that I don't know how to link to my code. (I know how to build the program, Just not how to link it with the inputs, It's the Transportation project in the first set of C++ lessons)

24th Jan 2021, 2:41 PM
Lord Dredlam
Lord Dredlam - avatar
4 odpowiedzi
+ 3
Just take input from *stdin* just like you would take from any other user. using cin
24th Jan 2021, 2:46 PM
Arsenic
Arsenic - avatar
+ 2
If you meant in terms of actually entering your input into the playground you have to do it all in one go. Put each needed input on a new line before you enter. Ie. cin>>number1; cin>>number2; You write for input: 1 2 (Then enter your input together)
24th Jan 2021, 3:01 PM
Olivia
Olivia - avatar
+ 1
Olivia cin>> number1; And no need of endline while taking input.
24th Jan 2021, 3:17 PM
Arsenic
Arsenic - avatar
+ 1
Yeah sorry, in a rush. I'll correct. Arsenic
24th Jan 2021, 3:17 PM
Olivia
Olivia - avatar