Showing posts with label Days 101 Pyramid Patterns Series. Show all posts
Showing posts with label Days 101 Pyramid Patterns Series. Show all posts

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

 

#Day 18: Creating an Alternating Binary Pyramid in C#

Welcome to Day 18 of our C# programming patterns series. 

Today, we'll learn how to create a binary pyramid pattern where each row alternates between repeated 0s and 1s. 

This pattern is a great way to practice nested loops and conditional logic in C#.

Let’s explore the code to create this unique pattern.

Here’s the pattern:

1
0 0
1 1 1
0 0 0 0
1 1 1 1 1

Here's the code:

To achieve this, we'll use nested loops to control the rows and columns of the pyramid. Here’s the complete code:


Source Code :

using System;
namespace Pyramid
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int n = 5;
       
            for(int i = 1; i <= n; i++)
            {
                for(int j=i;j>=1;j--)
                {
                    if (i % 2 == 0)
                    {
                        Console.Write(0);
                    }
                    else
                    {
                        Console.Write(1);
                    }                   
                }
                Console.WriteLine();
            }
            Console.Read();
        }
    }
}

OutPut:




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

Don’t 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.



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

 

#Day 17: Creating a Binary Pyramid Pattern Starting with 0 in C#

Welcome to Day 17 of our C# programming patterns series. 

In today's post, we'll create a binary pyramid pattern that starts with 0. 

This pattern alternates between 0s and 1s in a pyramid shape, providing an excellent way to practice using nested loops and modulus operations in C#. 

Let’s explore the code to bring this pattern to life.

Here’s the pattern:

0
1 0
0 1 0
1 0 1 0
0 1 0 1 0

Here's the code:

To achieve this, we'll use nested loops to control the rows and columns of the pyramid. Here’s the complete code:


Source Code :

using System;
namespace Pyramid
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int n = 5;
       
            for(int i = 1; i <= n; i++)
            {
                for(int j=i;j>=1;j--)
                {
                    if (j % 2 == 0)
                    {
                        Console.Write(1);
                    }
                    else
                    {
                        Console.Write(0);
                    }                    
                }
                Console.WriteLine();
            }
            Console.Read();
        }
    }
}

OutPut:


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

Don’t 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.



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

 

#Day 16: Creating a Binary Number Pyramid in C#

Welcome to Day 16 of our C# programming patterns series. 

Today, we'll explore how to create a binary number pyramid pattern in C#. This pattern alternates between 1s and 0s in a pyramid shape, demonstrating the use of nested loops and modulus operations. 

Let’s dive into the code and see how to implement this fascinating pattern.

Here’s the pattern:

1
0 1
1 0 1
0 1 0 1
1 0 1 0 1

Here's the code:

To achieve this, we'll use nested loops to control the rows and columns of the pyramid. Here’s the complete code:


Source Code :

using System;
namespace Pyramid
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int n = 5;
       
            for(int i = 1; i <= n; i++)
            {
                for(int j=i;j>=1;j--)
                {
                    if (j % 2 == 0)
                    {
                        Console.Write(0);
                    }
                    else
                    {
                        Console.Write(1);
                    }                    
                }
                Console.WriteLine();
            }
            Console.Read();
        }
    }

OutPut:




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

Don’t 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.


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

 

#Day 15: Advanced Numeric Triangle Pattern in C#

On Day 15 of our C# pattern series, we dive deeper into creating a more complex numeric triangle pattern.

 This pattern incrementally increases the numbers row by row, creating a distinct and visually appealing triangle. 

It is an excellent exercise to further enhance your skills in using loops and controlling output in C#. 

By following this tutorial, you'll learn how to manage number sequences and loop structures effectively in C#.

Pattern:

1
23
456
78910
1112131415

This pattern highlights the use of nested loops to generate a numeric sequence that expands with each line, offering a challenging yet rewarding coding experience. 

Perfect for beginners and those looking to refine their understanding of pattern creation in C#.


Source Code :



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

            for(int i = 1; i <= n; i++)
            {
                for(int j=1;j<=i;j++)
                {
                    Console.Write(m);
                    m++;
                }
                Console.WriteLine();
            }
            Console.Read();
        }
    }
}


OutPut:



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

Don’t 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.



#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!

Don’t 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.


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

 

#Day 13: Creating a Reverse Alphabet Triangle Pattern in C#

Welcome to Day 13 of our C# programming patterns series. 

Today, we'll learn how to create a reverse alphabet triangle pattern in C#. This pattern displays letters in reverse order, with each row increasing by one letter. 

It's an excellent exercise to practice nested loops and character manipulation in C#. 

Let’s dive into the code and see how to implement this interesting pattern.

Here’s the pattern:

e
d d
c c c
b b b b
a a a a a

To achieve this, we'll use nested loops to control the rows and columns of the pyramid. Here’s the complete code:


Source Code :

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

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

OutPut:


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

Don’t 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.


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

#Day 12: Creating an Uppercase Alphabet Triangle Pattern in C#.

Welcome to Day 12 of our C# programming patterns series. 

Today, we'll learn how to create an uppercase alphabet triangle pattern in C#. This pattern displays uppercase letters in a triangular form, with each row increasing by one letter. 

It's a great exercise to practice nested loops and character manipulation in C#. 

Let’s dive into the code and see how to implement this interesting pattern.

Here’s the pattern:

A
B B
C C C
D D D D
E E E E 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)i);
                }
                Console.WriteLine();
            }
            Console.Read();
        }
    }
}


OutPut:




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

Don’t 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.

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

#Day 11: Crafting an Alphabet Pyramid in C#

Welcome to Day 11 of our C# programming patterns series.

 Today, we'll learn how to create an alphabet pyramid pattern in C#. This pattern displays letters in a triangular form, with each row increasing by one letter.

 It's a great exercise to practice nested loops and character manipulation in C#. 

Let’s dive into the code and see how to implement this interesting pattern.

In this blog post, we'll create an alphabet pyramid pattern using C#. The pattern will look like this:

a
b b
c c c
d d d d
e e e e e

To achieve this, we'll use nested loops to control the rows and columns of the pyramid. Here’s the complete code:


Source Code :

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

            for(int i = 97; i <= n; i++)
            {
                for(int j=97;j<=i;j++)
                {
                    Console.Write((char)i);
                }
                Console.WriteLine();
            }
            Console.Read();
        }
    }
}


OutPut:




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

Don’t 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.


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

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

Welcome to Day 10 of our C# programming patterns series.

 Today, we'll learn how to create a reverse numeric triangle pattern in C#. This pattern displays numbers in reverse order, decreasing by one with each subsequent row. 

This example will help you understand nested loops and numeric manipulation in C#.

 Let’s dive into the code and see how to implement this interesting pattern.

In this blog post, we'll create a reverse numeric triangle pattern using C#. The pattern will look like this:

5

4 4

3 3 3

2 2 2 2

1 1 1 1 1

To achieve this, we'll use nested loops to control the rows and columns of the triangle. Here’s the complete code:

Source Code :

using System;

namespace Pyramid

{

    internal class Program

    {

        static void Main(string[] args)

        {

            int n = 1;


            for(int i = 5; i >= n; i--)

            {

                for(int j=5;j>=i;j--)

                {

                    Console.Write(i);

                }

                Console.WriteLine();

            }

            Console.Read();

        }

    }

}


OutPut:



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

Don’t 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#


 Pattern Follow us on Instagram: 

@LearnCodingWithDotNet for daily coding patterns and tips.


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

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

Welcome to Day 9 of our C# programming patterns series. 

Today, we'll learn how to create a numeric triangle pattern in C#. This pattern displays numbers in a triangular form, where each row contains the same number, increasing by one with each subsequent row. 

This example will help you understand nested loops and numeric manipulation in C#.

 Let’s dive into the code and see how to implement this interesting pattern.

In this blog post, we'll create a numeric triangle pattern using C#. The pattern will look like this:

1
2 2
3 3 3
4 4 4 4
5 5 5 5 5 

To achieve this, we'll use nested loops to control the rows and columns of the triangle. Here’s the complete code:

Source Code :



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

            for(int i = 1; i <= n; i++)
            {
                for(int j=1;j<=i;j++)
                {
                    Console.Write(i);
                }
                Console.WriteLine();
            }
            Console.Read();
        }
    }
}

OutPut:






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

Don’t 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#

 Pattern Follow us on Instagram: 

@LearnCodingWithDotNet for daily coding patterns and tips.




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

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

Welcome to Day 8 of our C# programming patterns series.

 Today, we'll learn how to create an inverted alphabet triangle pattern in C#. This pattern displays letters in reverse order, starting with 'A' at the top and adding an extra letter to each subsequent row in reverse.

 This example will help you understand nested loops and character manipulation in C#.

 Let’s dive into the code and see how to implement this interesting pattern.

In this blog post, we'll create an inverted alphabet triangle pattern using C#. The pattern will look like this:

A

B A

C B A 

D C B A

E D C B A

To achieve this, we'll use nested loops to control the rows and columns of the triangle. Here’s the complete code:

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=i;j>=65;j--)

                {

                    Console.Write((char)j);

                }

                Console.WriteLine();

            }

            Console.Read();

        }

    }

}


OutPut:





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

Don’t 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#


 Pattern Follow us on Instagram: 

@LearnCodingWithDotNet for daily coding patterns and tips.






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

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

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

Today, we'll learn how to create a reverse alphabet triangle pattern in C#. This pattern displays letters in reverse order, starting with 'a' at the top and adding an extra letter to each subsequent row in reverse.

This example will help you understand nested loops and character manipulation in C#. Let’s dive into the code and see how to implement this intriguing pattern.

In this blog post, we'll create a reverse alphabet triangle pattern using C#. The pattern will look like this:


a

b a

c b a

d c b a

e d c b a

To achieve this, we'll use nested loops to control the rows and columns of the triangle. Here’s the complete code:


Source Code :


using System;

namespace Pyramid

{

    internal class Program

    {

        static void Main(string[] args)

        {

            int n = 101;


            for(int i = 97; i <= n; i++)

            {

                for(int j=i;j>=97;j--)

                {

                    Console.Write((char)j);

                }

                Console.WriteLine();

            }

            Console.Read();

        }

    }

}

OutPut:




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

Don’t 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 iC#



 Pattern Follow us on Instagram: 

@LearnCodingWithDotNet for daily coding patterns and tips.







#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 
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!

Don’t 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.

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

Day 5: Creating an Alphabet Pyramid Pattern in C#

In today's post, we will explore how to create an alphabet pyramid pattern using C#. 

This pattern involves printing a sequence of alphabets in an increasing manner, where each row adds one more character than the previous one.

 The resulting pattern looks like this:

a

a b

a b c

a b c d

a b c d e


We will use nested loops in C# to generate this pattern. 

The outer loop controls the number of rows, and the inner loop prints the characters for each row.

 This is a great exercise for beginners to understand nested loops and character manipulation in C#.


Source Code :


using System;

namespace Pyramid

{

    internal class Program

    {

        static void Main(string[] args)

        {

            int n = 102;


            for(int i = 97; i <= n; i++)

            {

                for(int j=97;j<=i;j++)

                {

                    Console.Write((char)j);

                }

                Console.WriteLine();

            }

            Console.Read();

        }

    }

}


OutPut:




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

 #Day 4: Exploring Number Pyramids in C#.NET

Today’s pattern is an interesting descending sequence pyramid in C#. 


Each row starts with a different digit and increments sequentially up to 5.

 This type of exercise helps in understanding nested loops and number manipulation in programming.

5 
45 
345 
2345 
12345

Source Code:


using System;

namespace Pyramid

{

    internal class Program

    {

        static void Main(string[] args)

        {

            int n = 5;

           for(int i = n; i >= 1; i--)

            {

                for(int j=i;j<=n;j++)

                {

                    Console.Write(j);

                }

                Console.WriteLine();

            }

            Console.Read();

        }

    }

}


OutPut: