#include <iostream>
float _div(float x, float y) {
if (y == 0) {
throw std::runtime_error("__Divide by Zero");
}
return y / y;
}
int main() {
float x = 234, y = 0;
try {
int result = _div(x, y);
std::cout << result << "\n";
}
catch (std::runtime_error& e) {
std::cout << "Error: " << e.what();
}
}
/*
run:
Error: __Divide by Zero
*/