Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ In a two-person card game, the players each start with 20 health points and play until one is reduced to 0 or less. If

image text in transcribed

C++

In a two-person card game, the players each start with 20 "health points" and play until one is reduced to 0 or less. If a player reduces the other to 0 health, they are the winner. If the winner still has 10 or more of their health points left, it is declared a "crushing win" (or "crushing loss" depending on your perspective). Write a program to read in the final health values for the two players and print out the outcome of the game from the perspective of player 1 (the first health value) - Win, Lose, Crushing Win, Crushing Loss. For example, if the two values were 8 and 0 you should print Win. If the two values were 1 and 16 you would print Crushing Loss

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions