A dancing group with 10 dancers wish to increase the numbers of dancers they have by recruiting. The new dancers need to be grouped into weight category basge on the following:
*underweight if weight is < height/2.5,
*normal if height/2.5 <=weight<=height/2.3
*overweight if height/2.3 < weight
Where height is measured in centimeter and weight is measured in kilogram.
Use the criteria to implement a program solution. The program should have:
1. A function to colect the weight and height of any one dancer.
2. A function to compute the weight category of any one dancer.
3. A function to display the names of all the dancers whose name have been collected
NOTE: the list of the new dancers should be noted in ascending/descending order.
#include <string>
struct Dancer // contain dancer information
{
int Height;
int Width;
std::string Name;
int WeightClass;
};
void SetDancer(std::string n, int h, int w); // set a dancer struct
void SetClass(Dancer* d); // set dancer weight class based on funtion
void GetDancer(int dancer); // displayer a dancer object;
int main()
{
return 0;
}
Base code. Use what you have learned and fill it in.