#include <iostream.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>

int Sum(int,int);
int Diff(int,int);
float Mult(int,int);
void main()
{
	srand( (unsigned)time( NULL ) );
	int number1,number2;
	number1=rand()%100;
	number2=rand()%30;
	int s=Sum(number1,number2);
	int d=Diff(number1,number2);
	float prod=Mult(s,d);
	cout << "The first number is : " <<number1 <<"\n";
	cout << "The second number is : " << number2 << "\n";
	cout << "the Sum is : "<< s <<"\n";
	cout << "The Diff is : " << d<<"\n";
	cout <<"The product is : "<< prod << "\n";
	if(d >=0)
	{
		double square=sqrt(d);

		cout << "The squre rooot is : " << square << "\n";
	}
	else
	{
		cout <<"Can't calculate The Sqrt of negative numbers \n";
	}

}

int Sum(int x,int y)
{
	return x+y;
}
int Diff(int x,int y )
{
	return x-y;
}
float Mult(int x,int y)
{
	return (float)x*y;
}