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
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
nikhil sreeni
NA
40
9.6k
Best logic for printing a specific pattern
May 31 2013 12:24 PM
how to print the below pattern using only one loop?
*
**
***
****
*****
for(int i=1;i<=5;i++)
{
for(int j=1;j<=i;j++)
{
print("*");
}
print("\n");
}
every one know this, but using only on loop how?
it's really an interview question.he asked me that he will ask next question after answering this.
Reply
Answers (
2
)
add my application to windows explorer contextmenu handler
What is the difference between if/else and Switch ?