Home C Programming Language / Programs / Program to print mirrored parallelogram star pattern ******** ******** ******** ******** ******** ******** ******** ******** ********
🚀 Programming Example

Program to print mirrored parallelogram star pattern
 
********
 ********
  ********
   ********
    ********
     ********
      ********
       ********
        ******** 

👁 3,436 Views
💻 Practical Program
📘 Step Learning
The logic to print mirrored parallelogram star pattern is same as of mirrored rhombus star pattern. The only change we need to make is we need to iterate through M rows and N columns (where M is the total number of rows to print and N is a total number of columns to print).

💻 Program Code

/*
 * C program to print mirrored parallelogram star pattern series
 */

#include <stdio.h>

int main()
{
    int i, j, M, N;

    /* Input number of rows and columns */
    printf("Enter rows: ");
    scanf("%d", &M);
    printf("Enter columns: ");
    scanf("%d", &N);


    for(i=1; i<=M; i++)
    {
        /* Print trailing spaces */
        for(j=1; j<i; j++)
        {
            printf(" ");
        }

        for(j=1; j<=N; j++)
        {
            printf("*");
        }

        printf("\n");
    }

    return 0;
}
                        

🖥 Program Output

Enter rows: 6
Enter columns: 7
*******
 *******
  *******
   *******
    *******
     *******
Press any key to continue . . .
                            

📘 Explanation

Logic to print mirrored parallelogram star pattern

 

********************
 ********************
  ********************
   ********************
    ********************

 

Logic to print mirrored parallelogram star pattern is same as of mirrored rhombus star pattern. The only change we need to make is we need to iterate though M rows and N columns (where M is the total number of rows to print and N is total number of columns to print).

📚 Learning Subject

Master Programming Through Practical Examples

Improve your coding logic, problem-solving skills and programming confidence by practicing real-world examples with explanations.

🎯 How to learn from this example

First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.

🔥 Practice suggestion

Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.