24 lines
558 B
C
24 lines
558 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
#define NUMEROS 27
|
||
|
|
||
|
int main(void) {
|
||
|
char tableau[NUMEROS] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
|
||
|
char find;
|
||
|
int indice;
|
||
|
while(find < 'a' || find > 'z'){
|
||
|
printf("Entrez une lettre minuscule : ");
|
||
|
find = getchar();
|
||
|
}
|
||
|
for(indice = 0 ; indice < NUMEROS ; indice++){
|
||
|
if(tableau[indice] == find){
|
||
|
printf("[%c]", tableau[indice]);
|
||
|
}
|
||
|
else{
|
||
|
printf("%c", tableau[indice]);
|
||
|
}
|
||
|
}
|
||
|
printf("\n");
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|