Question: This is for C++ using if and else statements only. Write a program that asks the user for its weight (in pounds, may be decimal)

This is for C++ using "if" and "else" statements only. This is for C++ using "if" and "else" statements only. Write a

Write a program that asks the user for its weight (in pounds, may be decimal) and height (in inches, may be decimal) and determines the best position for him in a rugby team, using the following guidelines: A player weighing less than 160lbs is either a half-back, a wing, or a full-back. The smaller players (less than 68in) should be half-backs; the taller (over 75in) should be full- backs; the rest shall play wings. Between 160lbs (excluded) and 190 lbs (included) are the centers, regardless of their height. Above 190 lbs (strictly), but less than 220 lbs are the back-row. Players above 220lbs (strictly) but not above 250lbs and taller than 77in are the locks. The front-row is made of players above 220lbs (strictly) who are too short or too heavy to play as a lock. The prompts should be "Enter your weight:" and "Enter your height:"(in that order). The output should be one of the following: front-row, lock, back-row, half- back, center, wing, full-back. For example if the inputs are 240 and 79, the output should be lock. If the inputs are 160 and 68.5, the output should be wing. Sample output1: Enter your weight: 240 Enter your height: 79 lock Sample output2: Enter your weight: 160 Enter your height: 68.5 wing Submit file name: rugby.cpp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!