APL/Dev1.1/Dev2510/Lecture.c

29 lines
461 B
C
Raw Normal View History

2021-10-26 15:48:14 +02:00
#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;
}