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
Bing In
NA
30
9k
X size pyramid
Apr 3 2016 3:14 AM
when user types number X, outputs a pyramid of size of X
if X is 6,
*
**
***
****
*****
******
using System;
class example4
{
public static void Main()
{
int i;
int j;
int k;
Console.WriteLine("type number of size");
object a = (object)Console.Read();
int b = (int) a;
for (i = 0; i <= b;i++)
{
for (j = 0; j < b+1-i;j++)
{
Console.Write("");
}
for (k = 0; k < i; k++)
{
Console.Write("*");
}
Console.WriteLine("\n");
}
}
}
but this doesn`t work
how should I solve that problem?
Reply
Answers (
2
)
How i implement row filter property in textbox for grid ?
How to add image in tooltip when mouse over event occured