Thursday 24 December 2015

C program Factorial

#include <stdio.h>
 
int main()
{
  int c, n, fact = 1;
 
  printf("Enter a number to calculate it's factorial\n");
  scanf("%d", &n);
 
  for (c = 1; c <= n; c++)
    fact = fact * c;
 
  printf("Factorial of %d = %d\n", n, fact);
 
  return 0;
}

1 comment:

  1. 1xbet korean bookmaker review for bet365 bonus
    In this review, we review what the 1xbet korean bookmaker is betting on and where to play and see its bonuses and 1xbet 후기 promotions.

    ReplyDelete