#include<stdio.h>
#include<conio.h>
int main()
{
int w;
printf("\nEnter the weight: ");
scanf("%d", &w);
printf("\nBoxer's class is : ")
if(w < 115)
printf("\nFlyweight.");
else if(w >= 115 && w <= 121)
printf("\nBantamweight.");
else if(w >= 122 && w <= 153)
printf("\nFeatherweight.");
else if(w >= 154 && w <= 189)
printf("\nMiddleweight.");
else
printf("\nHeavyweight.");
getch();
return 0;
}
Ad
Chapter - 3: The Decision Control
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 browser's weight class. Flyweight : <115 Bantamweight: 115 - 121 Featherweight: 122 - 153 Middleweight: 154 - 189 Heavyweight: >= 190
Ad
Ad