INFORMATIQUE COMPTABILITÉ ECONOMIE MARKETING MANAGEMENT GESTION STATISTIQUES FI
INFORMATIQUE COMPTABILITÉ ECONOMIE MARKETING MANAGEMENT GESTION STATISTIQUES FINANCE COMMERCE ELECTRONIQUE ELECTRICITÉ Cours gratuits » » Cours informatique » » Cours programmation » » Cours langage C » » Exercices C » » Exercice langage C: Conjugaison Exercice langage C: Conjugaison Exercice de Conjugaison : Écrire un programme qui lit un verbe du premier groupe (se terme avec "er") au clavier et qui affiche la conjugaison au présent de l'indicatif de ce verbe. Contrôlez s'il s'agit bien d'un verbe qui se termine avec "er" avant de conjuguer. Vous utiliserez pour résoudre ce programme les fonctions scanf, printf, strcat et strlen. Exemple: erbe : fêter je fête tu fêtes il fête nous fêtons vous fêtez ils fêtent 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 #include #include main() { /* Déclarations */ char VERB[20]; /* chaîne contenant le verbe */ char AFFI[30]; /* chaîne pour l'affichage */ int L; /* longueur de la chaîne */ /* Saisie des données */ printf("\nVerbe : "); scanf("%s",VERB); /* Contrôler s'il s'agit d'un verbe en 'er' */ L = strlen(VERB); if ((VERB[L-2]!='e') || (VERB[L-1]!='r')) printf("\nCe n'est pas un verbe du premier grou else { /* Couper la terminaison 'er'. */ VERB[L-2]='\0'; /* Conjuguer ... */ AFFI[0]='\0'; strcat(AFFI, "je "); strcat(AFFI, VERB); strcat(AFFI, "e"); printf(AFFI); . . . AFFI[0]='\0'; strcat(AFFI, "ils "); strcat(AFFI, VERB); strcat(AFFI, "ent"); printf(AFFI); } return 0; } https://www.cours-gratuit.com/langage-c/exercice-langage-c-conjugaison 28/01/2020, 3>49 PM Page 1 of 2 Contact Notre équipe Espace recrutement Politique de confidentialité Desktop view Tous les documents sont… Profitez du téléchargement sécurisé et sans limite de volume… Télécharger Youscribe Ce site utilise des cookies pour vous garantir la meilleure expérience sur notre site. Got it! Learn more https://www.cours-gratuit.com/langage-c/exercice-langage-c-conjugaison 28/01/2020, 3>49 PM Page 2 of 2 uploads/Management/ exercice-langage-c-conjugaison-pdf.pdf
Documents similaires
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/ZCw3CBLWlm3Sp8ItfiSIED545cyXSqiURvOognseLo5kIkwELiU7GzHZTCoDS8UgUByu1KdYCTYPDvA6UfxmF9i8.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/xKGQ73hfOhtfwGl9HCHPcpLB4R5uqZzz43mjhUmMAMfwj7fN0BIubtkRblHNE3UE5Fw7GUAT1bPossUA1iHlATLY.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/QImMGLo9pDALtSSetWHUqPXuUYOVIozz8UUjDFq0GwKvFfo8JFQtJVZKuwf1yPZ1hC607BaOnBJHCJbwZzWzfHaO.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/mjP5tqQbCuupyTYG4JlmrtXoZDO8MugoozrONm7GL2Ie8QnKJtoTz5XQPtloo74THiILuedd4OlhvxKwu26Al3jE.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/L60As2QsJKvQco4dF9FuHq8VZk0JRQR7nbLGoFfGKertFaAjMu5HnY6krEikLcRcHJE9QWkuuZ9mw0j2gGcyXdZA.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/fYEFIOBU0vQRNGLJYGfM9DC20cKAtbazkNLc4n8Ef3WmtZZWnoI2xxpP5mpnyoVGRjvEnhS328PmF0oOpgJVsr7v.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/dzWRjp36w1j5RcDGMwBZEnLrjpnBWjeAAhqLS67Uq2ewrvpbfqELYRXzMu9r20wdchmBXZIKTHawt7prygKOuodc.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/XzpWLWLVekYiGXENV26HzTK7hUaGObIdcvv31TcZkkWgfXDiOVrwtGaKhjoi7wx5RHljn6drdMiGINVkPM0t7FxQ.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/6CJJY5aDrukIA9ojWe1aJlC7dVBIWG0uVaJGasBlMLxjoUtHDQG7XjQCNBd2VHS8WAAWHshchsWcFWdOm15CY4MU.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/rqCPIxoRcOkRkTHgZFiXj8pjYjSYBKxzQHtjHk8p2Olb1MFvPPclsSJIVWqgOX2dQkMFle0ylC4GnYjKKAp3UzeW.png)
-
24
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Apv 06, 2022
- Catégorie Management
- Langue French
- Taille du fichier 0.1128MB