Question: I'd like this same c++ program but with the addition of the underflow and the overflow. As well as the mantissa: #include #include using namespace

I'd like this same c++ program but with the addition of the underflow and the overflow. As well as the mantissa:

#include #include using namespace std; int main() { float c; cout << "Enter the real number: "; cin >> c; printf(" Floating number: %.2f ", c); int n; cout << " Choose the exponent of size 1 or 2 (1,9) or (1-18):"; cin >> n; switch (n) { //Case 1 for integer values lies form 10^1 to 10^9 case 1: { int k2 = 1e9; //Comparing whether the entered values fit in this program if (c <= k2) cout << "Yes "; else cout << "No "; break; }

//Case 2 for integer values lies form 10^1 to 10^18 case 2: { long long int k1 = 1e18; if (c <= k1) cout << "Yes "; else cout << "No "; break; } default: {cout << "No "; break; } } system("pause"); return 0; }//End main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!