need help with this code


I’m new to c programming and need some help with this code

I’m ask to write a program that reads in the side of a square and the prints that square out of asterisks. The program should work for squares of all side sizes between 1 and 20. For example, if the program reads a size of 4, it should print

It then ask me to modify the program so that it prints a hollow square. For example if the program reads a size of 5, it should print

I was able to do the first part but don’t know how to do the second part can any one help me

below is the code for the first part:

#include <stdio.h>
#include <stdlib.h>

int inputInteger(int, int);

#define MININPUT 1
#define MAXINPUT 20
#define TRUE 1
#define FALSE 0

int main (void)

int squareSize, column, row;

squareSize = inputInteger(MININPUT, MAXINPUT);

row = squareSize;

while(row >= 1){
column = 1;
while(column <= squareSize){


int inputInteger(int minInput,int maxInput){
int reading;
int validInput;
printf("\nPlease enter the number of side of a square: “);
validInput = scanf(”%d", &reading);
printf("\nThis is not a valid entry\n");
if((validInput == TRUE)&&((reading >maxInput)||(reading < minInput))){
printf(“Error, the number entered needs to be between %d to %d\n”, minInput, maxInput);
validInput = FALSE;
return reading;

That isn’t an Arduino question.
Why don’t you talk to your teacher?