Question: g: Design and implement complete points each) Write a complete C+ program called Threat Response, which uses nested if-ebse statements to describe the three-way choice
g: Design and implement complete points each) Write a complete C+ program called Threat Response, which uses nested if-ebse statements to describe the three-way choice animals (including humans) face confronted with a threat. That is: if we are not noticed, we freeze. If we are not trapped, we run. If we are noticed and are trapped, generate the following sample runs, de keyboard entries. noticed and are we fight. Your program should pending on the situation. Italicized characters are Sample run 1: Noticed? (y): n Freeze Sample run 2: Noticed? (y): y Trapped? (y): n Run Sample run 3: Noticed? (y):y Trapped? (y): Y Fight 17)Write a complete C++ program called Prime Numbers, which uses nested loops statements numbers in descending order. Your program should generate the following sample runs, depending on the situation. Italicized characters are keyboard entries. Sample run 1: Minimum? 10 Maximum? 30 There are 6 prime numbers between 10 and 30. 29 23 19 17 13 11 Sample run 2: Minimum? 60 Maximum? 80 There are 5 prime numbers between 60 and 80. 79 73 71 67 61 Sample run 3: Minimum? 195 Maximum? 234 There are 7 prime numbers between 195 and 234 197 199 211 223 227 229 233
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
