{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

overflow_integer_division

overflow_integer_division - integer division num3 = num1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 // class 3 demo 2 #include <iostream> #include <cstdlib> using namespace std int main() { int num1 = 9 int num2 = 2 double num3 = 0.0 int salary = 999999999999999999 // overflow double radius = 1.00000000000000000077 // underflow num3 = num1 / num2
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // integer division num3 = num1 / double (num2) n // type casting the variable num1 and num2 is promoted cout << num3 << endl cout << salary << endl // overflow cout << 1 - radius << endl // underflow return 0 }// end of main...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online