/********** Factorial Of A Number Based on Java ********/
class Factorial
{
public static void main(String args[])
{
int a = 5;
int fact = a;
for(int i=a-1;i>=1;i--)
fact = fact * i;
System.out.println("Factorial : "+ fact);
}
}
/********** OUTPUT ***********
Factorial : 120 */
Labels: Simple Program
2 comments:
Subscribe to:
Post Comments (Atom)
hey its sandy, here is the website i was talking about...... the website is here
hey its sandy, here is the website i was talking about...... the website is here