Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

=+ What topics should be provided in training programs?

Answered: 1 week ago