#include #include #include #include using namespace std; int main(int argc, char *argv[] ) { //calculated the factorial int n,i,j,ans; if(argc>1){ n=(int)atof(argv[1]); } else{ n = 1; } ans=1; for(j=0;j<11;j++){ ans=1; for(i=j;i>0;i--){ //i++ is same as i=i+1 ans=ans*i; // cout << i << "\t" << ans << endl; } cout <