كود بلغة HTML:
#include <iostream.h>
void main ()
{
int x=0;
int c=1;
do
{
cout<<"This program calculates the factorial of a number.\n";
cout <<endl<< "please Enter Number:";
cin>>x;
}while (x<=0);
for (int i=x; i>0;i--)
{
c=c*i;
}
cout<<endl<<"The Factorial of "<<x<<" is:"<<c<<endl;
}
هذي محآولتي للسؤآل آلثآني .!