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
They are triggered in the following order as shown below: Application_BeginRequest Application_AuthenticateRequest Application_AuthorizeRequest Application_ResolveReque

What is denormalization? The Denormalization is the process of putting one fact in numerous places (i.e. the vice-versa of normalization). Only one valid reason exists for deno

Web Application and Web Service For this part of the assignment, you are to develop a web application and web service using technologies and techniques taught in this subject

Windows Phone 8 camera streaming to desktop app Project Description: I require WP8 application (client) that will: 1. Automatically evaluate and connect to Windows desktop

Virtual Webcam effects + Sourcecode + Setup + Nice User Interface Project Description: i want a similar webcam effects application which can apply effects to webcam feed. So

What is the difference between OLEDB Provider and SqlClient? With respect to usage, there is no difference among OLEDB Provider and SqlClient. The dissimilarity lies in their p

how can we use entity framework in ASP.Net MVC

Finding Largest Array Element - C# Program I am unable to make out the Largest Array Element in C# language. Can anyone suggest me any example for this.

Custom authentication: If we don't need ASP.NET to perform any authentication, we can set the authentication mode to none. The reason behind this decision could be: We don't

Reflection All .NET assemblies have metadata information stored  the types defined in the modules. And This metadata information can be accessed by mechanism called as "Reflect