+ 2

How to calculate factorial and the series must be visible

Use C language

20th Oct 2019, 9:32 AM
VANKAYALA MOHAN SAI KRISHNA
VANKAYALA MOHAN SAI KRISHNA - avatar
2 Antworten
+ 1
a = input() fact=1 for i in range(1,a+1): print(str(i)+"*",endl='') fact=fact*i print(fact)
20th Oct 2019, 7:11 PM
Manoj
Manoj - avatar
0
#include <stdio.h> int main() { int n,i;long int fact=1; printf("Enter n value"); scanf("%d",&n); printf("\n n value is %d ",n); for(i=1;i<=n;i++) { fact = fact * i; } printf("\n factorial is %ld ",fact); }
20th Oct 2019, 7:12 PM
VANKAYALA MOHAN SAI KRISHNA
VANKAYALA MOHAN SAI KRISHNA - avatar