Factorial of a number USING JAVA
A program to accept a number from keyboard and print the Factorial.
import java.util.Scanner;
public class Factorial
{
public static void main(String[] args)
{ final int fact;
System.out.println("Enter a number to find the Factorial");
Scanner in = new Scanner(System.in);
fact=in.nextInt();
System.out.println( "Factorial of " + fact + " is " + factorial(fact));
}
public static int factorial(int n)
{
int result = 1;
for(int i = 2; i <= n; i++)
result *= i;
return result;
}
}
Output:
Enter a number to find the Factorial
5
Factorial of 5 is 120
Whoa, amazing blog format! How long are you currently blogging for?
ReplyDeleteYour site is great, and articles are superb!
Feel free to visit my website - phentermine diet pills (www.enhancedonlinenews.com)
The expansion of internet and intelligence in business process lead the way to huge volume of data. It is important to maintain and process these data to be efficient in data handling. Hadoop Training in Chennai | Big Data Training in Chennai
ReplyDeleteGreat post.Thanks for one marvelous posting! I enjoyed reading it;The information was very useful.Keep the good work going on!!
DeleteETL Testing training in chennai| SAP MM training in chennai | Informatica training in chennai
Excellent post!!! Selenium automation testing tool makes software and web application process lot simpler. Keep on updating your blog with such awesome information. Selenium Course in Chennai
ReplyDeleteGreat Article
ReplyDeleteOnline Java Training | Java EE course
Java Course in Chennai | Java Training in Chennai | Java Training Institutes in Chennai | J2EE Training in Chennai | java j2ee training institutes in chennai
Java 360 | IT Technical Articles |Java Training Institutes
Nice post. Best Selenium Training in Chennai |Selenium Training in Chennai |
ReplyDeleteAndroid Training in ChennaiBest Manual Testing Training in chennai
Thanks for the information, Useful and interesting. Learned many new things. Keep going
ReplyDeleteBest selenium training in chennai | Selenium training in chennai | Best automation training in chennai
Hi,
ReplyDeleteThank you so much for posting this. I really appreciate your work. Keep it up. Great work!
http://kosmiktechnologies.com/selenium/
Thanks for sharing your valuable ideas and views, it is very useful for me.. keep rocks...
ReplyDeleteJava Training institute in velachery | Java Course in chennai
Thanks for sharing your informative article...keep updating..
ReplyDeleteFinal Year Project Center in Chennai | Best Project Center in Chennai | No.1 Final Year Project Center in Chennai | Project Center in Velachery
Pretty article..Thanks for sharing your amazing Blog..keep updating..Web Designing Training Institutes in Chennai | Web Designing Training Institutes in Velachery.
ReplyDeleteWonderful Blog with smart content..Thanks for sharing..
ReplyDeleteITIL Certification Exam Center in Chennai | ITIL Certification Training in Chennai
Really I Enjoy this Blog…Very Nice Post…Thanks...Selenium Training Institute in Chennai | Selenium Training Institute in Velachery
ReplyDeleteThanks for posting this amazing article with impressive content.keep sharing your informative post..
ReplyDeleteBest Linux Training Institute in Chennai | No.1 Linux Training Center in Chennai | Red Hat Linux Training Center in Chennai
I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
ReplyDeleteaws training in Chennai
Those guidelines additionally worked to become a good way to
ReplyDeleterecognize that other people online have the identical fervor like mine
to grasp great deal more around this condition.
white label website builder
Nice and good article. It is very useful for me to learn and understand easily...DotNet Project Center in Chennai | DotNet Project Center in Velachery
ReplyDeleteYour Blog is really awesome with useful and helpful content for us.Thanks for sharing ..keep updating more information.
ReplyDeleteAWS Training Institute in Chennai | AWS Certification Training in Velachery | AWS Exam Center in Chennai | AWS Online Exams in Chennai
Very impressive and interesting blog, it was so good to read and useful to improve my knowledge as updated one,keep updating..This Concepts is very nice Thanks for sharing.
ReplyDeleteAWS Training Institute in Chennai | AWS Certification Training in Velachery | AWS Exam Center in Chennai | AWS Online Exams in Chennai
Very impressive and interesting blog, this is the best place to get wonderful information thanks much for sharing here...
ReplyDeleteLinux Training Institute in Chennai | Linux Training Center in Chennai | Online Training in Chennai | Linux Certification in Chennai
Your blog is really useful for me. Thanks for sharing this useful blog..thanks for your knwoledge share ... superb article ... searching for this content.for so long.
ReplyDeleteAWS Training Institute in Chennai | AWS Certification Training in Velachery | AWS Exam Center in Chennai | AWS Online Exams in Chennai
Your blog is very useful for me,thanks for sharing such a wonderful post with useful information.keep updating..
ReplyDeletePython Training Center in Chennai | Python Certification Training in Chennai
Your Blog is really awesome with useful and helpful content for us. Thanks for sharing. Keep updating more information.
ReplyDeleteTally Training Institute in Chennai | Tally Training in Velachery
It is amazing blog and good information... I was improve my knowledge... Thanks for sharing...Your Blog is Nice and informative...Easy to understand...keep updating...
ReplyDeleteMatLab Training Institute in Chennai | MatLab Training in Velachery
Impressive blog with lovely information. really very useful article for us thanks for sharing such a wonderful blog...
ReplyDeleteAWS Training Institute in Chennai | AWS Certification Training in Chennai | AWS Training in Medavakkam
It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
ReplyDeleteSelenium Certification Training in Chennai | Best Selenium Certification Training in Velachery | Selenium Exams in Chennai | Selenium Training in Taramani
Good and more informative post... thanks for sharing your ideas and views... keep rocks and updating.........
ReplyDeletePCB Designing Training in Chennai | PCB Training Institute in Chennai | PCB Training in Velachery
This comment has been removed by the author.
ReplyDeleteThanks for sharing your interesting blog with informative information.keep updating such a wonderful post..
ReplyDeleteAWS Certification Training in Chennai | AWS Training Institute in Chennai | AWS Exam Center in Chennai
Nice Post! It is really interesting to read from the beginning and Keep up the good work and continue sharing like this.
ReplyDeleteLinux Certification Training in chennai | Linux Training Institute in Chennai | Linux Exam Center in Chennai
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge.
ReplyDeleteMatLab Training Institute in Chennai | MatLab Training in Velachery | MatLab Courses in Medavakkam
Your Blog is really awesome with useful information and informative article.Thanks for sharing such a wonderful and excellent post with us.keep updating such a amazing post..
ReplyDeleteISTQB Certification Training Center in Chennai | ISTQB Certification Exams in Velachery | ISTQB Certification Training in Velachery | ISTQB Certification Exams in Madipakkam
Thanks for sharing your wonderful and very useful information.keep updating such a impressive and attractive blog with interesting content.
ReplyDeleteJava Training in Chennai | Java Training in Velachery | Java Training Center in Medvakkam | Java Training in Pallikaranai | Java Courses in Chennai | Java Online Training in Guindy
Good article!!! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
ReplyDeleteBest UI Path Training Institute in Chennai | Best UI Path Training in Velachery | Best UI Path Certification Training in Pallikaranai
Thanks for sharing your informative blog with useful information,its really very interesting and happy to read your article.keep updating such a wonderful post with us..
ReplyDeleteEmbedded System Training in Chennai | Embedded Training in Velachery | Embedded Training Institute in Pallikaranai
your Blog is really useful for me,its really very interesting and informative information post.keep updating such an amazing post.
ReplyDeleteLinux Certification Training in Chennai | Linux Training Institute in Chennai | Linux Training Center in Adayar | Best Linux Training in Pallikaranai
Your Blog is really amazing,its really very informative content and useful information.Thanks for sharing your wonderful blog.keep updating such a creative knowledge.
ReplyDeleteBest Java Training Institute in Chenna | Java Training in Velachery | Best Java Courses in Medavakkam | Java Training Center in Pallikaranai
Your Blog is really amazing,its really useful for me and informative content with helpful information.keep updating such a wonderful post..
ReplyDeleteTally ERP9 Training in Chennai | Best Tally Training in Chennai | Tally Training Center in Pallikaranai | No.1 Tally ERP9 with GST Courses in Velachery
Good and more informative blog....create a new concepts.... Thanks for sharing the post....
ReplyDeletePython Certification Training in Chennai | Python Training Institute in Chennai | Python Certification Training in Velachery | Python Exam Center in Velachery
Very informative blog. Helps to gain knowledge about new concepts and techniques.Thanks a lot for sharing this wonderful blog.keep updating such a excellent post..
ReplyDeleteBest PCB Design Training in Chennai | No.1 PCB Design Course in Velachery | Best PCB Training in Chennai
Your Blog is really very informative and interesting to read.Thanks for sharing your useful information.keep updating...
ReplyDeleteEmbedded System Training in Chennai | Embedded Training Institute in Chennai | Embedded Training with IOT in Velachery
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge.
ReplyDeleteBest Linux Training in Chennai | Linux Certification Training in Chennai | No.1 Linux Certification Exams in Velachery | Linux Training Institute in Chennai
Nice blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it..
ReplyDeletePython Certification Training Institute in Chennai | Python Training in Chennai | Python Exam Center in Velachery | Python Training in Velachery
It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
ReplyDeleteAWS Certification Training Institute in Chennai | AWS Training Center in Chennai | AWS Certification Training in Velachery
Thanks for sharing this information,this is helpful to me a lot...It is amazing and wonderful to visit your site.
ReplyDeleteWeb Designing Training Institute in Chennai | Web designing Training in Velachery | Web Design Training Center in Velachery
Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.
ReplyDeleteBest MicroSoft Azure Training Institute in Chennai | Azure Training in Pallikaranai | Best Azure Certification Training in Pallikaranai | Best Azure Training Center in Chennai
This is a great inspiring article.I am pretty much pleased with your good work. You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post..
ReplyDeleteBest ISTQB Certification Training in Chennai | No.1 ISTQB Certification Training Center in Chennai | ISTQB Certification Exam Center in Velachery | ISTQB Certification Training in Saidapet
Thank you so much for posting this. I really appreciate your work. Keep it up. Great work! I am really interested to continue reading your blog. You have shared valid info. Waiting for more updates from you.
ReplyDeleteAWS Certification Training in Chennai | Best AWS Training Institute in Chennai | No.1 AWS Certification Training in Nanganallur | AWS Training in Velachery
It is awesome and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
ReplyDeletePCB Design Training Institute in Chennai | PCB Designing Training in Velachery | PCB Design in Pallikaranai | PCB Course in Chennai
Good article! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
ReplyDeletePython Certification Training in Chennai | Python Training Institute in Velachery | Python Certification Exams in Chennai | Python Exam Center in Chennai
Wow...What an excellent informative blog, really helpful. Thank you so much for sharing such a wonderful article with us.keep updating..
ReplyDeleteMatLab Training Institute in Chennai | MatLab Training in Velachery | Matlab Training Center in Chennai | MatLab Courses in Pallikaranai | MatLab Training with Placement in Chennai
I feel really happy to see your blog and look forward to many more entertaining times reading here. Thanks once more for all the details.
ReplyDeleteJava Training institute in Chennai | Java Training Center in Chennai | Java Courses in Velachery
It is awesome and wonderful to visit your site.Thanks for sharing your ideas and views... keep rocks and updating........
ReplyDeleteTally ERP9 Training Institute in Chennai | Tally Training Center in Velachery | Tally Training Center in Taramani
Thank you so much for posting this. I really appreciate your work. Keep it up. Great work!
ReplyDeleteBest Selenium Certification Training in Chennai | Selenium Training Institute in Chennai at Velachery | Selenium Course Training in Chennai | Selenium Training Center in Velachery
It is amazing blog and good information... I was improve my knowledge... Thanks for sharing such a informative and wonderful post...
ReplyDeleteMicrosoft Azure Certification Training in Chennai | Best Azure Training in Chennai | Best Azure Training Institute in Chennai | Azure Certification Training in Pallikaranai
I have read your blog its very attractive and impressive. I like it your blog.Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge.
ReplyDeleteVMware Certification Training in Chennai | VMware Certification Exam Center in Chennai | VMware Exams Center in Taramani | VMware Certification Exams in Chennai
Wow...What an excellent informative blog, really helpful. Thank you so much for sharing such a wonderful post with us.keep updating..
ReplyDeleteAWS Certifications in Chennai | AWS Exam Centers in Chennai | AWS Certification Exams in Velachery | AWS Exams in Velachery | AWS Online Exam Center in Velachery
Very informative and interesting blog, it was so good to read and useful to improve my knowledge as updated one,keep updating..This Concepts is very nice Thanks for sharing.
ReplyDeleteISTQB Certification in Chennai | ISTQB Exam Centers in Chennai | Best ISTQB Exams in Velachery
It is really very awesome and wonderful to visit your site.Thanks for sharing your informative blog with us.keep updating such a wonderful post..
ReplyDeleteMicroSoft Azure Certification in Chennai | Azure Exam Centers in Velachery | Azure Exam Centers in Madipakkam
Really nice post. Thank you for sharing amazing information.
ReplyDeleteJava Training in Credo Systemz/Java Training in Chennai Credo Systemz/Java Training in Chennai/Java Training in Chennai with Placements/Java Training in Velachery/Java Training in OMR/Java Training Institute in Chennai/Java Training Center in Chennai/Java Training in Chennai fees/Best Java Training in Chennai/Best Java Training in Chennai with Placements/Best Java Training Institute in Chennai/Best Java Training Institute near me/Best Java Training in Velachery/Best Java Training in OMR/Best Java Training in India/Best Online Java Training in India/Best Java Training with Placement in Chennai