// Allows us to see what happens when we input data to divide by // zero and take the square root of a negative number. These run-time // errors may be handled differently by different compilers. #include #include void main() { int a,b; double x,y,z; cout << "Enter 2 integers: "; cin >> a >> b; x = 1./(a-b); cout << "1/(" << a << " - " << b << ") = " << x << endl; cout << "Enter a real number: "; cin >> y; z = sqrt(y); cout << "The square root of " << y << " is " << z << endl; }