C# - How To Create A Parallelogram Star Program In C#

C# - How To Create A Program To Print Parallelogram Star Program In C#

                                                                                                                                         

In This C# Tutorial We Will See How To Make A Program To Print A Parallelogram Using For Loop In C# Programming Language.

Source Code:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i < 10; i++)
            {
 
                //loop for 40 stars
                for (int j = 0; j < 40; j++)
                {
                    Console.Write("*");
                }
 
                Console.WriteLine();
 
                //loop for spaces
                for (int l = 0; l <= i; l++)
                {
                    Console.Write("  ");//two space
                }
            }
            Console.ReadLine();
        }
    }
}

//////////OUTPUT:

Parallelogram Star In C#
 Parallelogram In C#




Share this

Related Posts

Previous
Next Post »