title: How do I output a vertical histogram?
body: <p>I have a string array containing the names of 10 countries (max length of 100). I have another array containing the corresponding total amount that country won. The two arrays look like this:</p>
  <pre class="lang-c prettyprint-override"><code>char countryNames[10][100] = {&quot;Japan&quot;, &quot;USA&quot;, &quot;China&quot;, &quot;ROC&quot;, &quot;UK&quot;, &quot;Australia&quot;, 
                                &quot;Kosova&quot;, &quot;Italy&quot;, &quot;France&quot;, &quot;Canada&quot;}
  
  int totalMedals[10] = {13, 14, 18, 12, 7, 6, 2, 9, 5, 4}
  </code></pre>
  <p>So Japan won 13 medals, USA won 14 medals, ... etc. I'm having trouble finding a way to output these statistics in a vertical histogram using *'s. This is the output I am looking for:</p>
  <p><img src="https://i.stack.imgur.com/UAhrB.png" alt="Histogram Example Output" /></p>
  <p>I can't find a solution to this that isn't extremely hard coded. There is no specific spacing but I want it to look mostly like the example.
  Can anyone help me do this?</p>