4
05/11/2024 2:59 e m
Ämnesstart
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 Svar
3
05/11/2024 3:00 e m
Solution:
<?php $input1 = readline(); $input2 = readline(); $input3 = readline(); echo $input1 . $input2 . $input3;
2
05/11/2024 3:01 e m
Another solution:
<?php $result = ''; for ($i = 0; $i < 3; $i++) { $input = readline(); $result .= $input; } echo $result;