title: convert letters into numbers (A=1; B=2...) c++
body: <p>I was trying to make letters into numbers in c++. When I write in console  it should count modulo and type out if ship is coming (i did all, but can't make letters into numbers :/ )     </p>
  
  <p>This what should happen: ABC a = 1; b=2; c=3    1*2*3=6....</p>
  
  <p>So I need to write a word and it should be separated into letters and converted into numbers like that.</p>
  
  <p>I am just learning and I don't know much :)    </p>
  
  <p>My current code:</p>
  
  <pre><code>int shipnum, groupnum, moduleship, modulegroup;
  
  cout &lt;&lt; "type ship number "; cin &gt;&gt; shipnum;
  cout &lt;&lt; "type group number "; cin &gt;&gt; groupnum;
  
  
  
  /*shipnum dabar 5... (5 mod 2)
  groupnum dabar 3... (3 mod 2)
  */
  
  moduleship = shipnum % 47;        //skaiciuojam moduli...
  modulegroup = groupnum % 47;
  
  if (moduleship == modulegroup) {  
   cout &lt;&lt; "YES ship is coming for you :)";
   }
  
  else if (moduleship != modulegroup) {             //  "!=" reiskia "nelygu"
      cout &lt;&lt; "SORRY, NO ship for you :(";
  }
  
  return 0;
  </code></pre>