c program to check factorial main


C Program to check FACTORIAL

 

main()

{

            int i,j,m,fact,sum=0;

          clrscr();

          printf("ENTER THE NO.: ");

          scanf("%d",&m);

          for(i=1;i<=m;i++)

          {

                   fact=1;

                             for(j=1;j<=i;j++)

                             {

                                      fact=fact*j;

                             }

                    printf(" %d * ",i);

          }

          sum=sum+fact;

          printf(" = %d",sum);

          getch();

}

 

OUTPUT :

ENTER NO: 5

1 * 2 * 3 * 4 * 5 * = 120

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: c program to check factorial main
Reference No:- TGS0159286

Expected delivery within 24 Hours