Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
#include
#include
#include
using namespace std; int main() { double a = 1e-200; double b = 1e-200; try { if (a < DBL_MIN / b) { throw underflow_error("The result is too small for a double"); } cout << a * b; } catch (const underflow_error& e) { cout << e.what(); } return 0; }
The result is too small for a double