What do you want it to do exactly? Also I would declare f=1; outside of your for loop unless you want it to reset to 1 every time the i for loop increments.
If youre doing factorials and your multiplying by the value in the for loop you should decrement instead. The best way to solve factorials is with recursion. So much easier. Here is an example:
1 2 3 4 5 6 7
int factorial(int n)
{
if(n > 1)
return n * factorial(n - 1);
elsereturn 1;
}