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

 

#Day 14: Crafting a Unique Reverse Alphabet Pyramid Pattern in C#

In today's post, we will learn how to create a reverse alphabet pyramid pattern in C#.

 This pattern displays alphabets starting from 'E' and descending to 'A', with each row containing repeated characters of the corresponding alphabet.

Pattern:

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

Let's dive into the code to generate this pattern in C#.


Source Code :


using System;
namespace Pyramid
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int n = 65;

            for(int i = 69; i >= n; i--)
            {
                for(int j=69;j>=i;j--)
                {
                    Console.Write((char)i);
                }
                Console.WriteLine();
            }
            Console.Read();
        }
    }
}


OutPut:




Stay tuned for Day 15, 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

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

#Day 7:Creating an Reverse Alphabet Triangle Pattern in C#

#Day 8: Creating an Inverted Alphabet Triangle Pattern in C#

#Day 9: Creating a Numeric Triangle Pattern in C#

#Day 10: Creating a Reverse Numeric Triangle Pattern in C#.Net. 


 Pattern Follow us on Instagram: 

@LearnCodingWithDotNet for daily coding patterns and tips.


No comments:

Post a Comment