<?php
for ($i=0,$accumulatorTotal=0;$i<=1;$i++) {
fscanf(STDIN,"%d%d%f\n",$code,$units,$price);
$accumulatorTotal += $units * $price;
}
printf ("VALOR A PAGAR: R$ %.2f\n", $accumulatorTotal);
?>
To embed this project on your website, copy the following code and paste it into your website's HTML: