Hi guys, for most of you PROs out there might think that the question is quite lame but here it goes... i have to create a cross pattern in c++ that looks like this ...
1 2 3 4 5 6 7 8 9 10 11
**
**
**
**
**********
**********
**
**
**
**
using nested loops and only 2 cout messages such as cout<<"*"; and cout<<" ";
Ive managed to reach to the point where i get a single line cross ...
Then i realized i have to consider the shape as 4 zones and i managed to get this
1 2 3 4 5 6 7 8 9 10
*
*
*
*
*
*
*
*
*
**********
by changing the if statement to
if(x==4||y==4)
i guess this is the way it should be but i cant get the mirror cout for the other 3 zones in order to get the desired result...any help will be appreciated! Thanks!
The code with the one line cross is very close. You only need to change line 11 to get a double cross. What kind of condition should x be given so that it is satisfied for two values?