I have been trying for about 6 hours to get this program to work. It's a C++ program for for loops. I am trying to go through a book, but I don't have source code for how this should be. I need to make a program that looks like this below:
+ = are to show open space
*++++++++++**********+**********++++++++++*
**+++++++++*********+++*********+++++++++**
***++++++++********+++++********++++++++***
****+++++++*******+++++++*******+++++++****
*****++++++******+++++++++******++++++*****
******+++++*****+++++++++++*****+++++******
*******++++****+++++++++++++****++++*******
********+++***+++++++++++++++***+++********
*********++**+++++++++++++++++**++*********
**********+*+++++++++++++++++++*+**********
So far I got the code below, but have no clue what to do from here. Any help would be greatly appreciated. Thank You!!!!!
#include <iostream>
#include <conio.h>
using namespace std;
int main ()
{
int i,j;
for (i=1; i<=10; i++)
{
for (j=0; j<i; j++)
cout << "*" ;
cout << endl;
}
for (i=10; i>=1; i--)
{
for (j=0; j<i; j++)
cout << "*" ;
cout << endl;
}
cout << "any key..." << endl;
_getch();
return 0;
}