Skip to content

Conversation

roeey777
Copy link

Signed-off-by: Eyal Royee [email protected]

@xlogix xlogix added Hacktoberfest Not assigned to an issue PR has to be assigned to an issue. labels Oct 25, 2019
@xlogix xlogix added this to the Hacktoberfest milestone Oct 25, 2019
@xlogix
Copy link
Member

xlogix commented Oct 25, 2019

It would be great if you can add the description along with the issue number.
Feel free to use our contribution guidelines (https://github.com/fnplus/interview-techdev-guide/blob/master/CONTRIBUTING.md#how-to-contribute-an-implementation-code) for reference

@poojapatidar21
Copy link
Contributor

include <stdio.h>
int main()
{
int n, i;
unsigned long long factorial = 1;
printf("Enter an integer: ");
scanf("%d",&n);
if (n < 0)
printf("Factorial of a negative number doesn't exist.");
else
{
for(i=1; i<=n; ++i)
{
factorial *= i;
}
printf("Factorial of %d = %llu", n, factorial);
}
return 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest Not assigned to an issue PR has to be assigned to an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants