Multiple catch

Description:

Two input values are entered. By using multiple try catch statement the programmer have to print first value as it is and second values ascii value Test Case 1 Input (stdin) 5 B Expected Output Testing multiple catches: Catch a integer and that integer is:5 Catch a integer and that integer is:66 Test Case 2 Input (stdin) 56 2 Expected Output Testing multiple catches: Catch a integer and that integer is:56 Catch a integer and that integer is:50

Program :

#include <iostream>

using namespace std;

int main()

{

   int a;

  char k;

 

  cin>>a;

  cin>>k;

  cout<<"Testing multiple catches:\n";

  cout<<"Catch a integer and that integer is:"<<a;

  cout<<"\nCatch a integer and that integer is:"<<int(k);

return 0;

}