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

Assignment Help:

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);

  } 


Related Discussions:- C program to compute the factorial

Chapter 21, Test scores solution help. Three member variables

Test scores solution help. Three member variables

C program to copy the contents of a file, C Program to copy the contents of...

C Program to copy the contents of a file: void main()    {   ifstream fin("input.txt");   ofstream fout("output.txt");   char ch;   while (fin)       {

How does a union differ from a structure, Problem: (a) (i) What is a...

Problem: (a) (i) What is a structure? (ii) How does a structure differ from an array? (b) Declare a structure, called account, that will contain the following data me

Define external static storage class - computer programming, Define Externa...

Define External Static Storage Class - Computer Programming? An external static is declared outside of all the functions and is obtainable to all functions in that program. The

Explain nested classes, Nested Classes Many a times, it becomes essenti...

Nested Classes Many a times, it becomes essential to have a class contain properties of two other classes. One way is to explain a class within another - that is a class with m

Calculating interest, The interest charged on a loan banking facility is ca...

The interest charged on a loan banking facility is calculated based on principal amount, rate and time. implement a C program that can be used to automate the calculation of the in

Program of 2d byte array dynamicall, In this lab, please complete a given p...

In this lab, please complete a given program to perform the following tasks: 1. Allocate a 10 by 5 2D byte array dynamically. The way of allocation must be consistent with page

C program for sorting, C Program for SORTING # include stdio.h> void...

C Program for SORTING # include stdio.h> void main() {           char a;           int *p;           int i,j,temp;           clrscr();           p=&i;

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd