Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a function void bar_chart(double values[], int size) that displays a bar c

ID: 3637029 • Letter: W

Question

Write a function
void bar_chart(double values[], int size)
that displays a bar chart of the values in values, using asterisks, like this:
**********************
****************************************
****************************
**************************
**************
You may assume that values in values are positive or negative. First figure out the maximum
value in values. That value’s bar should be drawn with 40 asterisks. Shorter bars
should use proportionally fewer asterisks.And then write the source code that includes this function and calls it,to work properly.

Explanation / Answer

I cant figure out how to do the proportional thing you are asking, but I have coded up the basics, If you find a correct algorithm for the proportional issue you can just modify this where I commented stuff and it will work. Cheers #include #include using namespace std; void bar_chart(double values[], int size); int main () { int size; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote