Hey all,
This is my first post. I am really hoping that someone out there has a solution to my C++ coding problem...
This is my code and what I have to do...
I think it is rows of 1 - 10 and then back
*************** *************** *************** *************** *************** *************** **
//These histograms are supposed to print beside eachother like this:
//* *************** ***** *
//** ********* ********* **
//*** ******** ******** ***
//**** ******* ******* ****
//***** ****** ****** *****
//****** ***** ***** ******
//******* **** **** *******
//******** *** *** ********
//********* ** ** *********
//*********** ***********
//but I can't make them go beside eachother. My code below makes two of them,
//but they are one under the other!! Not what I need....
//HELP??????
#include <iostream>
using namespace std;
int count;
main()
{
for(int count_1=1;count _1<=10;count_1+ +)
{
for(int count_2=1;count _2<=count_1;cou nt_2++)
cout<<"*";
cout<<endl;
}
cout << "\n";
for(int count_3=1;count _3<=10;count_3+ +)
{
for(int count_4=10;coun t_4>=count_3;co unt_4--)
cout<<"*";
cout<<endl;
}
cout << "\nPress q and then Enter to quit-->"; //
char dummy;
cin >> dummy; //Wait for input
return 0;
} // main
*************** *************** *************** *************** *************** *************** *
Help anyone, please!!!!!!!
Thanks,
Shelbee
This is my first post. I am really hoping that someone out there has a solution to my C++ coding problem...
This is my code and what I have to do...
I think it is rows of 1 - 10 and then back
*************** *************** *************** *************** *************** *************** **
//These histograms are supposed to print beside eachother like this:
//* *************** ***** *
//** ********* ********* **
//*** ******** ******** ***
//**** ******* ******* ****
//***** ****** ****** *****
//****** ***** ***** ******
//******* **** **** *******
//******** *** *** ********
//********* ** ** *********
//*********** ***********
//but I can't make them go beside eachother. My code below makes two of them,
//but they are one under the other!! Not what I need....
//HELP??????
#include <iostream>
using namespace std;
int count;
main()
{
for(int count_1=1;count _1<=10;count_1+ +)
{
for(int count_2=1;count _2<=count_1;cou nt_2++)
cout<<"*";
cout<<endl;
}
cout << "\n";
for(int count_3=1;count _3<=10;count_3+ +)
{
for(int count_4=10;coun t_4>=count_3;co unt_4--)
cout<<"*";
cout<<endl;
}
cout << "\nPress q and then Enter to quit-->"; //
char dummy;
cin >> dummy; //Wait for input
return 0;
} // main
*************** *************** *************** *************** *************** *************** *
Help anyone, please!!!!!!!
Thanks,
Shelbee
Comment