Menu

[Solved]-Question 12 Following Correct Code Snippet Throwing Pair Dice Get Sum Numbers Two Dice 2 1 Q37294345

QUESTION 12 Which of the following is the correct code snippet for throwing a pair of dice to get a sum of the numbers on twoQUESTION 12 Which of the following is the correct code snippet for throwing a pair of dice to get a sum of the numbers on two dice between 2 and 12 w different probabilities? rand() 11+2 rand () % 12 + 2 (rand () 6 + 1) + (rand ( ) 6 + 1) (rand ( ) % 6) + (rand ( ) % 6) QUESTION 13 What is the problem with the following code snippet? double discount (double& cost) return (0.9 cost) int main cout << discount (49-95) The data type returned by the function discount does not match the return type The function discount must return void. The argument to the function discount must be a variable. The code is correct. QUESTION 14 In what situations is a for) loop more appropriate than a while() loop? When the number of iterations is known ahead of time. When asking for an unknown number of user input values. When the correct number of iterations for the loop may be zero. They are equivalent, so neither is preferred. Show transcribed image text QUESTION 12 Which of the following is the correct code snippet for throwing a pair of dice to get a sum of the numbers on two dice between 2 and 12 w different probabilities? rand() 11+2 rand () % 12 + 2 (rand () 6 + 1) + (rand ( ) 6 + 1) (rand ( ) % 6) + (rand ( ) % 6) QUESTION 13 What is the problem with the following code snippet? double discount (double& cost) return (0.9 cost) int main cout

Expert Answer


Answer to QUESTION 12 Which of the following is the correct code snippet for throwing a pair of dice to get a sum of the numbers o… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *