I need to write a program, something like this: Write a program which prompts the user for a number between 1 and 50 and which passes that number to a function which calculates the factorial of the number. The function must return the answer and main() must print it. Use recursion.What can be wrong.PLEASE
#include<stdio.h>
int factorial (int a,int b);
void main (void)
{
int fact;
printf("Enter a number between 1 and 50: ");
scanf("%d",&x);
fact=factorial (x,50);
printf("The factorial is %d",fact);
}
int factorial (int a,int b)
{
return (factorial 50/(b-a));
getchar();
}