c Program
C Program To Print Rhombus Star Pattern
Example
#include <stdio.h>
int main()
{
int i, j, rows;
printf("Enter rows: ");
scanf("%d", &rows);
for(i=1; i<=rows; i++)
{
for(j=1; j<=rows - i; j++)
{
printf(" ");
}
for(j=1; j<=rows; j++)
{
printf("*");
}
printf("\n");
}
return 0;
}
C Program To Print Rhombus Star Pattern
No comments:
Post a Comment