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
Pyramid Using C#
Niradhip Chakraborty
May 02, 2013
20
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
This is a small blog where I will show how to create pyramid using C#
class
Program
{
static
void
Main(
string
[] args)
{
for
(
int
i = 0; i < 20; i++)
{
for
(
int
k = i; k < 20; k++)
{
Console
.Write(
" "
);
}
for
(
int
j = 2 * i + 1; j > 0; j--)
{
Console
.Write(
"*"
);
}
Console
.WriteLine(
""
);
}
Console
.ReadLine();
}
}
Next Recommended Reading
Creating Pyramid In C#