title: How to convert ASCII value into char in C++?
body: <p><strong>How do I convert 5 random ascii values into chars?</strong></p>
  
  <hr>
  
  <p>Prompt:</p>
  
  <p>Randomly generate 5 ascii values from 97 to 122 (the ascii values for all of the alphabet).  As you go, determine the letter that corresponds to each ascii value and output the word formed by the 5 letters. </p>
  
  <p>My Code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;time.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  using namespace std;
  
  int main ()
  {
  srand (time(NULL));
  int val1= rand()%122+97;
  int val2= rand()%122+97;
  int val3= rand()%122+97;
  int val4= rand()%122+97;
  int val5= rand()%122+97
  
  cout&lt;&lt;val1&lt;&lt;" and "&lt;&lt;val2&lt;&lt;" and "&lt;&lt;val3&lt;&lt;" and "&lt;&lt;val4&lt;&lt;" and "&lt;&lt;val15&lt;&lt;". "&lt;&lt;
  
  
  
  
  
  
  return 0;
  }
  </code></pre>