Question
C++ small Questions Q1: For an integer variable num, which has been declared and initialized, determine if it is a multiple of 6. If yes,
C++ small Questions
Q1: For an integer variable num, which has been declared and initialized, determine if it is a multiple of 6. If yes, assign true to bool variable isMultiple(already declared), otherwise, assign false to isMultiple. The answer is one single statement.
Q2: Complete the following program that reads three integers, and finds the smallest value of the three integers. [Hint: use a variable to keep track of the smallest number from num1, num2 to num3.]
#include
// your code ends here cout << min << endl; }
Q3: Given a double variable temperature, which has been declared and initialized. Print "hot"(no newline after) if the temperature is higher than 90. To test, enter a sequence of numbers terminated by 0. Code segment only, no complete program!
Q4: Given a double variable temperature which has been declared and initialized, print(no newline character after) "hot" if the temperature is greater than 90, print "not hot" otherwise. You don't need to use if-else to solve this problem. To test, enter a sequence of numbers terminated by 0. Code segment only, no complete program!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started