Last active
October 19, 2020 20:50
-
-
Save tolotratlt/5156167 to your computer and use it in GitHub Desktop.
Masculin/Féminin permet de convertir un mot masculin se terminant en "teur" par "trice" et vice-versa, sans toutefois vérifier la véracité du mot par exemple : perturbateur -> perturbatriceperturbatrice -> perturbateur. Programme 32 bit seulement.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
char szMots[254], *p; | |
scanf("%s", szMots); | |
for(p=szMots; *p !='\0'; p++); | |
*(p+1) = 0;//utile | |
(*((unsigned int*)(p-sizeof(unsigned int))) == 0x65636972) ? (*((unsigned int*)(p-sizeof(unsigned int))) = 0x00727565) : (*((unsigned int*)(p-sizeof(unsigned int)+1)) = 0x65636972); | |
printf(">> %s : %s\n\n",((!(*p))?"masculin":"feminin"),szMots); | |
system("pause"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment