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
Calculate Floyd Triangle In Number Program Using Java
Senthilvelan Sambamoorthy
Aug 12
2016
Code
553
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
ssva09.rar
// program for floyd triangle in numbers
import
java.io.*;
public
class
ssva09
{
public
static
void
main(String arg[])
throws
IOException
{
int
i,j,s=
0
,n;
BufferedReader inp=
new
BufferedReader(
new
InputStreamReader(System.in));
System.out.println(
"\n\t\tFloyd Triangle in Numbers"
);
System.out.print(
"\nEnter the value of N: "
);
n=Integer.parseInt(inp.readLine());
if
(n==
0
)
{
System.out.println(
"\nPlease Enter greater than Zero\n"
);
return
;
}
for
(i=
1
;i<=n;i++)
{
for
(j=
1
;j<=i;j++)
{
s++;
System.out.print(
"\t"
+ s);
}
System.out.println();
}
}
}
Java
Calculate Floyd Triangle