Created
March 30, 2021 07:12
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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