logo codesdope

factorial in c++

   sahebalam , sagi rama krishna college

Write c++ program to find factorial of a number?


Answers

  •    manak.upadhyay

    include <iostream>

    using namespace std;

    int main()

    {

    int num;

    cin » num;

    int fact=1;

    while(num>0)

    {

    fact*=num;

    num--;

    }

    cout « fact « endl;

    return 0;

    }


    • thanks
      - sahebalam
    • thanks
      - sahebalam

Download Our App.
BlogsDope App
Get it on Google Play
Write your answer
Close

Welcome.please sign up.

Close

Welcome.please login.