all about smartphone technologies we discuss here, ranging from specifications and prices, how to fix hp and we provide a lot of applications and games

C# Simple Loop Program example to print characters

C# Simple Loop Program example to print characters - welcome to our blog that presents a very complete information is Tech Phone ok now we will discuss the information you are seeking, may I guess if you are looking for information on C# Simple Loop Program example to print characters if properly come please continue reading until the end, we also provide other information, do not forget to get around:

informations : 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();
}




Articles C# Simple Loop Program example to print characters already been discussed

A few information about the C# Simple Loop Program example to print characters, hopefully can provide benefits to all of you.

You're reading an article C# Simple Loop Program example to print characters and this article has a link to https://mastispotgroup.blogspot.com/2013/12/c-simple-loop-program-example-to-print.html to revel book mark. Hopefully this article could be useful, do not forget to look for information on obtaining the phone tech blog.

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

Related : C# Simple Loop Program example to print characters

0 komentar:

Posting Komentar