3
05/11/2024 2:58 pm
Topic starter
You will be given 3 lines of input. On the first line you will be given the name of the town, on the second – the population and on the third the area. Use the correct data types and print the result in the following format:
"Town {town name} has population of {population} and area {area} square km".
Examples:
1 Answer
2
05/11/2024 2:58 pm
My solution:
<?php $town = readline(); $population = readline(); $area = readline(); echo "Town $town has population of $population and area $area square km.";