Breaking

Friday, 30 November 2018

Write A Program N!=1*2*3…N Terms.(Factorial)Print Result Of Factorial. | C Programing | Android Solution


Write A Program N!=1*2*3…N Terms.(Factorial)Print Result Of Factorial.



#include<stdio.h>
#include<conio.h>
void main()
{
                int i,fact=1,no;
                clrscr();

                printf("\n enter number for factorial");
                                scanf("%d",&no);

                for(i=1;i<=no;i++)
                {
                                fact=fact*i;
                }
                printf("\n factorial=%d",fact);

                getch();
}


OutPut :-



No comments:

Post a Comment