Consider the following program in C++: #include #include #include using namespace std; int main() { int num1; int num2; cout << fixed << showpoint << setprecision(2); cout << "Enter two integers: "; cin >> num1 >> num2; cout << endl; if (num1 != 0 && num2 != 0) cout << sqrt(abs(num1 + num2) + 0.5) << endl; else if (num1 != 0) cout << floor(num1 + 0.5) << endl; else if (num2 != 0) cout << ceil(num2 + 0.5) << endl; else cout << 0 << endl; return 0; } a. What is the output if the input is -23 8? b. What is the output if the input is 12 32? c. What is the output if the input is 15 0? d. What is the output if the input is 0 -36? e. What is the output if the input is 0 0?
Consider the following 
#include  
#include  
#include  
using namespace std;
int main()
{
   int num1;
   int num2;
   cout << fixed << showpoint << setprecision(2);
   cout << "Enter two integers: ";
   cin >> num1 >> num2; cout << endl;
     if (num1 != 0 && num2 != 0)
         cout << sqrt(abs(num1 + num2) + 0.5) << endl;
    else if (num1 != 0)
         cout << floor(num1 + 0.5) << endl;
    else if (num2 != 0)
          cout << ceil(num2 + 0.5) << endl;
    else
          cout << 0 << endl;
     return 0;
 }
a. What is the output if the input is -23     8?
b. What is the output if the input is 12     32?
c. What is the output if the input is 15       0?
d. What is the output if the input is 0      -36?
e. What is the output if the input is 0        0?
Trending now
This is a popular solution!
Step by step
Solved in 6 steps with 4 images









