the third photo is the lab 3 program.cpp
Lizards fight in a rock-paper-scissors-like fashion. You will be writing a natural selection game by adding to the "Lab 3 Program.cpp" program, so that it executes as follows: 1) The user will enter a number 1-3 to select "orange", "blue", or "yellow". 2) The computer will select a number 1-3 randomly (The code to generate a random number and the required standard libraries are already included) 3) Determine who wins using if/else-if/else statements (Orange lizards beat blue lizards, blue lizards beat yellow lizards and yellow lizards beat orange lizards). Print the results to the console. 4) NOTE: It is possible for the player to win, lose, or tie 5) The result should include the player's selection and who won the match. 6) Make sure to check for bad numeric data. Terminate the program if the user selects an invalid number Sample Outputs Run 1: Natural Selection Game 1. Orange 2. Blue 3. Yellow Enter a number: 3 Blue beats yellow! You lose! E 18 Sample Outputs Run 2: Natural Selection Game 1. Orange 2. Blue 3. Yellow Enter a number: 7 ERROR - Invalid Input. Terminating Program. Sample Outputs Run 3: Natural Selection Game 1. Orange 2. Blue 3. Yellow Enter a number: 3 You both chose yellow! It's a tie! hun 03 V/TO-DO: Fill in the Authors Name Here W/TO-DO: Fill in the current date here V/CS1428 Lab //Lab 3 //Description: this program will allow the user to play a game of Orange, Yellow, Blue Lizard against a randomized computer opponent //****************This is the line of 80 characters in length 1/***** ****Your code should not exceed the length of the above line#************** #include
include using namespace std; int main() int user num //user's choice int comp num; //computer's choice 1/ Generate the computer's choice randomly: srand(time(NULL)); compnum - rand() * 3 + 1; // Get the user's choice cout "Natural Selection Games and 1. Orange" ondt 2. Blue