Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double dzielenie(double a, double b)
- {
- try
- {
- if(b==0)
- throw "Dzielisz przez zero";
- cout << a / b << endl;
- }
- catch (exception xyz)
- {
- cout << xyz.what() << endl;
- }
- catch (int x)
- {
- cout << "Cos z inta" << x << endl;
- }
- catch (...)
- {
- cout << "Totalna masakra " << endl;
- }
- }
- int main()
- {
- dzielenie(10,0);
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment