#include"iostream"
#include"stdexcept"
using namespace std;
int main(){
int num, num2;
while (cin >> num >> num2) {
try {
if (num2 == 0)
throw runtime_error("The num2 cannot be 0");
cout << num / num2 << endl;
} catch (runtime_error err) {
cout << err.what()
<<"\nTry Again? Enter y or n" << endl;
char c;
cin >> c;
if (!cin || c == 'n')
break;
}
}
return 0;
}
#include"stdexcept"
using namespace std;
int main(){
int num, num2;
while (cin >> num >> num2) {
try {
if (num2 == 0)
throw runtime_error("The num2 cannot be 0");
cout << num / num2 << endl;
} catch (runtime_error err) {
cout << err.what()
<<"\nTry Again? Enter y or n" << endl;
char c;
cin >> c;
if (!cin || c == 'n')
break;
}
}
return 0;
}