Calculate Jacket Size with Height, Weight, and Age | C++ Loop Tutorial

  • Context: C/C++ 
  • Thread starter Thread starter Streitsky
  • Start date Start date
  • Tags Tags
    C++ Loop
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 3K views
Streitsky
Messages
2
Reaction score
0
Hey guys it my first post, so please be nice :). So I am doing a problem right now and I can decide how to go about it... I am kinda lost right now, I could use an If/Else statement but it would take along time so I decided to use a loop, so here is the problem.

Program asks user to enter height weight and age. (Completed already)

Jacket size = height times weight divided by 288 and then (This is where I am having trouble>>) adjusted 1/8 of an inch for 10 years after 30 (For example adjusted 1/8 of an inch at 40, 50, 60, 70, but not at 39, 49, 59, 69) Thanks for your help
 
Physics news on Phys.org
hmm yea, maybe I shouldn't loop it, ill try the if else statement thanks