0
Plz give me the reason why this is not giving correct output
#include <stdio.h> int main() { int i=1,num,fact=1; printf("Enter the number to find its factorial"); scanf("%d",&num); { for(i=1;i<=num;i++) fact=fact*i; printf("Factorial : %d",num); } return 0; }
2 Antworten
+ 6
you print out "num" instead of "fact"
+ 1
Manoj Sonpethkar ,
Please add a tag for the language.