1 Задание - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of 1 Задание.php
- <?php
- $product1 = "чайник";
- $product2 = "кофейник";
- $product3 = "кипятильник";
- $price1 = 300;
- $price2 = 150;
- $price3= 270;
- $middle = ($price1+$price2+$price3)/3;
- echo "$product1=>$price1"."\n";
- echo "$product2=>$price2"."\n";
- echo "$product3=>$price3"."\n";
- echo "__________________________"."\n";
- echo "Средняя цена товаров = $middle руб";
- ?>