All Programs Examples
Home
Sample Page
Services
Advertise
Blog
About
Contact me
Menu
.
Home
About-us
Privacy Policy
Contact-us
Services
Friday, October 16, 2015
Java - factorial number example - Allprogramexample
Socialize Us
Tweet
Factorial number example
class fact
{
public static void main(String r[] )
{
int i=1,m=1,n;
n=Integer.parseInt(r[0]);
do
{
m=m*i;
i++;
}
while (i<=n);
System.out.println("Fact of "+n+"is ="+m);
}
}
0 comments:
Post a Comment
Newer Post
Older Post
Home
Popular Posts
Labels
C++ Program
Java Examples
Photoshop Tutorial
Powered by
Blogger
.
Copyright © 2014 All Programs Examples | All Rights Reserved.
Blogger Templates
Download
Blogger Templates
0 comments:
Post a Comment