Question
Please solve the following problem: Make a program that simulates rock paper scissors by using C programming language, asking the user which weapon to select:
Please solve the following problem:
Make a program that simulates rock paper scissors by using C programming language, asking the user which weapon to select: rock, paper, scissors.
Also, the machine will have to randomly decide which weapon to attack with.
Generate a set of decisions to see who is the winner of the game. + rock beats scissors + scissors beats paper + paper beats stone
The game lasts 3 turns and at the end, it is necessary to see if the user or the computer won, the one that has won more turns/games.
+ If the user is the winner, ASCII art for the winner. + If the user is the loser, ASCII art for the loser. + If it is a tie, ASCII art draw.
At the end of each turn, the program has to show who won, and the screen must be cleared at the end of a turn. This program must include the commands: int or float, scanf, operators that are relational and /or arithmetic, functions if and else.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started