APL/APL1.1/Dev1.1/Dev2510/Lecture.c
2021-11-30 15:07:19 +01:00

29 lines
461 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char Mdp[25], MdpV[9] = "AZERTYUIO";
char a;
int i,j;
int v = 9;
printf("Entrez votre mot de passe :");
for(i=0;i<10;i++){
Mdp[i] = getchar();
printf ("%c",Mdp[i]);
}
for (j=0;j<10;j++){
if(strcmp(Mdp[j],MdpV[j])==1)
{
v= v-1;
printf("Mauvais Mot De Passe");
break;
}
}
if (v=9) {
printf("Bon mot de passe");
}
printf("\n");
return EXIT_SUCCESS;
}