                                    // myprog.cpp

#include <iostream.h>
#include <mci.h>

int main ()
{
char letter_1;
char letter_2;
char letter_3;

 again:

cout << "type in first letter.\n";
cin >> letter_1;

cout << "type in second letter.\n";
cin >> letter_2;

cout << "type in third letter.\n";
cin >> letter_3;

do
 {
 cout <<"THe word is " << letter_1 << letter_2  << letter_3 <<'\n' << '\n' ;

{
if (letter_1 == 'a')
 {
cout << "play the ah wav sound.\n";
 PlaySound ( "ah.wav", NULL,  SND_FILENAME );
}

   if (letter_1 == 'b')
 {
cout << "play the bh wav sound.\n";
PlaySound ( "bh.wav", NULL,  SND_FILENAME );
}

if (letter_1 == 'c')
 {
cout << "play the ca wav sound.\n";
PlaySound ( "ca.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'd')
 {
cout << "play the dh wav sound.\n";
PlaySound ( "dh.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'e')
 {
cout << "play the eh wav sound.\n";
PlaySound ( "eh.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'f')
 {
cout << "play the fa wav sound.\n";
PlaySound ( "fa.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'g')
 {
cout << "play the ga wav sound.\n";
PlaySound ( "ga.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'h')
 {
cout << "play the ha wav sound.\n";
PlaySound ( "ha.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'i')
 {
cout << "play the ih wav sound.\n";
PlaySound ( "ih.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'j')
 {
cout << "play the ja wav sound.\n";
PlaySound ( "ja.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'k')
 {
cout << "play the ka wav sound.\n";
PlaySound ( "ka.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'l')
 {
cout << "play the la wav sound.\n";
PlaySound ( "la.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'm')
 {
cout << "play the ma wav sound.\n";
PlaySound ( "ma.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'n')
 {
cout << "play the na wav sound.\n";
PlaySound ( "na.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'o')
 {
cout << "play the oh wav sound.\n";
PlaySound ( "oh.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'p')
 {
cout << "play the pa wav sound.\n";
PlaySound ( "pa.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'q')
 {
cout << "play the qu wav sound.\n";
PlaySound ( "qu.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'r')
 {
cout << "play the ra wav sound.\n";
PlaySound ( "ra.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 's')
 {
cout << "play the si wav sound.\n";
PlaySound ( "si.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 't')
 {
cout << "play the ta wav sound.\n";
  PlaySound ( "ta.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'u')
 {
cout << "play the uh wav sound.\n";
PlaySound ( "uh.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'v')
 {
cout << "play the vh wav sound.\n";
PlaySound ( "vh.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'w')
 {
cout << "play the wa wav sound.\n";
PlaySound ( "wa.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'x')
 {
cout << "play the xh wav sound.\n";
PlaySound ( "xh.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'y')
 {
cout << "play the ya wav sound.\n";
PlaySound ( "ya.wav", NULL,  SND_FILENAME );
}
if (letter_1 == 'z')
 {
cout << "play the za wav sound.\n";
PlaySound ( "za.wav", NULL,  SND_FILENAME );
}


else

{
cout << "continue \n" ;
}



if ((letter_1 == 'a')  || (letter_1 == 'b')||(letter_1 == 'c')||(letter_1 == 'd')
  ||(letter_1 == 'e')||(letter_1 == 'f')||(letter_1 == 'g')||(letter_1 == 'h')

||(letter_1 == 'i')||(letter_1 == 'j')||(letter_1 == 'k')||(letter_1 == 'l')
||(letter_1 == 'm')||(letter_1 == 'n')||(letter_1 == 'o')||(letter_1 == 'p')
||(letter_1 == 'q')||(letter_1 == 'r')||(letter_1 == 's')||(letter_1 == 't')
||(letter_1 == 'u')||(letter_1 == 'v')||(letter_1 == 'w')||(letter_1 == 'x')
||(letter_1 == 'y')||(letter_1 == 'z') )
{
cout << letter_1 << '\n' ;
}
else
{
cout << "you must input only letters. \n";
goto again ;
}

}


 
   //////////////////////////////////////////////////////////////////////////
   ///////this is the code for letter_2


  



{
if (letter_2 == 'a')
 {
cout << "play the ah wav sound.\n";
 PlaySound ( "ah.wav", NULL,  SND_FILENAME );
}

   if (letter_2 == 'b')
 {
cout << "play the ba wav sound.\n";
  PlaySound ( "bh.wav", NULL,  SND_FILENAME );
}

if (letter_2 == 'c')
 {
cout << "play the ca wav sound.\n";
PlaySound ( "ca.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'd')
 {
cout << "play the da wav sound.\n";
PlaySound ( "dh.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'e')
 {
cout << "play the eh wav sound.\n";
PlaySound ( "eh.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'f')
 {
cout << "play the fa wav sound.\n";
PlaySound ( "fa.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'g')
 {
cout << "play the ga wav sound.\n";
PlaySound ( "ga.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'h')
 {
cout << "play the ha wav sound.\n";
PlaySound ( "ha.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'i')
 {
cout << "play the ih wav sound.\n";
PlaySound ( "ih.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'j')
 {
cout << "play the ja wav sound.\n";
PlaySound ( "ja.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'k')
 {
cout << "play the ka wav sound.\n";
PlaySound ( "ka.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'l')
 {
cout << "play the la wav sound.\n";
PlaySound ( "la.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'm')
 {
cout << "play the ma wav sound.\n";
PlaySound ( "ma.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'n')
 {
cout << "play the na wav sound.\n";
PlaySound ( "na.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'o')
 {
cout << "play the oh wav sound.\n";
PlaySound ( "oh.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'p')
 {
cout << "play the pa wav sound.\n";
PlaySound ( "pa.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'q')
 {
cout << "play the qu wav sound.\n";
PlaySound ( "qu.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'r')
 {
cout << "play the ra wav sound.\n";
PlaySound ( "ra.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 's')
 {
cout << "play the si wav sound.\n";
PlaySound ( "si.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 't')
 {
cout << "play the ta wav sound.\n";
PlaySound ( "ta.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'u')
 {
cout << "play the uh wav sound.\n";
PlaySound ( "uh.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'v')
 {
cout << "play the vh wav sound.\n";
PlaySound ( "vh.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'w')
 {
cout << "play the wa wav sound.\n";
PlaySound ( "wa.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'x')
 {
cout << "play the xh wav sound.\n";
PlaySound ( "xh.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'y')
 {
cout << "play the ya wav sound.\n";
PlaySound ( "ya.wav", NULL,  SND_FILENAME );
}
if (letter_2 == 'z')
 {
cout << "play the za wav sound.\n";
PlaySound ( "za.wav", NULL,  SND_FILENAME );
}


else
  {

 cout << "continue \n" ;
}



  if ((letter_2 == 'a')  || (letter_2 == 'b')||(letter_2 == 'c')||(letter_2 == 'd')
  ||(letter_2 == 'e')||(letter_2 == 'f')||(letter_2 == 'g')||(letter_2 == 'h')

||(letter_2 == 'i')||(letter_2 == 'j')||(letter_2 == 'k')||(letter_2 == 'l')
||(letter_2 == 'm')||(letter_2 == 'n')||(letter_2 == 'o')||(letter_2 == 'p')
||(letter_2 == 'q')||(letter_2 == 'r')||(letter_2 == 's')||(letter_2 == 't')
||(letter_2 == 'u')||(letter_2 == 'v')||(letter_2 == 'w')||(letter_2 == 'x')
||(letter_2 == 'y')||(letter_2 == 'z') )
  {
 cout << letter_2 << '\n' ;
  }
  else
  {
  cout << "you must input only letters. \n ";
  goto again ;
   }

   }

/////////////////////////////////////////////////////////////////////////////////
//////this is code for letter_3






{
if (letter_3 == 'a')
 {
cout << "play the ah wav sound.\n";
 PlaySound ( "ah.wav", NULL,  SND_FILENAME );
}

   if (letter_3 == 'b')
 {
cout << "play the ba wav sound.\n";
PlaySound ( "bh.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'c')
 {
cout << "play the ca wav sound.\n";
PlaySound ( "ca.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'd')
 {
cout << "play the da wav sound.\n";
PlaySound ( "dh.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'e')
 {
cout << "play the eh wav sound.\n";
PlaySound ( "eh.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'f')
 {
cout << "play the fa wav sound.\n";
PlaySound ( "fa.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'g')
 {
cout << "play the ga wav sound.\n";
PlaySound ( "ga.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'h')
 {
cout << "play the ha wav sound.\n";
PlaySound ( "ha.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'i')
 {
cout << "play the ih wav sound.\n";
PlaySound ( "ih.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'j')
 {
cout << "play the ja wav sound.\n";
PlaySound ( "ja.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'k')
 {
cout << "play the ka wav sound.\n";
PlaySound ( "ka.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'l')
 {
cout << "play the la wav sound.\n";
PlaySound ( "la.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'm')
 {
cout << "play the ma wav sound.\n";
PlaySound ( "ma.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'n')
 {
cout << "play the na wav sound.\n";
PlaySound ( "na.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'o')
 {
cout << "play the oh wav sound.\n";
PlaySound ( "oh.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'p')
 {
cout << "play the pa wav sound.\n";
PlaySound ( "pa.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'q')
 {
cout << "play the qu wav sound.\n";
PlaySound ( "qu.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'r')
 {
cout << "play the ra wav sound.\n";
PlaySound ( "ra.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 's')
 {
cout << "play the si wav sound.\n";
PlaySound ( "si.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 't')
 {
cout << "play the ta wav sound.\n";
PlaySound ( "ta.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'u')
 {
cout << "play the uh wav sound.\n";
PlaySound ( "uh.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'v')
 {
cout << "play the vh wav sound.\n";
PlaySound ( "vh.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'w')
 {
cout << "play the wa wav sound.\n";
PlaySound ( "wa.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'x')
 {
cout << "play the xh wav sound.\n";
PlaySound ( "xh.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'y')
 {
cout << "play the ya wav sound.\n";
PlaySound ( "ya.wav", NULL,  SND_FILENAME );
}
if (letter_3 == 'z')
 {
cout << "play the za wav sound.\n";
PlaySound ( "za.wav", NULL,  SND_FILENAME );
}


else
  {

 cout << "continue \n" ;
}



if ((letter_3 == 'a') ||(letter_3 == 'b')||(letter_3 == 'c')||(letter_3 == 'd')
  ||(letter_3 == 'e')||(letter_3 == 'f')||(letter_3 == 'g')||(letter_3 == 'h')

||(letter_3 == 'i')||(letter_3 == 'j')||(letter_3 == 'k')||(letter_3 == 'l')
||(letter_3 == 'm')||(letter_3 == 'n')||(letter_3 == 'o')||(letter_3 == 'p')
||(letter_3 == 'q')||(letter_3 == 'r')||(letter_3 == 's')||(letter_3 == 't')
||(letter_3 == 'u')||(letter_3 == 'v')||(letter_3 == 'w')||(letter_3 == 'x')
||(letter_3 == 'y')||(letter_3 == 'z') )
  {
 cout << letter_3 << '\n' ;
  }
  else
  {
  cout << "you must input only letters. \n ";

    goto again ;
   }

   }


   char ans;
   cout << "Do want to hear it again press (y)/yes (n)/no ";
      cin >> ans ;
     if (ans == 'n')
     {break;}
     }
while (1);


}
