CppPrimer_ex5_25

Run Settings
LanguageC++
Language Version
Run Command
#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; }
Editor Settings
Theme
Key bindings
Full width
Lines