PLEASE HELP!! INTRAVENOUS RATE ASSISTANT !!!
Dec 11, 2015 at 3:17pm UTC
If I click number 1 the output should be like this
Problem => 1
Enter rate in ml/hr=> 150
Enter tubing’s drop factor (drops/ml)=> 15
The drop rate per minute is 38.
but the output in "The drop rate per minute is" in my code is always 0 what should I do?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#include<stdio.h>
#include<conio.h>
#include<windows.h>
int get_problem(void );
void get_rate_drop_factor(float ml_hr, float drops_ml);
float fig_drops_min(float ml_hr, float drops_ml);
int y;
float answer;
int main (void )
{
float ml_hr, drops_ml; //problem number 1
y = get_problem();
do
{
if (y == 1)
{
get_rate_drop_factor(ml_hr,drops_ml);
answer = fig_drops_min(ml_hr,drops_ml);
printf("\tThe drop rate per minute is %.0f" ,ceil(answer));
getch();
system("cls" );
}
}
void get_rate_drop_factor(float ml_hr, float drops_ml)
{
printf("\tEnter rate in ml/hr: " );
scanf("%f" , &ml_hr);
printf("\tEnter tubing factor (drops/ml): " );
scanf("%f" , &drops_ml);
}
float fig_drops_min(float ml_hr, float drops_ml)
{
return ml_hr*drops_ml/60;
}
Last edited on Dec 11, 2015 at 3:21pm UTC
Dec 11, 2015 at 3:24pm UTC
void get_rage_drop_factor(float & ml_hr, float & drops_ml)
Topic archived. No new replies allowed.