Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you check my code, I can't find where it's wrong for this assginment #include #include using namespace std; int main() { float weight, height;
Can you check my code, I can't find where it's wrong for this assginment
#include
int main() { float weight, height; cout > weight; cout > height; if((weight 160)) { cout 190 ) && (weight = 68) && (height 75) && (weight 77) && ((weight > 220) && (weight 250) && weight > 220) { cout
c++
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 wingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started