Question: integer variable benefit and assigns 1.54 to the double variable cost if the integer variable age is less than 41. You may assume that all
integer variable benefit and assigns 1.54 to the double variable cost if the integer variable age is less than 41. You may assume that all variables have been declared correctly and that the variable named age has been initialized. 3. Compose a complete C++ if-else statement that assigns 12 to the variable boost if the variable tone is less than 20 , otherwise, it should assign 96 to the variable boost. You may assume that all variables have been declared correctly and that the variable named tone has been initialized. 4. Write a complete C++ if-else-if statement that assigns "platinum", "Gold", or "Silver" to a string variable named level depending on the value in a double variable named gift. Platinum status is awarded for donations of $12,000 or more. Gold status is awarded for donations that are not more than or equal to $12,000 but are at least $7,000. Silver status is awarded for donations that are less than $7,000. You may assume that the variable named level has been declared as a string data type and that the variable named gift has been declared as a double data type and has been initialized to a value that is greater than zero. 5. Compose a complete C++ if-else statement that determines whether the value of the variable named speed is outside the range of values from 27 through 78. If the variable speed contains a value that is outside this range, your code should display "Invalid speed," "in the console window. Otherwise, it should display "valid speed," in the console window
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
