How do i split inputs in multipule lines? Imm so confused | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How do i split inputs in multipule lines? Imm so confused

31st Jan 2017, 12:34 AM
Hack Ringo
Hack Ringo - avatar
5 Answers
+ 3
No what this means is, on your keypad insert a line. Inside that dialog: First line 23 7.4 Last line You don't have to do any coding, just hit enter or return on your key pad to go to the next line.
1st Feb 2017, 7:26 PM
Mark Foxx
Mark Foxx - avatar
+ 1
Are you getting each line from user input? Console.ReadLine is what you should be doing if that's the case. if you're trying to write text on separate lines you can use /r/n in a format string or you can use the stringbuilder class. You can also use Environment.NewLine. There are many options available.
31st Jan 2017, 2:42 AM
Mike
Mike - avatar
+ 1
yes, ive been trying too understand input and output but when i click try yourself and the click run it says"You need to inputs inmultiple line"
31st Jan 2017, 3:11 AM
Hack Ringo
Hack Ringo - avatar
0
try this s = input("year: ") print(s) t = input("age: ") print(t) then it will ask to put in text so for me the output was date: 2017 age: 22
31st Jan 2017, 5:34 AM
AZFrank Castle
AZFrank Castle - avatar
0
Very good question! The answer is that you cannot actually read multiple lines with a single input command! Therefore the example code here is incorrect! If you already tried it, you saw that if you enter 2 or more lines only the first one is read!
21st Feb 2017, 8:19 PM
Manolis
Manolis - avatar