Question: Run Share main.c Console Shell Markdown / Problem 1 End / } else if(opt - 2) { . Problem 2: Pokemon Damage 1 TODO: Your

 Run Share main.c Console Shell Markdown / Problem 1 End /
} else if(opt - 2) { . Problem 2: Pokemon Damage 1
TODO: Your 2 code goes here 1 Good luck! 41 42 43
44 45 46 47 48 49 50 51 52 53 54 55

Run Share main.c Console Shell Markdown / Problem 1 End / } else if(opt - 2) { . Problem 2: Pokemon Damage 1 TODO: Your 2 code goes here 1 Good luck! 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 50 59 50 61 62 63 64 65 Preview of README.md Total Damage, then print the result like so 1. Print Pokemon Mased Attack Namell. For example, Bulbasaur used Vine Whip or Pikachu used Tackten 2. If the Modifier is print It has no effect, and exit the program 3. If the Modifier is 0.25 or 0.5, print It's not very effectiv... 4. If the Modifier is 2 or 4, print It's super effective 5. Print Totat Total Damage Damage where Total Damage is rounded down. For example, Totats 54 Damage. In 6. Exit the program Your code must be written after the line that reads//T000: Your code goes here. Make sure to comment your code to make clear what you intend to do with it! Problem 2 End / } else if(opt 3) Probles 31 Restaurant Int nunPeople: double total - 0.0: I printf("How many people in your group?\") scanf("d", GnuPeople): Rubric Point 3 35 1/TODO: Complete the P code below HINT : Use strompt! HINT 2 If you use for loop for the error case you'll need to change the value of Inside the loon printf("what would you like to order? "); char order (20): scanf("s",order); rublend > 25 66 67 68 69 70 71 2 Code is clean and well commented, passes all automated tests Code is a little messy, tails some tests Code has serious issues (e. does not compile) Code is messy, uncommented, is far from complete No functional changes from original code FR SLO 15 5 0 10 + Share + IND Console Shell Markdown Preview of README.md Problem 2: Pokemon Damage In case you didn't know, Pokemon is a very famous videogame that involves capturing cute monsters and using them to fight against each other (Why? It's based on insect fighting, which is a thing that does happen!) Being a videogame, a lot of things are abstracted into numerical values. So, when Pokemon fight each other, they do a numerical value as damage. This numerical value is calculated using the following floating-point formula: Damage = 2x Level +2) X Power x A/D +2) Modifier 50 +2) n"); Mour code will ask the following information, in that order: 1. Pokemon Name. A string with up to 30 characters. 2. Pokemon Level. An integer between 1 and 100. 3. Attack Name for the Attack being used by the Pokemon. A string with up to 30 characters. 3. Power of the Pokemon's specific attack. An integer between 20 and 130. 4. The Attack value of the attacking Pokemon. An integer between 1 and 1000. 5. The Defense value of the defending Pokemon. An integer between 1 and 1000. the error Inside 6 Angiol ] cxam practical Joer 20B/main.co main UTCP C51320/oxam 1 practical Jocr1208 U 9. Share + 10 Console Shell Markdown Preview of README.md 6. A special Modifier given as a double value. In the games there's a whole process of calculating it, but in this short example it can be either O, 0.25, 0.5, 1, 2 or 4. After getting all this information, your code must check that the values are valid according to the rules mentioned above. If any number entered is not valid (For example, a Level of 0 or 101), your code must output INVALID INPUT and exit the program. If all the numbers are valid, use the formula above to compute the Total Damage, then print the result like so: 1. Print (Pokemon Name) used [Attack Name] ! . For example, Bulbasaur used Vine Whip! or Pikachu used Tackle! . 2. If the Modifier is 0, print It has no effect. and exit the program. 3. If the Modifier is 0.25 or 0.5, print It's not very effective... 4. If the Modifier is 2 or 4, print It's super effective! 5. Print Total: [Total Damagel Damage. In, where [Total Damage) is rounded down. For example, Total: 54 Damage. In. 6. Exit the program Your code m be written after the line that reads // TODO: Your P2 code goes here. Make sure to comment your code to make clear what you intend to do with it! } else if (opt == 2) { Problem 2: Pokemon Damage 43 44 45 46 47 48 49 50 51 52 : TODO: Your P2 code goes here 77 Good luck!! Problem 2 End */

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!