#include using namespace std; int main() { int i=0; int j=0; cout << " Type in a number " ; cin >> i; try { if ( i<0 ) throw j; else cout << " Number was " << i << endl; } catch (int j) { cout << " Exception raised " << endl; } return (0); }