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
What are major difference between classic ADO and ADO.NET ? Some major differences between the classic ADO & ADO.NET are as follows: 1) As in the classic ADO we had server a

Question: (a) One of the advantages of the Session object is that it prompts to you when a user session begins. In this context, a user fills in a registration form and the Se

What are the ways to implement locking in ADO.NET? There are many ways to implement locking using ADO.NET which are shown below:- 1)Whenever we call "Update" method of DataA

What is the difference amonga system workflow and a human workflow? A system workflow is a workflow that is developed to automate interactions between applications. Such workfl

What are benefits and limitations of using Hidden frames 1)    The benefits of using hidden frames are as follows: 2)    More than one data field can cache. 3)    The abi

Fixing chrome problem Problem 1- Booksearcha.asp and bookrstep2.asp on allreaders.com (bookrstep2 only accessible from bookrstep1.asp) utilize scroll down menus at times. In Chr

What are the different implementations of LINQ? The different implementations of LINQ are: LINQ to SQL - Refers to a component of.NET Framework version 3.5 that provides a

Assembly: 1) Assembly is a unit of deployment such as EXE or a DLL. 2) An assembly consists one or more files (dlls, exe's, html files etc.),& represents a group of resources,

Print Floyd's Triangle - C# Program I am unable to make out how to print Floyd's Triangle in C# language. Can anyone suggest me any example for this.

What are indexes? The Indexes in the SQL Server are similar to the indexes in books. They help SQL Server to retrieve the data quickly.These are classified into clustered and n