#include<iostream>
using namespace std;
int main()
{
int a,b;
cout<<"\n\n\tEnter the values of a & b :";
cin>>a>>b;
int x=(a-b);
try
{
if(x!=0)
{
cout<<"\n\n\tResult = "<<(a/(a-b));
}
else
{
throw(x);
}
}
catch(int i)
{
cout<<"\n\n\tDivision by zero :";
}
return 0;
}
No comments:
Post a Comment