Having to solve a fraction
The fraction is n!/(4^(n^2)). For example, when I enter the value of n = 3, i get Factorial = 6, Numitor = 262144, but get Rezultat = 0. What should I do that Rezultat shows the actual value of the fraction. I thought about changing the data type of rezultat to something, but I'm not sure. Any help is appreciated. This is my code #include <iostream> #include <cmath> using namespace std; int nFactorial(unsigned int N) { unsigned long long Factorial=1; int i; for(i=1;i<=N;++i) { Factorial*=i; } return Factorial; } int numitor(unsigned int N) { float n_numitor=pow(4, pow(N, 2)); return n_numitor; } int main() { unsigned int n; cout<<"Introduceti n = ";cin>>n; cout<<"Factorial = "<<nFactorial(n)<<endl; cout<<"Numitor = "<<numitor(n); float rezultat=nFactorial(n)/numitor(n); cout<<endl<<"Rezultat = "<<rezultat; return 0; }