```
#include<iostream.h>
#include<math.h>
#include<stdlib.h>
unsigned long Ex;
unsigned long Ey;
unsigned long Sx;
unsigned long Sy;
char answer;
int exponent();
int squareRoot();
int squareRoot()
{
system("CLS");
cout << "Enter a number." << endl;
cin >> Sx;
system("CLS");
cout << sqrt(Sx) << endl;
cout << "Would you like to go again? (Y/N)" << endl;
cin >> answer;
if(answer == 'y' || answer == 'Y')
{
squareRoot();
}
else if(answer != 'y' || answer != 'Y')
{
cin.get();
}
return 0;
}
int exponent()
{
system("CLS");
cout << "Enter a number." << endl;
cin >> Ex;
system("CLS");
cout << "Enter an exponent." << endl;
cin >> Ey;
system("CLS");
cout << pow(Ex,Ey) << endl;
cout << "Would you like to go again? (Y/N)" << endl;
cin >> answer;
if(answer == 'y' || answer == 'Y')
{
exponent();
}
else if(answer != 'y' || answer != 'Y')
{
cin.get();
}
return 0;
}
int main()
{
system("CLS");
cout << "Would you like to calculate (E)xponents or (S)quare roots?" << endl;
cin >> answer;
if(answer == 'E' || answer == 'e')
{
exponent();
}
else if(answer == 'S' || answer == 's')
{
squareRoot();
}
else if(answer != 'S' || answer != 's' || answer != 'E' || answer != 'e')
{
cout << "Enter either S for square root or E for exponents." << endl;
main();
}
system("PAUSE");
return 0;
}
```