 21.5.   ,  
                 

//   
//   
#include <stdio.h>
#include <string.h>

#define PASSWORD_SIZE 100
#define PASSWORD      "myGOODpassword\n"
//    ,   ^^^^
//     ,
//  

int main()
{
        //    
        int count=0;

        //   ,  
        char buff[PASSWORD_SIZE];

        //   
        for(;;)
        {
               //    
               // 
               printf("Enter password:");
               fgets(&buff[0],PASSWORD_SIZE,stdin);

               //     
               if (strcmp(&buff[0],PASSWORD))
                      //      ""
                      printf("Wrong password\n");
                      //  (  )
                      //    
               else break;

               //    
               //  ,   
               //    
               if (++count>3) return 1;
}

       //   ,     
       printf("Password OK\n");
