मराठी
महाराष्ट्र राज्य शिक्षण मंडळएचएससी विज्ञान (संगणक विज्ञान) इयत्ता १२ वी

Write C++ program to find a factorial of integers from l to 5. - Computer Science 1

Advertisements
Advertisements

प्रश्न

Write C++ program to find a factorial of integers from l to 5.

कोड लेखन
Advertisements

उत्तर

#include <iostream.h>
void main ()
{
    int fact, i, j;
    fact = 1;
    cout << "Number" << "\t" << "Factorial";
        for (j = 1; j< = 5; j++)
        {
            fact = fact * j;
        }
        cout<<i<<"\t"<<fact<<endl;
    }
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2021-2022 (March) Set 1

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×