lundi 15 juin 2015

Create array using a set list

I have this,

    srand( ( unsigned) 0 );
    for( n = 0; n < len; ++n )  
     {                          
         word[ n ] = 'a' + rand( ) % ;

     }
     word[ n ] = '\0';

and i need it to select the random characters from a set list of non consecutive, characters, B,H,G,K,V and fill the string with the characters selected. What I don't know how to do is get my program to select from only those few characters




Aucun commentaire:

Enregistrer un commentaire