$prices = array(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,0.2,0.4,0.6,0.8,1,1.2,1.4,1.6,1.8,2,0.3,0.6,0.9,1.2,1.5,1.8,2.1,2.4,2.7,3,0.4,0.8,1.2,1.6,2,2.4,2.8,3.2,3.6,4,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5,0.6,1.2,1.8,2.4,3,3.6,4.2,4.8,5.4,6,0.7,1.4,2.1,2.8,3.5,4.2,4.9,5.6,6.3,7,0.8,1.6,2.4,3.2,4,4.8,5.6,6.4,7.2,8,0.9,1.8,2.7,3.6,4.5,5.4,6.3,7.2,8.1,9,1,2,3,4,5,6,7,8,9,10,1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9,11,1.2,2.4,3.6,4.8,6,7.2,8.4,9.6,10.8,12,1.3,2.6,3.9,5.2,6.5,7.8,9.1,10.4,11.7,13,1.4,2.8,4.2,5.6,7,8.4,9.8,11.2,12.6,14,1.5,3,4.5,6,7.5,9,10.5,12,13.5,15,1.6,3.2,4.8,6.4,8,9.6,11.2,12.8,14.4,16,1.7,3.4,5.1,6.8,8.5,10.2,11.9,13.6,15.3,17,1.8,3.6,5.4,7.2,9,10.8,12.6,14.4,16.2,18,1.9,3.8,5.7,7.6,9.5,11.4,13.3,15.2,17.1,19,2,4,6,8,10,12,14,16,18,20,2.1,4.2,6.3,8.4,10.5,12.6,14.7,16.8,18.9,21,2.2,4.4,6.6,8.8,11,13.2,15.4,17.6,19.8,22,2.3,4.6,6.9,9.2,11.5,13.8,16.1,18.4,20.7,23,2.4,4.8,7.2,9.6,12,14.4,16.8,19.2,21.6,24,2.5,5,7.5,10,12.5,15,17.5,20,22.5,25,2.6,5.2,7.8,10.4,13,15.6,18.2,20.8,23.4,26,2.7,5.4,8.1,10.8,13.5,16.2,18.9,21.6,24.3,27,2.8,5.6,8.4,11.2,14,16.8,19.6,22.4,25.2,28,2.9,5.8,8.7,11.6,14.5,17.4,20.3,23.2,26.1,29,3,6,9,12,15,18,21,24,27,30,3.1,6.2,9.3,12.4,15.5,18.6,21.7,24.8,27.9,31,3.2,6.4,9.6,12.8,16,19.2,22.4,25.6,28.8,32,3.3,6.6,9.9,13.2,16.5,19.8,23.1,26.4,29.7,33,3.4,6.8,10.2,13.6,17,20.4,23.8,27.2,30.6,34,3.5,7,10.5,14,17.5,21,24.5,28,31.5,35,3.6,7.2,10.8,14.4,18,21.6,25.2,28.8,32.4,36,3.7,7.4,11.1,14.8,18.5,22.2,25.9,29.6,33.3,37,3.8,7.6,11.4,15.2,19,22.8,26.6,30.4,34.2,38,3.9,7.8,11.7,15.6,19.5,23.4,27.3,31.2,35.1,39,4,8,12,16,20,24,28,32,36,40,4.1,8.2,12.3,16.4,20.5,24.6,28.7,32.8,36.9,41,4.2,8.4,12.6,16.8,21,25.2,29.4,33.6,37.8,42,4.3,8.6,12.9,17.2,21.5,25.8,30.1,34.4,38.7,43,4.4,8.8,13.2,17.6,22,26.4,30.8,35.2,39.6,44,4.5,9,13.5,18,22.5,27,31.5,36,40.5,45,4.6,9.2,13.8,18.4,23,27.6,32.2,36.8,41.4,46,4.7,9.4,14.1,18.8,23.5,28.2,32.9,37.6,42.3,47,4.8,9.6,14.4,19.2,24,28.8,33.6,38.4,43.2,48,4.9,9.8,14.7,19.6,24.5,29.4,34.3,39.2,44.1,49,5,10,15,20,25,30,35,40,45,50,5.1,10.2,15.3,20.4,25.5,30.6,35.7,40.8,45.9,51,5.2,10.4,15.6,20.8,26,31.2,36.4,41.6,46.8,52,5.3,10.6,15.9,21.2,26.5,31.8,37.1,42.4,47.7,53,5.4,10.8,16.2,21.6,27,32.4,37.8,43.2,48.6,54,5.5,11,16.5,22,27.5,33,38.5,44,49.5,55,5.6,11.2,16.8,22.4,28,33.6,39.2,44.8,50.4,56,5.7,11.4,17.1,22.8,28.5,34.2,39.9,45.6,51.3,57,5.8,11.6,17.4,23.2,29,34.8,40.6,46.4,52.2,58,5.9,11.8,17.7,23.6,29.5,35.4,41.3,47.2,53.1,59,6,12,18,24,30,36,42,48,54,60,6.1,12.2,18.3,24.4,30.5,36.6,42.7,48.8,54.9,61,6.2,12.4,18.6,24.8,31,37.2,43.4,49.6,55.8,62,6.3,12.6,18.9,25.2,31.5,37.8,44.1,50.4,56.7,63,6.4,12.8,19.2,25.6,32,38.4,44.8,51.2,57.6,64,6.5,13,19.5,26,32.5,39,45.5,52,58.5,65,6.6,13.2,19.8,26.4,33,39.6,46.2,52.8,59.4,66,6.7,13.4,20.1,26.8,33.5,40.2,46.9,53.6,60.3,67,6.8,13.6,20.4,27.2,34,40.8,47.6,54.4,61.2,68,6.9,13.8,20.7,27.6,34.5,41.4,48.3,55.2,62.1,69,7,14,21,28,35,42,49,56,63,70,7.1,14.2,21.3,28.4,35.5,42.6,49.7,56.8,63.9,71,7.2,14.4,21.6,28.8,36,43.2,50.4,57.6,64.8,72,7.3,14.6,21.9,29.2,36.5,43.8,51.1,58.4,65.7,73,7.4,14.8,22.2,29.6,37,44.4,51.8,59.2,66.6,74,7.5,15,22.5,30,37.5,45,52.5,60,67.5,75,7.6,15.2,22.8,30.4,38,45.6,53.2,60.8,68.4,76,7.7,15.4,23.1,30.8,38.5,46.2,53.9,61.6,69.3,77,7.8,15.6,23.4,31.2,39,46.8,54.6,62.4,70.2,78,7.9,15.8,23.7,31.6,39.5,47.4,55.3,63.2,71.1,79,8,16,24,32,40,48,56,64,72,80,8.1,16.2,24.3,32.4,40.5,48.6,56.7,64.8,72.9,81,8.2,16.4,24.6,32.8,41,49.2,57.4,65.6,73.8,82,8.3,16.6,24.9,33.2,41.5,49.8,58.1,66.4,74.7,83,8.4,16.8,25.2,33.6,42,50.4,58.8,67.2,75.6,84,8.5,17,25.5,34,42.5,51,59.5,68,76.5,85,8.6,17.2,25.8,34.4,43,51.6,60.2,68.8,77.4,86,8.7,17.4,26.1,34.8,43.5,52.2,60.9,69.6,78.3,87,8.8,17.6,26.4,35.2,44,52.8,61.6,70.4,79.2,88,8.9,17.8,26.7,35.6,44.5,53.4,62.3,71.2,80.1,89,9,18,27,36,45,54,63,72,81,90,9.1,18.2,27.3,36.4,45.5,54.6,63.7,72.8,81.9,91,9.2,18.4,27.6,36.8,46,55.2,64.4,73.6,82.8,92,9.3,18.6,27.9,37.2,46.5,55.8,65.1,74.4,83.7,93,9.4,18.8,28.2,37.6,47,56.4,65.8,75.2,84.6,94,9.5,19,28.5,38,47.5,57,66.5,76,85.5,95,9.6,19.2,28.8,38.4,48,57.6,67.2,76.8,86.4,96,9.7,19.4,29.1,38.8,48.5,58.2,67.9,77.6,87.3,97,9.8,19.6,29.4,39.2,49,58.8,68.6,78.4,88.2,98,9.9,19.8,29.7,39.6,49.5,59.4,69.3,79.2,89.1,99,10,20,30,40,50,60,70,80,90,100); $unit_prices = array(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,2.1,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,3,3.1,3.2,3.3,3.4,3.5,3.6,3.7,3.8,3.9,4,4.1,4.2,4.3,4.4,4.5,4.6,4.7,4.8,4.9,5,5.1,5.2,5.3,5.4,5.5,5.6,5.7,5.8,5.9,6,6.1,6.2,6.3,6.4,6.5,6.6,6.7,6.8,6.9,7,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.8,7.9,8,8.1,8.2,8.3,8.4,8.5,8.6,8.7,8.8,8.9,9,9.1,9.2,9.3,9.4,9.5,9.6,9.7,9.8,9.9,10); $sold_by = array(1,2,3,4,5,6,7,8,9,10); print (""); print (""); for ($i=0;$i$sold_by[$i]"); } print (""); $k=0; for ($j=0; $j"); for ($i=0;$i$sum
$gettypesum $gettypeprices"); $perfect++; }elseif ($prices[$k] == $sum){ print ("
"); $ok++; }else{ // prices wrong if ($gettypesum == $gettypeprices){ print (""); $failedok++; }else{ print (""); $failedtype++; } } $k++; } $row++; print (""); } print ("
unit_price
$unit_prices[$j] $sum
$gettypesum $gettypeprices
$sum
failed
$gettypesum $gettypeprices $prices[$k]
$sum
failed
$gettypesum $gettypeprices $prices[$k]
"); $total = $perfect + $ok + $failedok + $failedtype; print (""); print ("" ); print (""); print (""); print (""); print (""); print ("
Perfect: $perfect value and type match
Ok: $ok value matches, type doesn't
Failed: $failedok value fails Type matches
Failed: $failedtypevalue fails & type fails.
Total$total$k
");