23 lines
476 B
C
23 lines
476 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
int main (int argc, char *argv[]){
|
||
|
char mdp[27];
|
||
|
char c;
|
||
|
int i=0;
|
||
|
strcpy(mdp,"Quoi?feur!");
|
||
|
printf("Veuillez saisir un mot de passe (26 caracteres maximum): ");
|
||
|
char entree[27];
|
||
|
c=getchar();
|
||
|
while(c!='\n'){
|
||
|
entree[i]=c;
|
||
|
c=getchar();
|
||
|
i++;
|
||
|
} if(strcmp(mdp,entree)==0){
|
||
|
printf("Identification reussie !\n");
|
||
|
} else{
|
||
|
printf("Mot de passe incorrect, le mot de passe est Quoi?feur!\n");
|
||
|
}
|
||
|
return 0;
|
||
|
}
|