vhrocker5150
12-09-2004, 10:35 PM
Im just wondering what cnt means? A java trainer I am working on put it in the answer to a puzzle that I was working on, and i dont know what it means..
static int factorial(int n)
{
int cnt = 2;
int fact = 1;
while(cnt <= n)
{
fact *= cnt;
cnt++;
}
return fact;
}
any help would be appreciated. thanks.
static int factorial(int n)
{
int cnt = 2;
int fact = 1;
while(cnt <= n)
{
fact *= cnt;
cnt++;
}
return fact;
}
any help would be appreciated. thanks.