need help in this program
I was programming for finding the factorial of an input number but stuck on the underlined portion,please help
class fact
{
public static void main(String []args)
{
int a=Integer.parseInt(args[0]);
int b,d;
int c=0;
if(a>0)
{
b=(a-1)*a;
d=b+c;
a--;
System.out.println("Factorial is="+c);
}
else
{
System.out.println("No Factorial");
}
}}
[468 byte] By [
duke277a] at [2007-11-26 17:08:14]

@ warnerja, sorry but you are absolutely thinking wrong,actually I got this question today in my class quiz & now I m trying to explore how it runs,thatsall.
duke277,
Your code is a long way from being able to do the correct computation of factorial. For example, you display "Factorial is="+c, but the only value ever assigned to c is 0. You could have discussions in this forum with members as they try to teach you how to compute a factorial, but I really think the best thing for you to do is sit down with your instructor or a teaching assistent, etc... and work through this together. it may be worth it to find someone at your campus who can tutor you. This is not meant to be derogatory, but based on your previous posts, which have been legion, you're flailing around -- your code is often far from correct, and the suggestions and hints given to you in this forum don't seem to be enough for you to correct your own code. Again, tutoring or going to your instructor's office hours would be your best bet.
Laszlo