<?php

list($a,$b,$c) = array_map('floatval',explode(" ",trim(fgets(STDIN))));


if(($a + $b) > $c && ($a + $c) > $b && ($b + $c) > $a)
{
    $perimetro = $a + $b + $c;
    echo "Perimetro = " . number_format($perimetro,1,".","") . PHP_EOL;
}else{
    $areaTrapezio = (($a + $b) * $c) / 2;
    echo "Area = " . number_format($areaTrapezio,1,".","") . PHP_EOL;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: