Search⌘ K

Example 16: Determine the Weight Class of a Boxer

Explore how to use decision-making structures in C to classify boxers into weight categories based on their weight input. Understand the use of if conditions to handle various weight ranges and invalid inputs, helping you write clear and maintainable programs for real-world classification problems.

We'll cover the following...

Problem

In boxing, the weight class of a boxer is decided as per the following table. Write a program that receives weight as input and prints out the boxer’s weight class.

Boxer Class Weight in Pounds
...