4
05/11/2024 2:59 pm
Topic starter
Write a program that reads 3 lines of input. On each line you get a single character. Combine all the characters into one string and print it on the console.
Examples:
2 Answers
3
05/11/2024 3:00 pm
Solution:
<?php $input1 = readline(); $input2 = readline(); $input3 = readline(); echo $input1 . $input2 . $input3;
2
05/11/2024 3:01 pm
Another solution:
<?php $result = ''; for ($i = 0; $i < 3; $i++) { $input = readline(); $result .= $input; } echo $result;