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
ASP .NET MVC Tutor Project Description: Work with me and assist with troubleshooting lessons, describe in easy to understand terms how to accomplish certain tasks, provide co

ASP.NET 2.0 application port to ASP.NET MVC Project Description: Legacy ASP.NET application for managing tasks for a private client needs a complete re-write. The applicat

Give a brief introduction of Windows Azure operating system. The Windows Azure operating system is used for running cloud services on the Windows Azure platform, as it includes

What are major events in GLOBAL.ASAX file? The Global.asax file, which is derived from the HttpApplication class, maintains a pool of the HttpApplication objects, & assigns the

What are events? As compared to the delegates events works with source and listener methodology. So the listeners who are interested in receiving few events they subscribe to t

Can a .NET web application consume Java web service? Yes Offcourse.Actually Webservices are independent  to language. It depends on WSDL and SOAP. so any one can develope the W

C# Programming 1. What is .Net Framework? 2. Write short notes on constructors and destructors. 3. Explain boxing and unboxing with examples. 4. What is a mixed mode a

What is Common Type System (CTS)? CTS is the component of CLR by which .NET Framework provides support for multiple languages because it have a type system that is common acros

What is a DataReader object? The DataReader object helps in retrieving the data from a database in a forward-only, read-only mode. The base class for all the DataReader objects

Converting Rs. to Paisa - C# Program Need the code of C# Program for Converting Rs. to Paisa.