Hi Friends ! You are on HR Developers website. Here you can find the codes of different languages like c ,c++ , java, pyton and many other languages.
#include<iostream>
using namespace std;
int main()
{
int i,num,f=1;
cout<<"please enter your number:";
cin>>num;
for(i=1;i<=num; i++)
f=f*i;
}
cout<<"the factorial of the number is:"<<f<<endl;
No comments:
Post a Comment