```
#include<iostream.h>
#include<conio.h>
#include<dos.h>
void product(int b,int e)
//this is for the case no.1
int product(int b,int e)
{int x,p=b;
for(x=1;x=e,x++)
p=p*b;
return p;
}//End case no1
//this is for the case no.2
long long int factorial(int no)
{int Loop,F=1;
for(Loop=1;Loop<no;Loop)
{F=Loop*F;
<<Loop;
}
<<F;
}//End case no2
main(void)
{int base,exponent,number,choices;
long long int prod;
clrscr()
gotoxy(10,10);
cout<<"1 Exponent";
gotoxy(15,15);
cout<<"2 Factorial";
gotoxy(20,20);
cout<<"SELECTION: "
cin>>choices;
switch(choices)
{
case 1:
{clrscr();
cout<<"Base: ";
cin<<base;
cout<<"Exponent: ";
prod=product(base,exponent);
cout<<"The product of"<<base;
cout<<"raise to"<<exponent;
cout<<"is"<<prod;
getch();
break();
}
case 2:
{clrscr();
cout<<"Enter a positive Integer: ";
cin<<number;
if(number>0)
factorial(number);
getch();
break();
}
getch();
}
//End the program(I hope so!)
```