Sunday, 17 December 2017

Learn C language Part 10 Factorial program using while loop in c





#include <stdio.h>

#include <conio.h>



main()

{



int fac=1,x=4;



printf("Enter the number: ");

scanf("%d",&x);



int y=x;

while(x>1)

{



fac=fac* x;



x--;

}



printf("%d ! = %d ",y,fac);



}


No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...