Hi
I wrote a litle code to calculate factorial, but when I compile it, it says " ';' expected " (In the " for ")
Here is my code :
/**
* A class to calculate factorial of a number
*
* @author Barth
* @version 10/29/10
*/
public class main
{
public static void main (String[] args)
{
int f = LibrairieIO.readInt ("whrite a number : ");
if (f==0 || f==1)
{
System.out.println (" !" + f + " = 1");
}
else
{
int g;
for (int a==f; a>0; a--;)
{
g=g*a;
}
System.out.println (" !" = f + " = " + g);
}
}
}
Could someone help me please?
Thank you