Factorial and Prime Problem using functions
Can any correct this programming please need help on this 1..... cant really get this one....thank you
Code:
#include<stdio.h>
int Fact(int);
int Prime(int);
int main()
{
printf("Factorial %d\n", Fact(3));
printf("Prime %d", Prime(3));
Return 0;
}
int Fact(int n)
{
int i;
for(i=1;i<=n;i++)
{
i*n;
}
return i;
}
int Prime(int n)
{
int i;
for(i=1;i<=n;i++)
{
n/=n;
}
return i;
}
}
it made me go nosebleed over my shirt of thinking...btw im still new in Programming