Tech News World, Contacts Samsung Galaxy, Windows 8, Nokia Lumia, Quad Core Smart Phones, HTC smartphone, Google Nexus, MacBook, PayPal

Wednesday, December 4, 2013

C# Simple Loop Program example to print characters

C# Simple Loop Program example to print characters - Although I work in the office and a lot of work that makes me tired but still I make a blog Tech News World and still will update it for you because this is part of my hobby who likes the world of technology, especially about the gadget, now we will discuss first about C# Simple Loop Program example to print characters because it is the topic that you are now looking for, please refer to the information I provide in the guarantee for you,

Articles : C# Simple Loop Program example to print characters
full Link : C# Simple Loop Program example to print characters
Article Csharp, Article programming, Article programs,

You can also see our article on:


C# Simple Loop Program example to print characters

Simple Loop Problem to Print A B D H P

Problem Statement:
Write a program using for loop which prints the following output. (You have to find a pattern to print alphabetics in this order)
A B D H P

Solution:

static void Main(string[] args)
{
int i,j,ch=0,n;
Console.Write("A ");
for (i = 1; i <= 4; i++)
{
n = 1;
for (j = 1; j <= i; j++)
{
n = n * 2;
ch = 64 + n;
}
Console.Write((char)ch + " ");
}

Console.ReadLine();
}




so much information about C# Simple Loop Program example to print characters

hopefully information C# Simple Loop Program example to print characters can provide useful knowledge for you in getting information about the latest gadgets,

just finished your reading article about C# Simple Loop Program example to print characters if you feel this article useful for you please bookmark or share using link http://aziin5teens.blogspot.com/2013/12/c-simple-loop-program-example-to-print.html for more people know

Tag : , , ,
Share on Facebook
Share on Twitter
Share on Google+

Related : C# Simple Loop Program example to print characters

0 comments:

Post a Comment