Introduction to Programming Using Visual Basic
Visual Basic Programming Challenge 6-pp1: Caffeine Absorption using VB.net Loops (Do Until loops, For loops)
After caffeine is absorbed into the body, 13% is eliminated from the body each hour. Assume a person drinks an 8 oz cup of coffee containing 130mg of caffeine, and the caffeine is absorbed immediately into the body. Write a program to calculate the following values:
a) The number of hours required until 65mg (one half of the original amount) remain in the body
b) The amount of caffeine in the body 24 hours after the person drinks the coffee
c) Suppose the person drinks a cup of coffee at 7 am, and then drinks a cup of coffee at the end of each hour until 7am next
‘day. How much caffeine will be in the body at the end of the 24 hours.