Question: C++ program Please answer with comments and using 1 16 League of Legends: Problem Description In la gue of Legends a player's Eff ctive Health

 C++ program Please answer with comments and using 1 16 League
C++ program
Please answer with comments and using
of Legends: Problem Description In la gue of Legends a player's Eff

1 16 League of Legends: Problem Description In la gue of Legends a player's Eff ctive Health when defending against physical dana ge is given by E g as where H is health, A is armor and E is the effective health. Health costs 2 gold per unit, and armor costs 18 gold per unit. In order for the player to survive as long as possible jt is important to maximize the player's Effective Health E. 1.1 Program Description For a given amount of gold that the user wishes to spend, we can use a computer amount of health iH and armor A that will maximize the Effecetive Heath E. The two formulae that we will use E-H(100+A) 100 GoldToSpend-2 H+I8.A Note that A and H can only be purchased in whole artnor. units, le. it doesn't make sense to buy 1.5 health or 6.7 that swks the player how mach gold they wish to spend, then calculates the optimal and A that the weer should purchase in order to maximize E Note: Loop structures must e waed to solve the problem, otherwise o point for this problem Tips to solving this

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!