Vertical Bar Graph

I have an upcoming lab assignment that I am trying to get an early start on, but I am having trouble finding help on the Internet. Basically, the assignment is this:

ASSIGNMENT:

Your program for this lab exercise will create a vertical bar chart of some
number of integer values. The program will ask the user how many values they
will enter (between 1 and 20, inclusive) and then will prompt the user to
enter each value (between 0 and 10, inclusive). After all of the data is
entered then the program will create a vertical bar chart using "*"
characters.

This is an example run of how your program should work
----------------------------------------------------------------------

How many values will you enter: 8

Enter a number between 0 and 10 (inclusive):1
Enter a number between 0 and 10 (inclusive):2
Enter a number between 0 and 10 (inclusive):4
Enter a number between 0 and 10 (inclusive):0
Enter a number between 0 and 10 (inclusive):10
Enter a number between 0 and 10 (inclusive):7
Enter a number between 0 and 10 (inclusive):-1
Invalid value. Try again.
Enter a number between 0 and 10 (inclusive):8
Enter a number between 0 and 10 (inclusive):3


*
*
* *
***
***
***
* ***
* ****
** ****
*** ****
----------------------------------------------------------------------

Feel free to use as many classes as you want with this program. Think about
object oriented design and what sorts of classes you would want. There are
multiple ways to design this but one possibility is that you have a class
DataSet that contains the data and another class BarCharter that is a class
that knows how to print a vertical bar chart given a DataSet.

If anyone has code they can offer that can pull this off, please let me know.

I have my own set of code right here, but as you can see, I hadn't even found out how to do the graph part:

#include <iostream>
#include <cmath>
#include <string>
using namespace std;

int main()
{

int values [value1];
double value1 = 0;
double value2 = 0;

do {
cout << "How many values will you enter: ";
cin >> value1;
} while (value1 >= 0 || value1 <= 20);

if(value1 < 0 || value2 > 20)
{
cout << "Invalid value. Try again.";
cin >> value1;
}

for(int i=1; i <= value1; i++)
{
do {
cout <<"Enter a number between 0 and 10 (inclusive): ";
cin >> value2;
} while ( value2 >= 0 || value2 <= 10);

if(value2 < 0 || value2 > 10)
{
cout << "Invalid value. Try again.";
cin >> value2;
}
}
return 0;
}

Please help me.
Never mind, I managed to solve this on my own.
1
2
std::cout<<"Use Code Tags NExt Time Please"<<endl;
std::cout<<"http://www.cplusplus.com/forum/articles/42672/; 
I tried, but this site has been giving me problems. I kept using the code tag, but when I go to post it, it never works.
Topic archived. No new replies allowed.