#Day 6 :101 Days Pyramid Pattern in C# .NET

#Day 6: Creating an Alphabet Triangle Pattern in C#


Welcome to Day 6 of our series on 101 Days Pyramid Pattern in C# .NET.  

Today, we will explore how to create an alphabet triangle pattern in C#. This pattern will display letters in a triangular format, starting with 'A' at the top and adding an extra letter to each subsequent row. 

Whether you're a beginner or an experienced programmer, this example will help you understand loops and character manipulation in C#. Let's dive into the code and learn how to implement this interesting pattern.

A B
A B C
A B C D 
A B C D E

Source Code :

using System;

namespace Pyramid
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int n = 69;
            for(int i = 65; i <= n; i++)
            {
                for(int j=65;j<=i;j++)
                {
                    Console.Write((char)j);
                }
                Console.WriteLine();
            }
            Console.Read();
        }
    }
}


OutPut:


Stay tuned for Day 7, where we'll continue exploring more C# patterns and concepts!

Dont forget to share this post if you found it helpful and follow us for more C# programming tips and tutorials. Happy coding!

Related Posts:

#Day 1:Number Pyramid in C#



#Day 5:Alphabet Pyramid Pattern



 Pattern Follow us on Instagram: 

@LearnCodingWithDotNet for daily coding patterns and tips.

No comments:

Post a Comment