CppPrimer_ex5_25
#include <iostream>
#include <stdexcept>
using namespace std;
int main() {
while(cout << "Input two integers:\n") {
int i,j;
cin>>i>>j;
try {
if (j==0)
throw runtime_error("divisor is 0");
cout << i/j << endl;
} catch (runtime_error err) {
cout << err.what() << endl;
}
}
return 0;
}INFO