Programming Course in C# ¡Free!

Char + for

 Saturday, April 06, 2013 published by Exercises C#
Proposed exercise

Create a program to write the letters "B" to "N" (uppercase), using "for"

Output



Solution


using System;
public class Chars
{
public static void Main()
{
for(char i = 'B'; i <= 'N'; i++)
Console.Write("{0} ", i);

Console.WriteLine(); 
}
}