test
#include <iostream>
using namespace std;
const int DivideByZero='0';
const int DivideByOne=9;
double divide (double x, double y){
if (y==0)
{
throw DivideByZero;
}
if (y==1)
{
throw DivideByOne;
}
y=y-1;
cout<<y <<endl;
return x/y;
}
int main()
{
try {
divide(10,0);
}
catch (char i){
if (i == DivideByZero)
{
cerr<<"Divide By Zero Error";
}
}
catch (int i){
if (i == DivideByOne)
cerr<<"Divide By One Error";
}
cout << "Hello, world, from Visual C++!" << endl;
char a ;
cin >> a;
return 0;
}