Write a Program of Factorial in C++.
#include <iostream.h> #include <conio.h> void main(){ clrscr(); int i,n,fact=1; cout<<"enter any number:"; cin>>n; for(i=0;i<n;i++){ fact=fact*1; } cout<<"factorial is :"<<fact; getch(); }
Output
(Visited 211 times, 1 visits today)
Written by: