Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.59 KB | None | 0 0
  1. //This function prints out the appropriate characters for the guess
  2. void printout()
  3. {
  4.     int x=0, i=0, found=0;
  5.  
  6.     for(i=0; i<strlen(lower_title); ++i)
  7.         {
  8.         if(lower_title[i]=='\0' && lower_title[i]=='\n' && lower_title[i]==' ')
  9.             {
  10.             found=1;
  11.             }
  12.         else if(lower_title[i]==' ')
  13.             {
  14.             printf(" ");
  15.             }
  16.         else
  17.             {
  18.             while(x=0 && x<sizeof used_char)
  19.                 {
  20.                 if(lower_title[i]==used_char[x])
  21.                     {
  22.                     found = 1;
  23.                     printf("%c", used_char[x]);
  24.                     x = 1000;
  25.                     }//end if
  26.                 ++x;
  27.                 }//end while
  28.    
  29.                 if(found==0)
  30.                     {
  31.                     printf("*");
  32.                     }
  33.  
  34.             }//and for
  35.  
  36.    
  37.         }
  38.     printf("\n");
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement