Group Study
Friday, 19 February 2021
find a value of factorial for a given number
#include
main() { int n,i,fact=1; printf("Enter a number:"); scanf("%d",&n); for(i=1;i<=n;i++) { fact=fact*i; } printf("Factorial=%d",fact); return 0; }
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment