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

#define N 10

void check_password(char *pass)
{
  int good=0;
  char password[10];

  strcpy(password, pass);
  if (!strcmp(password,"passw0rd"))
    good=1;
  if ( good == 1 )
    printf("Password OK\n");
  else
    printf("Password KO\n");
}
int main (int argc, char **argv)
{
  //char password[N];
  char *passwords;
  int i;
  passwords = (char *) malloc(10 *sizeof(char));
  if (argc!=2)
  {
  printf("Usage: ./a.out password \n");
    return(1);
  }
  //printf("Give password:");
  //scanf(" %s", passwords);
  //scanf("%s", &password);
  
  //for (i=0; i< N; i++)
  //printf("password:%s \n",passwords);
  check_password(argv[1]);
}
