Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
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
606
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