Question: Program is to be done in C++ Write the algorithm and its corresponding program with the following requirements to demonstrate a tournament against some monsters.
Program is to be done in C++
Write the algorithm and its corresponding program with the following requirements to demonstrate a tournament against some monsters.
- A switch to choose a weapon that does a certain amount of damage
- A for loop that runs 5 times and adapts the difficulty of the monster
- A random generator assigns points to a monster
- A life points accumulator that awards the points for killing a monster
- A decision making process that sees if your points plus the weapon is enough to kill a monster, or vice versa
- A congratulatory remark as they win each battle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
