int main()
{
srand(static_cast<unsigned int> (time(0)));
unsigned short input;
cout << "Please enter the number of times you want the Chimera to attack" << endl;
cin >> input;
while (input < 101)
{
if (input <= 25 )
{
cout <<"The lion head bites you!" << endl;
}
else
{
if(input <= 50 && input > 25)
{
cout << "The goat head gores you with its horns!" << endl;
}
}
if (input <= 80 && input > 50)
{
cout << "The snake head on the end of the tail bites you with poisonous fangs!" << endl;
}
else
{
if (input <= 100 && input > 80)
{
cout << "The dragon head breaths fire on you!" << endl;
}
}
void Chimera()
{
cout << "Please enter the number of times you want the Chimera to attack" << endl;
return;
}
void LionBite()
{
cout << "The lion head bites you!" << endl;
return;
}
void GoatHorns()
{
cout << "The goat head gores you with its horns!" << endl;
return;
}
void SnakeTailBite()
{
cout << "The snake head on the end of the tail bites you with poisonous fangs!" << endl;
return;
}
void DragonBreath()
{
cout << "The dragon head breaths fire on you!" << endl;
return;
}
I actually have to convert it to "for loop" in a way that if I input 6 then it gives me 6 different random outputs but from the mentioned 'voids'. If that makes sense..