C Board  

Go Back   C Board > Community Boards > Contests Board

Reply
 
LinkBack Thread Tools Display Modes
Old 10-01-2006, 12:34 PM   #1
Registered User
 
kryptkat's Avatar
 
Join Date: Dec 2002
Posts: 409
AckUberPhest

AckUberPhest

Your demented programming challenge is to determine how much alcohol someone can have.

1. Given their weight
2. Given the amount of alcohol.
3. Given the proof or alcohol content i.e 12oz bier at 3%
4. Determine their legal limit at .10

example run of prog.
1. Enter weight in lbs > 98
2. Enter Alcohol container size in oz > 12
3. Enter percent or proof per alcohol container > 3% <or enter> 6 proof

answer> A 98 lbs drinker can have 2 bier of 12oz at 3% alcohol content. And will be at .11 level above the legal limit.

October Fest .Prog Have fun with it. Please try to base the calculations on real world physics. Remember do not drink and program. You do not want to crash your computer.
kryptkat is offline   Reply With Quote
Old 10-01-2006, 12:40 PM   #2
The superheterodyne.
 
twomers's Avatar
 
Join Date: Dec 2005
Location: Ireland
Posts: 2,205
How will we calculate it if we're talking about a 150 Kg male alcoholic, with a liver like an ox (I don't know how much ox drink to be honest, but if they could ...), who has drunk at least 1.4 L of 12 year old Whiskey every day for 23 years??

I guess we, as the contestants, have to figure this out :/
__________________
I blag!
twomers is offline   Reply With Quote
Old 10-01-2006, 12:44 PM   #3
Just Lurking
 
Dave_Sinkula's Avatar
 
Join Date: Oct 2002
Posts: 4,990
Yes, some liver factor should be introduced, along with a time frame (6 beers one per hour for 6 hours vs 6 beers in 10 minutes -- different results). Isn't the average liver supposed to be able to process like 1 alcohol "serving" per hour?

[edit]http://www.healthchecksystems.com/alcohol.htm
Quote:
The liver is able to metabolize about ˝ ounce of ethanol per hour (approximately one drink, depending on a person’s body size, food intake, etc.).
[/edit]
Quote:
Originally Posted by kryptkat
Remember do not drink and program.
What!?!! Most of my posts would be gone.
__________________
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*

Last edited by Dave_Sinkula; 10-01-2006 at 06:07 PM. Reason: Found some info.
Dave_Sinkula is offline   Reply With Quote
Old 10-01-2006, 12:52 PM   #4
The superheterodyne.
 
twomers's Avatar
 
Join Date: Dec 2005
Location: Ireland
Posts: 2,205
Yes. Over what amount of time is the alcohol consumed.

Suggested reading towards the project - http://en.wikipedia.org/wiki/Alcohol_consumption and to a lesser extent http://uncyclopedia.org/wiki/Beer


>> What!?!! Most of my posts would be gone.
And you may forget to watch me very closely! ... I've heard that apparently when you drink less, you're more coherent. ... more importantly though ...

>> Remember do not drink and program. You do not want to crash your computer.
Or more likely, crash into your computer
__________________
I blag!
twomers is offline   Reply With Quote
Old 10-02-2006, 07:48 AM   #5
Registered User
 
kryptkat's Avatar
 
Join Date: Dec 2002
Posts: 409
I hope that this challenge would be a real world app that you or someone could actually use. Inspired by the movie “October Fest”. I knew there was a time factor and a food consumption factor that affects the calculations or victims state of being <read drunkenness> . There is more to a real world app than just the code. It is getting or figuring out how to do the calculations. Because you can not just say ten percent of a hundred pound person can have ten pounds of alcohol. The calculations are not that simple.<and that way would be wrong> There is more to it. It does look simple at first. The end goal is to figure out how much alcohol someone can have.
kryptkat is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump


All times are GMT -6. The time now is 01:05 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22