<?php

$count=0;

$numbers=[];

while ($count <= 6) {    
    $number = floatval(trim(fgets(STDIN)));
    
    if ($number > 0) {
        $numbers[]=$number;
    }
    $count++;
}

$media = array_sum($numbers)/count($numbers);

echo count($numbers)." valores positivos".PHP_EOL;
echo number_format($media,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: