Php Code for Blood Alcohol

This php programming code is used to find the blood alcohol. You can select the whole php code by clicking the select option and can use it. When you click text, the code will be changed to text format. This php program code will be opened in a new pop up window once you click pop-up from the right corner. You can just copy, paste this php code and use it to find the blood alcohol.

<?php 

$BAC=24.5;
$timehr=26.3;
$wt=56;
$Ethanol_per=100;
$bachr = $BAC + ($timehr * 20);
$male = ($bachr * $wt) / (1.22 * 100);
$female = ($bachr * $wt) / (1.51 * 100);
echo "\nMale Patient:";
        $resbeer = $male / 0.05;
        $ozbeer = $resbeer / 29.59;
        $reswine = $male / 0.12;
        $ozwine = $reswine / 29.59;
        $resspirit = $male / 0.4;
        $ozspirit = $resspirit / 29.59;
echo "\nBeer (5percent ethanol) ".$resbeer." mL ".$ozbeer." oz";
echo "\nWine (12percent ethanol) ".$reswine." mL ".$ozwine." oz";
echo "\nSpirit (40percent ethanol) ".$resspirit." mL ".$ozspirit." oz";

echo "\nFemale Patient:";
        $resbeer = $female / 0.05;
        $ozbeer = $resbeer / 29.59;
        $reswine = $female / 0.12;
        $ozwine = $reswine / 29.59;
        $resspirit = $female / 0.4;
        $ozspirit = $resspirit / 29.59;

echo "\nBeer (5percent ethanol) ".$resbeer." mL ".$ozbeer." oz";
echo "\nWine (12percent ethanol) ".$reswine." mL ".$ozwine." oz";
echo "\nSpirit (40percent ethanol) ".$resspirit." mL ".$ozspirit." oz";
?>
Other Programming Codes
Online Calculator : Blood Alcohol
Click on the select code link to copy and paste this free php program code for blood alcohol.

english Calculators and Converters

Ask a Question


Sitemap