for(counter =1;counter<=n;counter++){fac=counter*fac;}cout<<"the factorial of the no is "<<fac;return 0;}void main(){double x;cout<<"Enter the number:";cin>>x;factorial(x);}---------------------------------------------------------------------

*****output****** enter the number: 6 The factorial of this number is:720