Simple Java Program to find the factorial of number


Couch ModePrint

/**Java Program to Find the Factorial of the number**/

Just Change the Value of Number=5 to which factorial you want. the program is setted to the factorial of 5. 

class Factorial
{  
 public static void main(String args[])
{  
   int i,fact=1;  
   int number=5;
   for(i=1;i<=number;i++)
{
      fact=fact*i;    
 }
   System.out.println("Factorial of "+number+" is: "+fact);    
}  
}  

1 Discussion

  1. Blackjack, Rules, Strategy, and Game Information - Mapyro
    How to Play Blackjack. It's 군포 출장샵 about two cards in a 부산광역 출장샵 row. 통영 출장마사지 This is the main attraction for blackjack players. The object of blackjack 전주 출장마사지 is 강원도 출장안마 simple: A bet

    ReplyDelete

Thank Your Valuable Comment Tool to Insert codes in Comments : Convert My Code. Hide

Select to parse the code (not required if code is already parsed):

Subscribe By Email

Join Our Newsletter

Get All The Latest Updates Delivered Straight Into Your Inbox For Free!

We Respect Your Privacy

Popular Posts