C# Corner
Tech
News
Videos
Forums
Trainings
Books
Live
More
Interviews
Events
Jobs
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
Calculate Floyd Triangle Program Using Java
WhatsApp
Senthilvelan Sambamoorthy
Aug 13
2016
1.1
k
0
0
ssva9.rar
/* FLOYD'S TRIANGLE */
import
java.io.*;
class
ssva9
{
public
static
void
main(String arg[])
throws
IOException
{
int
n,m=
1
;
System.out.println(
" FLOYD'S TRIANGLE"
);
BufferedReader obj=
new
BufferedReader(
new
InputStreamReader(System.in));
System.out.print(
"\n ENTER THE POSITIVE INTEGER : "
);
n=Integer.parseInt(obj.readLine());
System.out.print(
"\n"
);
for
(
int
i=
1
;i<=n;i++)
{
for
(
int
j=
1
;j<=i;j++)
{
System.out.print(
" "
+m++);
}
System.out.println(
"\n"
);
}
System.out.print(
"\n"
);
}
}
Java
Calculate Floyd Triangle
Up Next
Calculate Floyd Triangle Program Using Java