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 Serious Program Using Java
Senthilvelan Sambamoorthy
Aug 12
2016
Code
593
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
ssv123.rar
// serious program
import
java.io.*;
class
ssv123
{
public
static
void
main(String args[])
throws
IOException
{
int
i,j,b,n;
String s;
DataInputStream a =
new
DataInputStream(System.in);
System.out.println(
"enter the number:"
);
s = a.readLine();
n=Integer.parseInt(s);
for
(i=
1
;i<=n;i++)
{
for
(j=
1
;j<=i;j++)
{
System.out.println(j +
" "
);
}
}
for
(i=n;i>=
1
;i--)
{
for
(j=i;j>=
1
;j--)
{
System.out.println(i +
" "
);
}
}
for
(i=
1
;i<=n;i++)
{
for
(j=
1
;j<=i;j++)
{
System.out.println(i +
" "
);
}
}
}
}
Java
Calculate Serious Program