We have to write a small program that takes some user input(height, weight, age)
ID: 3628998 • Letter: W
Question
We have to write a small program that takes some user input(height, weight, age) and then calculates and displays some other quantities to the user.I got stuck for the quantity Jacket size, this is the description on the homework:
Jacket Size = (height * weight)/288 , and adjusted by adding (1/8) for each 10 years over the age of 30.
For example, there is no adjustment for ages 30 trough 39, but 1/8 is added for age 40.
Anyone have an idea on how to accomplish this using any of these: if-else, while loops.
I dont want you to write the code for me, just to give me an idea on how to proceed.
Thanks
Explanation / Answer
c=(age-30)/10
if age>30
{ if age %10 ==0
size= size+ c*(1/8)
}