
-----------------------------------
tupac
Tue Nov 14, 2006 3:05 pm

Reverse factorial function
-----------------------------------
k, so i cant post big posts cuz the server wont let me (even though i've seen posts a million times bigger). but anyway, ill have to post this in sections:

k, so the story is, my discrete teacher said that she's never seen a calculator do the reverse function of factorial (ie. 5! = 120 calculators CAN do, 120 = 5! calculators CAN'T do). so i was bored one day and made a little program in c++ that does just that (reverse function of factorial).

-----------------------------------
tupac
Tue Nov 14, 2006 3:06 pm


-----------------------------------
this was done in Dev-C++ (so idk if some syntax will be different in MSVC++

#include 
#include 

using namespace std;

//declaring variables needed later on:
int inp;
int num = 1;
int temp;
int j = 1;
int i;


-----------------------------------
tupac
Tue Nov 14, 2006 3:09 pm


-----------------------------------

int main(int argc, char *argv[])
{
    cin >> inp;
    for(i=1;i