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
