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
Triangle Star Program Using Java
Alagunila Meganathan
Aug 03
2016
Code
499
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
triangle.rar
import
java.io.*;
class
triangle{
public
static
void
main(String[] args) {
try
{
BufferedReader object =
new
BufferedReader(
new
InputStreamReader(System.in));
System.out.println(
"enter the number"
);
int
a= Integer.parseInt(object.readLine());
for
(
int
i=
1
; i<a;i++ ){
for
(
int
j=
1
; j<=i;j++ ){
System.out.print(
"*"
);
}
System.out.println(
""
);
}
}
catch
(Exception e){}
}
}
Java