C program for function of find the factorial , C/C++ Programming

Assignment Help:

C Program for FUNCTION OF FIND THE FACTORIAL

float factorial(float);

void main()

{

          float i=0,c=0;

          clrscr();

          printf("ENTER THE DIGIT TO FIND THE FACTORIAL: ");

          flushall();

          scanf("%f",&i);

          c=factorial(i);

          printf("THE FACTORIAL OF %f IS %f",i,c);

          getch();

}

float factorial(float i)

{

          float j=0,k=1;

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

          {

                   k=k*j;

          }

          return(k);

}

OUTPUT :

ENTER THE DIGIT TO FIND THE FACTORIAL : 5

THE FACTORIAL OF 5 IS 120.000


Related Discussions:- C program for function of find the factorial

VS Project, Hi, I want to get rtsp source for windows

Hi, I want to get rtsp source for windows

Palindrome, A palindrome is a string that reads the same from both the ends...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

#luminous jewel polishing necklace, Ask question # Byteland county is very ...

Ask question # Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particu

Socket Programming, Need someone to look over my assignment for correctness...

Need someone to look over my assignment for correctness and make any necessary changes.

Prepare aime crossover alert expert adviso, Prepare aime crossover alert ex...

Prepare aime crossover alert expert adviso Project Description: Need to develop an expert advisor base on aime crossover alert indicator. Skills required is C Programming

Why php is sometimes called as embedded scripting language, Why PHP is some...

Why PHP is sometimes called as embedded scripting language? PHP is a high level language that is used to allow users to write and understand it in human readable form and also

Jewel polishing, Byteland county is very famous for luminous jewels. Lumino...

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Virtual memory implementation, I need help with virtual memory manager impl...

I need help with virtual memory manager implementation in C

I need computer application/program, I need Computer application/program. ...

I need Computer application/program. Project Description:                                                                I want a project done. It is a computer desktop appli

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