C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Java - For Statement
WhatsApp
Senthilvelan Sambamoorthy
Aug 20
2016
630
0
0
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
Up Next
Java - For Statement