#include <iostream>
#include <ctime>
using namespace std;
void Chimera();
void LionBite();
void GoatHorns();
void SnakeTailBite();
void DragonBreath();
unsigned short input;
int main()
{
srand(time(NULL));
unsigned short Anum, Bnum, Cnum, Dnum;
Anum = rand() % 25 + 1;
Bnum= rand() % 55 + 1;
Cnum= rand() % 80 + 1;
Dnum= rand() % 100 + 1;
cout << "Please enter the number of times you want the Chimera to attack" << endl;
cin >> input;
for (unsigned short i = 0; i <= Anum; i++)
{
cout << "The lion head bites you!" << endl;
}
for (unsigned short i = 0; i <= Bnum; i++)
{
cout << "The goat head gores you with its horns!" << endl;
}
for (unsigned short i = 0; i <= Cnum; i++)
{
cout << "The snake head on the end of the tail bites you with poisonous fangs!" << endl;
}
for(unsigned short i = 0; i <= Dnum; i++)
{
cout << "The dragon head breaths fire on you!" << endl;
}
return 0;
Chimera();
LionBite();
GoatHorns();
SnakeTailBite();
DragonBreath();
}
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;
}
Thank you very much but the main problem is that i just want one for loop and create all that inside Chimera function... I am sorry I am just a beginner..
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;
}