#include using namespace std; int f1(int i) throw(int , double) { if (i<0) throw i; if (i>0) throw (double)i; return i; } int f2(int i) throw() { if (i<0) throw i; if (i>0) throw (double)i; return i; } int f3(int i) { if (i<0) throw i; if (i>0) throw (double)i; return i; } int main() { try { f1(-10); f1(10); f2(-10); f2(10); f3(-10); f3(10); } catch (int i) { cout << " integer exception raised and handled " << endl; } catch (double d) { cout << " double exception raised and handled " << endl; } return(0); }