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
I need help to develop website using html5, responsive design and jquery.I need e commerce website flike alma meter and spreadshirtHours Skills required: .NET, HTML, Graphic

Develop PC Cleaner Software Project Description: We are seeking experienced developer who can develop Registry Cleaner / PC Cleaner software for us. Software should be like c

what is timer control

What is AppSetting Section in "Web.Config" file? Web.config file describe the configuration for a webproject. By Using "AppSetting" section we can define user defined values. T

ASP.NET/MSSQL/ MVC completing backend solution + integrating with frontend. - repost Project Description: System is used for tracking company's activities through several pro

What is the use of a .disco file? A client application uses a .disco file to locate or discover the documents that have the description of a Web service. The .disco file having

What are Windows services? Windows services, previously called as NT services, are applications that are installed on the system as system services. In other words, Windows ser

Assignment for inheritance based on c#

Shipping Emails Bulk System Project Description: We need to develop a system for sending emails to a large mass, without using third-party services, administration by us, or

How many types of generations are there in a garbage collector? Memory management in the CLR is separated into three generations that are building up by grouping memory segment