So I have to write a function to draw an int array using stars. The values shoul
ID: 3624565 • Letter: S
Question
So I have to write a function to draw an int array using stars. The values should be in the range of 0-20.So, for the array { 2, 4, 2, 1, 7 } the function would draw:
**
****
**
*
*******
Each line is one element of the array and the number of stars is the same as
the value.
Call this function after every insertion operation in insertion sort (It should display the
array n-1 times).
You should use an array of size 16 with randomly generated data between
0-20.
Call the function once before any sorting also.
I already have my insertion sort written, im just a bit confused as to how to go about writing the stars.. I've done it before and am blanking.
Pseudo code/code/word explanation are all appreciated.