Question: // This is Program 6-8 in Tony Gaddis' textbook, C++ Early Objects. #include using namespace std; void showSum(int num1, int num2, int num3) { cout
// This is Program 6-8 in Tony Gaddis' textbook, C++ Early Objects. #includeusing namespace std; void showSum(int num1, int num2, int num3) { cout << "The sum is " << (num1 + num2 + num3) << "." << endl; } int main() { int value1, value2, value3; // Get 3 integers cout << "Enter three integers (separated by spaces) and I will display their sum: "; cin >> value1 >> value2 >> value3; if ((value1==value2) && (value2==value3)) { cout << "These numbers are all the same!" << endl; } showSum(value1, value2, value3); return 0; }
How many functions are defined in this program?
How many variables are declared in the main() function?
Are there any comparison operators (relational operators) in this program? (Answer yes or no.) If there are none, skip.
What kind of comparison operators are used?
What logical operators, if any, are used in this program?
Note: This code is a C++ program. and, this question is a one question. Thanks.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
