C Code for Blood Alcohol

This c programming code is used to find the blood alcohol. You can select the whole c code by clicking the select option and can use it. When you click text, the code will be changed to text format. This c 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 c code and use it to find the blood alcohol.

#include<stdio.h>
int main(void)
{
    
    float AC;
    float BAC=24.5;
    float timehr=26.3;
    float male,female;
    float wt=56;
    int Ethanol_per=100;
    float resbeer,ozbeer,reswine,ozwine,resspirit,ozspirit;
    
	float bachr = BAC + (timehr * 20);
	
    male = (bachr * wt) / (1.22 * 100);
    female = (bachr * wt) / (1.51 * 100);
    
	printf("\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;
    printf("\nBeer (5percent ethanol) %f mL %f oz",resbeer,ozbeer);
    printf("\nWine (12percent ethanol) %f mL %f oz",reswine,ozwine);
    printf("\nSpirit (40percent ethanol) %f mL %f oz",resspirit,ozspirit);
	
	printf("\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;
    
    printf("\nBeer (5percent ethanol) %f mL %f oz",resbeer,ozbeer);
    printf("\nWine (12percent ethanol) %f mL %f oz",reswine,ozwine);
    printf("\nSpirit (40percent ethanol) %f mL %f oz",resspirit,ozspirit);
      
    return 0;
}
Other Programming Codes
Online Calculator : Blood Alcohol
Click on the select code link to copy and paste this free c program code for blood alcohol.

english Calculators and Converters