#include<iostream>
using namespace std;
int main()
{
int a[9],x,f=1;
cout<<"Please enter an integer [0-10 only] : ";
cin>>a[x];
for(x=0;x<=10;x++){
f*=a[x];}
for(x=0;x<=10;x++){
if (a>=0){
cout<<a<<"! is : "<<f<<endl;
}
else if (a<0){
cout<<"Out of Range!"<<endl;
}}
system ("pause");
return 0;
}
Thank you sir. I'm sorry i'm just a newbie here that's why. That helped but sad to say, it shows wrong factorial.