tp
This commit is contained in:
BIN
Dev1.1/Dev2510/Lecture
Executable file
BIN
Dev1.1/Dev2510/Lecture
Executable file
Binary file not shown.
28
Dev1.1/Dev2510/Lecture.c
Normal file
28
Dev1.1/Dev2510/Lecture.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#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;
|
||||
}
|
Reference in New Issue
Block a user