Print pyramids of numbers - c# program, DOT NET Programming

Print Pyramids of Numbers - C# Program

Hello can you please provide me some examples regarding to the Print Pyramids of NumbersĀ in C#.

Posted Date: 2/12/2013 12:44:11 AM | Location : United States





In this code i will try to slow your problem.  Hope it will help you.

Program:

using System;

class PyramidNumbers

{

public static void Main()

{

int i,j,num=5,k;

for(i=1;i<=num;i++)

{

for(k=num;k>=i;k--)// Loop for the blank spaces

{

Console.Write(" ");

}  

for(j=1;j<=i;j++)// Loop for determining the number of times the number is to be written

{

Console.Write(" " +i); // " " is a space needed in between the numbers

}     

Console.Write("\n"); // Go to the next line for next number

}  

Console.ReadLine();    

}

}

Posted by Harry | Posted Date: 2/12/2013 12:46:00 AM

Thank you so much. Everything is ok and cleared.

Posted by Amy | Posted Date: 2/12/2013 12:47:03 AM


Related Discussions:- Print pyramids of numbers - c# program, Assignment Help, Ask Question on Print pyramids of numbers - c# program, Get Answer, Expert's Help, Print pyramids of numbers - c# program Discussions

Write discussion on Print pyramids of numbers - c# program
Your posts are moderated
Related Questions
We need Long term Kentico developer needed I want a solid Kentico developer that I can rely on to handle overflow work. Usually this will include about 5 hours of work each week

Explain the concept of constructor? Constructor is a special method of a class, which is called automatically when the instance of a class is formed. It is created with the sam

MVC -C# Single Page Application Project Description: Construct a site similar to prototype: To explain briefly: 1) Single Page Application 2) Loginig funcionality


What are the different types of literals? A literal is a textual representation of an exacting value of a type. The dissimilar types of literals in Visual Basic are: Boo

i want to know the code for adding new item button in .net forms and delete button in vb.net forms. can any one pls help

How can we get the state of the requested process? XMLHttpRequest get the current state of the request operation by using the readyState property. This property checks the cond

Project Description: hi i need to develop a software scrapebox exect same with all Skills required: .NET, Java, C# Programming, Visual Basic, Visual Basic for Apps

What are satellite assemblies? We use resource files to store data according to the localized languages. But when you actually go for the deployment you will not like to also i

What are Daemon threads? Daemon thread's run in the background and stop automatically when nothing is running program. The Example of a Daemon thread is the "Garbage collector"