C program to compute the factorial, C/C++ Programming

Write a C program to compute the factorial of  5 i.e 1x2x3x4x5 etc

#include stdio.h
  void main()
  {
  char promt;   
  int factor;
  factor = 1*2*3*4*5;
  printf("The factorial of 5 i.e 5! is %d\n\r",factor);  
  printf("Press any key to exit \n\r");
  scanf("\n%c",&prompt);

  } 

Posted Date: 4/16/2013 1:34:41 AM | Location : United States







Related Discussions:- C program to compute the factorial, Assignment Help, Ask Question on C program to compute the factorial, Get Answer, Expert's Help, C program to compute the factorial Discussions

Write discussion on C program to compute the factorial
Your posts are moderated
Related Questions
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

In which condition a template a better solution than a base class? A: While you are designing a generic class to contain or manage objects of other types, while the format & beh

Project Description: We are seeking online invoice OCR solution. That will help us to automate accounts payable function. User should be able to use the offered pdf file or s

If quicksort is so quick, why bother with anything else? If bubble sort is so bad, why even mention it? For that matter, why are there so many sorting algorithms? Your mission (sho

Explain Operators in C Language? The C language is very rich in built - in - operators and it places more significance on operators than do most other computer languages. The C


Define Passing Structure to a Function? A structure is able to be passed as a function argument identical to any other variable. If we are merely interested in one member of a

Project Description: I will need a tutor that would help me out in Data Structure and learning Algorithm more at the mathematical/algorithmic level. The book is written by "by T

dispaly the last ant on rod