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

double impart(double deimpartit, double impartitor)
{
	if (impartitor==0) throw "Eroare: impartire la 0";
	return deimpartit/impartitor;
}

void main(void)
{
	double de, im;
	cout << "\n Deimpartit= ";
	cin >> de;
	while (1)
	{
	   cout << "\n Impartitor= ";
	   cin >> im;
	   try
	   {
		   cout <<"\n Rezultat= " << impart(de,im) << " ";
		   exit(1);
	   }
	   catch (char* exceptie)
	   {
	 	   cout << "\n " << exceptie << " ";
	   }
	}

}