Exercise
Char + for
Objetive
Write a C# program to write the letters "B" to "N" (uppercase), using "for"
Example Code
using System; // Import the System namespace to use basic classes like Console
class Program // Define the main class of the program
{
static void Main() // The entry point of the program
{
// Loop through the ASCII values of characters 'B' to 'N'
for (char letter = 'B'; letter <= 'N'; letter++) // Start at 'B' and loop until 'N'
{
Console.Write(letter); // Print the current letter
}
Console.WriteLine(); // Move to the next line after printing all letters
}
}