if (result >= 0.5){
cout<<"you are too drunk to drive, you BAC is:"<<" "<<result<<endl;
cin.get();
}
else (result <0.5)
{cout << "you can drivee but be careful";
}
return 0;
}
will this work? also it cant compile because it says it expects a ";" before the {else
if (result >= 0.5){
cout<<"you are too drunk to drive, you BAC is:"<<" "<<result<<endl;
cin.get();
}
else
{cout << "you can drive but be careful";
system(pause);
}
return 0;
}
this is the end of the program. so when i run the exe. and the result is bigger than or equal to 0.5 it works, but if its less than 0.5 it just close down.