Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with my C++ Program For my computer class we are having a open discussion where we post scenarios and in turn someone has to

Help with my C++ Program

For my computer class we are having a open discussion where we post scenarios and in turn someone has to go ahead and code a solution to the scenario that is posted. The one that I am doing is based off of fortnite and takes in different factors in order to determine whether or not to push someone (play offensively) in game. (Has to be C++)

The following code is what I have so far:

image text in transcribed

image text in transcribed

image text in transcribed

The errors I am having so far:

image text in transcribed

Each of my while loops work as intended but the final loop at the end is broken and will not loop to receive further input instead it just prints out everything inside of it.

Things I would like to possibly add:

I figured since my program is somewhat flawed in the sense that if you are told to not push a enemy until you meet the specific parameter for that loop you cannot go back and change any of the previous integers if they have changed during your game play therefore I would like to implement a code that allows for me to enter a specific character in order to return back to the first loop such as Press z at any time to return to the beginning but I would like to have this option available throughout the whole program. I may also like to add maximums to the program, for example one of the variables is Health and so I would like to put a cap on it since in game you cannot go past 200 health.

Source.cpp* + x Scenario1 1 #include > Health; 25 26 27 28 29 30 percent .80 Health; cout > Mats; 32 while (Mats > Health; 25 26 27 28 29 30 percent .80 Health; cout > Mats; 32 while (Mats

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions