TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Java - For Statement
Senthilvelan Sambamoorthy
Aug 20
2016
Code
560
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
import
java.io.*;
class
ssvfor
{
public
static
void
main(String arg[])
throws
IOException
{
System.out.print(
"\nEnter the Number : "
);
DataInputStream dr =
new
DataInputStream(System.in);
String t;
t = dr.readLine();
int
i,n,f;
f=
1
;
n = Integer.parseInt(t);
for
(i=
1
;i<=n;i++)
{
f = f*i;
}
System.out.println(
"\nFactorail of Given number "
+n+
" is : "
+f);
}
}
Java
For Statement