Exemple d’utilisation de la fonction ‘strcmp()’ pour comparer deux chaînes de caractères

Author:


{filelink=13589}


#include 
#include 

int main ()
{
  char password[] = "123456";
  char tmp_password[80];

  do {

     printf ("Tapez votre mot de passe: ");
     gets (tmp_password);

  } while (strcmp (password,tmp_password) != 0);

  printf ("Bienvenu!");
  return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Exemple d’utilisation de la fonction ‘strcmp()’ pour comparer deux chaînes de caractères

Author:


{filelink=13589}


#include 
#include 

int main ()
{
  char password[] = "123456";
  char tmp_password[80];

  do {

     printf ("Tapez votre mot de passe: ");
     gets (tmp_password);

  } while (strcmp (password,tmp_password) != 0);

  printf ("Bienvenu!");
  return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Exemple d’utilisation de la fonction ‘strcmp()’ pour comparer deux chaînes de caractères

Author:


{filelink=13589}


#include 
#include 

int main ()
{
  char password[] = "123456";
  char tmp_password[80];

  do {

     printf ("Tapez votre mot de passe: ");
     gets (tmp_password);

  } while (strcmp (password,tmp_password) != 0);

  printf ("Bienvenu!");
  return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Comparer deux chaînes de caractères

Author:


{filelink=13589}


#include 
#include 

int main ()
{
  char password[] = "123456";
  char tmp_password[80];

  do {

     printf ("Tapez votre mot de passe: ");
     gets (tmp_password);

  } while (strcmp (password,tmp_password) != 0);

  printf ("Bienvenu!");
  return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *