Info C# Simple Loop Program example to print characters - this blog we have built from a few years ago and already very much information about gadgets that we convey and a lot of blog visitors
New Blog Techno News who are satisfied with the information, we will always try to update the latest information for you, first about Info C# Simple Loop Program example to print characters many already we collect data to make this article so you do not miss the news, please see:
Articles :
Info C# Simple Loop Program example to print characters
full Link :
Info C# Simple Loop Program example to print characters
Article Csharp,
Article programming,
Article programs,
You can also see our article on:
Info 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 Info C# Simple Loop Program example to print characters finished in discussion
hopefully the information we convey about Info C# Simple Loop Program example to print characters can benefit you in getting new knowledge about technology,
you just finished reading the information Info C# Simple Loop Program example to print characters we hope this informmation can answer the question you submit to googlle, if you want to bookmark or share please use link https://moymoycikukecik.blogspot.com/2013/12/info-c-simple-loop-program-example-to.html and do not forget to always visit this blog to get the latest information every day.
Tag :
Csharp,
programming,
programs,
0 komentar:
Posting Komentar