Divide by Zero

Description:

Divide two numbers. Throw an exception if the denominator is 0 and display "EXCEPTION". If denominator is not 0, display "VALID". Test Case 1 Input (stdin) 10 0 Expected Output EXCEPTION Not possible Test Case 2 Input (stdin) 10 2 Expected Output VALID

Program :

#include <iostream>

using namespace std;

int main()

{

int a,b;

  cin>>a>>b;

  if(b==0)

    cout<<"EXCEPTION Not possible";

  else

    cout<<"VALID";

return 0;

}