Star Square (Filled)

By Developgram - January 10, 2017

/*
Summary: Print filled square pattern of stars.
*/

#include<stdio.h>

int main()
{
    int row, col, n;
    
    printf("Enter the number of rows: ");
    scanf("%d", &n);
    
    for(row=1; row<=n; row++)
    {
  for(col=1; col<=n; col++)
   printf("* ");
  printf("\n");
    }
    
    return 0;
}

  • Share:

You Might Also Like

0 comments