•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 391,608 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,611 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser:
Views: 162 | Replies: 1
![]() |
•
•
Join Date: Jul 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hi, I'm not sure that your meaning like this ..........
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace pyramid
{
class Program
{
static void Main(string[] args)
{
Console.Write("IN PUT YOUR NUMBER :");
int myInt = int.Parse(Console.ReadLine());
for (int iCount1 = 1; iCount1 <= myInt; iCount1++)
{
for (int iCount2 = 1; iCount2 <= iCount1; iCount2++)
{
Console.Write(iCount2 + " ");
}
for (int iCount3=(iCount1-1);iCount3 >= 1; iCount3--)
{
Console.Write(iCount3 + " ");
}
Console.WriteLine("");
}
}
}
} Last edited by karidoe : Jul 9th, 2008 at 6:55 am.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
Similar Threads
- Help needed in forming pyramid. (Java)
- pyramid of numbers (C++)
- Pyramid...questioN?? (C)
- letter pyramid (C)
- Create a variable pyramid in c only (C)
- Pyramid Issue (Visual Basic 4 / 5 / 6)
Other Threads in the C# Forum
- Previous Thread: Network Adapters
- Next Thread: Need Your help please


Linear Mode