Rhombus Pattern Program In C Using Star

Below are the various examples of Rhombus patterns that are made using the combination of stars. This Rhombus pattern includes left and right inclined rhombus. And the program to print that Rhombus are written in C programming language.

  • For Loop
  • While Loop
  • if..else

1). Program to print right Inclined Solid Rhombus using star(*) in C

solid rhombus right inclined pattern program in c
#include<stdio.h>
#include<conio.h>
void main()
{    
	int i,j,n,k;
	printf("Enter the number of rows for Rhombus: ");
	scanf("%d",&n);
	for(i=0;i<n;i++){
		for(k=1;k<n-i;k++){
            printf(" ");
		}
		for(j=0;j<=n;j++){
              printf("*");
		}
		printf("\n");
	}
	getch();
} 

Output

Rhombus Pattern Program In C

2). Program to print left inclined Solid Rhombus using star(*) in C

solid rhombus left inclined pattern program in C
#include<stdio.h>
#include<conio.h>
void main()
{    
	int i,j,n,k;
	printf("Enter the number of rows for Rhombus: ");
	scanf("%d",&n);
		for(i=n;i>=1;i--){
		    for(j=1;j<=n-i;j++){
                        printf(" ");
		    }
		    for(k=1;k<=n;k++){
		        printf("*");
		    }
		printf("\n");
	    }
	getch();
} 

Output

Leave a Comment