Question: The program shall be done using C++ Language . Thanks Write a program for the 5 elements game using functions, control structures, and array Include

 The program shall be done using C++ Language . Thanks Write

The program shall be done using C++ Language .

Thanks

Write a program for the 5 elements game using functions, control structures, and array Include if...else, switch, for and while statements in the program. Create a program where Player 1 is the computer whereas Player 2 is the user. Prompt the user (Player 2) for a choice of element. Player can choose from one of the Five elements: wood, earth, metal, water, fire. Then randomly generate an element from the computer as the element of choice by Player 1. Here are the rules of the game: Each player has the same points at the beginning. If both players choose the same element, this play is a tie, all points of the player remains. If both players chose elements that are having "generating interaction", the total points of both player shall be kept in a temporary memory and the player who win the following trial will get all the points. If an "overcoming interaction is encountered, e.g., one player chooses water and the other chooses fire, the player who chose the water object wins this play because the water overcome fire

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!