Skip to content

Instantly share code, notes, and snippets.

@jagdish4501
Created March 30, 2021 07:12
Show Gist options
  • Save jagdish4501/8461692bf47de87490155baf7760b4bc to your computer and use it in GitHub Desktop.
Save jagdish4501/8461692bf47de87490155baf7760b4bc to your computer and use it in GitHub Desktop.
Write a program to find the factorial value of any number entered through the keyboard.
#include <stdio.h>
int main()
{
int a, num, facto = 1;
printf("please type any number=");
scanf("%d", &num);
for (a = 1; a <= num; a++)
{
facto = facto * a;
}
printf("factorial value of number %d is =%d", num, facto);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment