expressions math code example
Example: math expressions
#include<iostream>
#include<cmath>
#include<iomanip>
unsigned long long factorial(unsigned long long );
unsigned long long factorial(unsigned long long num){
if(num<=0)
return 1;
return num * factorial(num-1);
}
int main()
{
std::cout<<"Enter number\t"<<std::endl;
unsigned long long num,number;
std::cin >> num;
std::cout<<std::fixed<<std::setprecision(9)<<factorial(num)/pow(num,num)<<std::endl;
}