Suppose that num is an int variable. Consider the following C++ code.cin >> num;if (num >= 0)switch (num % 3){case 0:num--;break;case 1:++num;break;case 2:num = static_cast(pow(num, 3.0));break;}else{num = -num;num = static_cast(sqrt(num * 1.0));}cout < num=""><>a. What is the output if the input is 7?b. What is the output if the input is 23?c. What is the output if the input is 20?d. What is the output if the input is -9?
else{num = -num;num = static_cast(sqrt(num * 1.0));}cout < num=""><>a. What is the output if the input is 7?b. What is the output if the input is 23?c. What is the output if the input is 20?d. What is the output if the input is -9?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here