| 23 | |
| 24 | |
| 25 | void print_fact(int n){ //To print the factorial of n, i.e., contents in array(vec_2d[n]) |
| 26 | vector<int> :: iterator it; |
| 27 | for(it = vec_2d[n].end()-1; it>=vec_2d[n].begin(); it--) //In reverse order |
| 28 | cout<<*it; |
| 29 | cout<<endl; |
| 30 | } |
| 31 | |
| 32 | void calc_fact(int n){ // Function to calculate factorial |
| 33 | int res = 0, carry = 0; // Store the result of n in array for reusing. |