Input
Output
#include <iostream> using namespace std; class A{ public: double division(int a, int b) { if( b == 0 ) { throw "Divide by zero is not possible!"; } return (a/b); } }; int main () { A a; int z; try { z=a.division(1, 0); cout << z << endl; } catch (const char* e) { cerr << e << endl; } return 0; }