Hollow square

Hi I need help in making this square hollow loop using for loop.
*****
*___*
*___*
*___*
*****

I am online from phone so can't type the whole code.
the underscores represent blank spaces
Maybe when you put your phone down you can show us some code.
Ok so, here is the code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
using namespace std;

int main()
{
	unsigned int i=1;
	cout<<"Hollow Square"<<endl<<"*****"<<endl;
	for (i;i<=3;i++)
	{
		cout<<"*   *"<<endl;
		if (i%3==0)
		{
			cout<<"*****"<<endl<<endl;
			break;
		}
	}
	return 0;
}


Good Luck, Zaki;
Topic archived. No new replies allowed.