PREP FOR MIDTERM


#include <cstdlib>
#include <iostream>
#include <stdio.h>

using namespace std;

int main () {
  int a = 5 ; int b = 2 ; string str = "STRING";

  try {
      if ( a==5) {
         
               try {
                 
                   try{
                       if(b==2) throw 3;
                      }
                   
      catch (int number) { cout << " INT NUMBER "<<endl;}
      catch (string stringg) {cout << " STRING STRINGG " <<endl;}
   
                 
                   }
                 
      catch (int number) { cout << " INT NUMBER "<<endl;}
      catch (string stringg) {cout << " STRING STRINGG " <<endl;}
   
                               
                   throw str;
                   }
      }
   
      catch (int number) { cout << " INT NUMBER "<<endl;}
      catch (string stringg) {cout << " STRING STRINGG " <<endl;}
      catch (...) { cout << "Hmmmmmm"<<endl;}
       
 system("PAUSE");
    return EXIT_SUCCESS;
}