Write a **main** function to input a sequence of numbers and draw a histogram-type graph of them:
1. Loop to read integers, one per line, from **cin**, until you hit the end of the data (for this lab, that means until the integer you read is negative). As you read each integer:
1. Check the value of the integer ?€" if the value is less than zero, exit the loop normally. If it is greater than 100, write an informative error message to **cerr** and exit the program.
2. Calculate how many asterisks you'll need to use to graph the integer, figuring that zero asterisks represents a value of 0, one asterisk represents a value of *either* 1 or 2, two asterisks *either* 3 or 4, ..., and 50 asterisks *either* 99 or 100. (Be sure to test your program and check the output, making sure the program is putting out the right numbers of asterisks <nobr>--</nobr> this is a great example of a "hidden" bug, one that you have to test for in order to find.)
3. Write a line to **cout** containing the integer value, a flag character, and the correct number of asterisks to represent the integer you just read:
* Use a field width of 5 for writing the (right-justified) integer.
* Put exactly one space before and after the flag character, which should be the digit '2' if the number is a perfect square, or a capital 'X' if it is not. (*Hint:* to check for "perfect square", see if the square root of the number is a whole number.)
* Left-justify the span of asterisks after that.
(Note: because you checked that the input number is between 0 and 100, you can't possibly put out more than 50 asterisks, so you don't have to check at this point whether the output line is too long for the page.)
2. When you read the terminating negative value from **cin**, write a text line to **cout** that says you're done.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).
Must be fuctional in microsoft visual c++ 6.0