C program to check factorial, C/C++ Programming

Assignment Help:

C Program to check FACTORIAL

 

main()

{

            int i,j,m,fact,sum=0;

          clrscr();

          printf("ENTER THE NO.: ");

          scanf("%d",&m);

          for(i=1;i<=m;i++)

          {

                   fact=1;

                             for(j=1;j<=i;j++)

                             {

                                      fact=fact*j;

                             }

                    printf(" %d * ",i);

          }

          sum=sum+fact;

          printf(" = %d",sum);

          getch();

}

 

OUTPUT :

ENTER NO: 5

1 * 2 * 3 * 4 * 5 * = 120


Related Discussions:- C program to check factorial

Calculation, write a program to calculate the cuboid

write a program to calculate the cuboid

Assigment, Hi is there any chance to get assignment for fresher tutor

Hi is there any chance to get assignment for fresher tutor

Float number, We can combine more than one variable on the same line i.e. ...

We can combine more than one variable on the same line i.e.   float number1,number2,number3; etc Sometimes we want to mix the variable types used on the same line, this could

ASCII, A string S is said to be "Super ASCII", if it contains the character...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''''a''''-''''z'''') and

Define the modulo division operator in c language, Define the Modulo Divisi...

Define the Modulo Division Operator in c language? The C provides one more arithmetic operator % called as modulo division operator and this operator yields the remainder of an

Program that predicts users age, Program: Write a program that predicts...

Program: Write a program that predicts users' age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/she is younger or older than G (an

Write function that take array as argument, Write a function that takes an ...

Write a function that takes an array as the argument and returns the second largest element. Bonus (+5): Write a function that takes an array and a number n as arguments and return

What is mime, What is MIME? MIME - Multi-purpose Internet Mail Extens...

What is MIME? MIME - Multi-purpose Internet Mail Extensions. MIME types signifies a standard way of classifying file types over Internet. Browsers and Web servers have

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