Você está na página 1de 4

C++ par la pratique (PPUR)

http://icwww.epfl.ch/~chappeli/cppplp/

C++ par la pratique


Recueil d'exercices corrigs et aide-mmoire
J.-C. Chappelier & F. Seydoux
Errata Rcuprer l'ensemble des codes sources des corrigs (compresss au format zip, 80 Ko). Corrigs : 1. Variables, oprateurs et expressions Exercice 1 : quel ge avez-vous ? (variables) Solution 1 : voir/view avoir/download Solution 2 : voir/view avoir/download Solution 3 : voir/view avoir/download Exercice 2 : quelques calculs (variables et expressions) voir/view avoir/download 2. Structures de contrle Exercice 3 : tables de multiplication (itration for) voir/view avoir/download Exercice 4 : intervalles (expressions conditionnelles) voir/view avoir/download Solution 1 : Solution 2 : voir/view avoir/download Exercice 5 : expressions arithmtiques (expressions, branchements conditionnels) voir/view avoir/download Exercice 6 : rebonds de balles (itration for) voir/view avoir/download Exercice 7 : rebonds de balles revisits (boucles do...while) voir/view avoir/download Exercice 8 : une histoire de prt (boucles) voir/view avoir/download Exercice 9 : nombres premiers (structures de contrle) voir/view avoir/download Exercice 10 : quations du 3e degr (expressions, structures de contrles) voir/view avoir/download 3. Fonctions Exercice 11 : porte voir/view avoir/download Exercice 12 : demander un nombre (prototypes) Solution 1 : voir/view avoir/download Solution 2 : voir/view avoir/download Solution 3 : voir/view avoir/download Exercice 13 : changes (passage des paramtres, surcharge) Solution 1 : voir/view avoir/download Solution 2 : voir/view avoir/download Exercice 14 : la fonction cosinus (dfinition et appel de fonction) voir/view avoir/download Exercice 15 : calcul approch d'une intgrale (fonctions) voir/view avoir/download 4. Types avancs Exercice 16 : gnrateur automatique de lettres (fonctions, chanes de caractres)

1 sur 4

15/09/2013 21:41

C++ par la pratique (PPUR)

http://icwww.epfl.ch/~chappeli/cppplp/

Solution 1 : voir/view avoir/download Solution 2 : voir/view avoir/download Exercice 17 : produit scalaire (tableaux de taille fixe) Solution 1 : voir/view avoir/download Solution 2 : voir/view avoir/download Exercice 18 : chauffement avec les tableaux dynamiques Exercice 19 : segmentation en mots (string) voir/view avoir/download Exercice 20 : multiplication de matrices (tableaux dynamiques) voir/view avoir/download Exercice 21 : placement sans recouvrement (tableaux) voir/view avoir/download Exercice 22 : nombres complexes (structures) voir/view avoir/download Exercice 23 : slection (pointeurs) voir/view avoir/download Exercice 24 : QCM (structures + vector) voir/view avoir/download Exercice 25 : nombres complexes revisits (structures) voir/view avoir/download Exercice 26 : multiplications de matrices revisites (pointeur) Solution 1 : voir/view avoir/download Solution 2 : voir/view avoir/download Exercice 27 : intgrales revisites (tableaux, pointeurs) voir/view avoir/download 5. Flots Exercice 28 : criture dans un fichier (ofstream) voir/view avoir/download Exercice 29 : lecture depuis un fichier (ifstream + manipulateurs) voir/view avoir/download Exercice 30 : statistiques sur un fichier (fichiers, tableaux) voir/view avoir/download Exercice 31 : QCM revisits (fichiers, structures) Solution : voir/view avoir/download Exemple de fichier : avoir/download 6. Fonctions rcursives Exercice 32 : factorielle (fonctions rcursives) voir/view avoir/download Exercice 33 : nombres de Fibonacci (fonctions rcursives) voir/view avoir/download Exercice 34 : recherche dichotomique (fonctions rcursives) voir/view avoir/download Exercice 35 : tours de Hano (fonctions rcursives) voir/view avoir/download Exercice 36 : mythiques labyrinthes (fonctions rcursives) Solution 1 : voir/view avoir/download Solution 2 : voir/view avoir/download 7. Exercices gnraux Exercice 37 : tri bulles voir/view avoir/download Exercice 38 : algorithme d'Euclide voir/view avoir/download Exercice 39 : piles et parenthses voir/view avoir/download

2 sur 4

15/09/2013 21:41

C++ par la pratique (PPUR)

http://icwww.epfl.ch/~chappeli/cppplp/

Exercice 40 : arithmtique rationnelle voir/view avoir/download Exercice 41 : piles et notation polonaise inverse voir/view avoir/download Exercice 42 : recherche approche de racine voir/view avoir/download Exercice 43 : culture de masse voir/view avoir/download Exercice 44 : tri de Shell voir/view avoir/download Exercice 45 : jeu du pendu voir/view avoir/download 8. Introduction la POO Exercice 46 : petits ronds (objets/classes) voir/view avoir/download Exercice 47 : coordonnes tridimensionnelles (objets/classes) voir/view avoir/download Exercice 48 : un petit tour de magie (objets/classes) voir/view avoir/download 9. Constructeurs et destructeurs Exercice 49 : apritif (constructeurs/destructeurs) voir/view avoir/download Exercice 50 : un peu de douceur dans ce monde de brutes (constructeurs/destructeurs) voir/view avoir/download Exercice 51 : balles rebondissantes, le retour (constructeurs/destructeurs) voir/view avoir/download 10. Surcharge d'oprateurs Exercice 52 : nombres complexes (surcharge d'oprateurs) voir/view avoir/download Exercice 53 : nombres complexes encore (pointeurs, constructeurs) voir/view avoir/download Exercice 54 : encore un peu plus de polynmes (surcharge d'oprateurs) voir/view avoir/download 11. Hritage Exercice 55 : que de vhicules ! (hritage) voir/view avoir/download Exercice 56 : vecteurs tridimensionnels (hritage) voir/view avoir/download Exercice 57 : vecteurs unitaires (hritage) voir/view avoir/download Exercice 58 : un peu d'algbre lmentaire (hritage) voir/view avoir/download Exercice 59 : un peu plus d'algbre lmentaire (hritage) voir/view avoir/download 12. Polymorphisme Exercice 60 : formes polymorphiques (polymorphisme) voir/view avoir/download Exercice 61 : encore des figures gomtriques (collection htrogne) voir/view avoir/download Exercice 62 : puissance 4 (polymorphisme) voir/view avoir/download 13. Hritage multiple Exercice 63 : animaux en peluche (hritage multiple)

3 sur 4

15/09/2013 21:41

C++ par la pratique (PPUR)

http://icwww.epfl.ch/~chappeli/cppplp/

voir/view avoir/download Exercice 64 : employs (hritage multiple, collection htrogne) voir/view avoir/download Exercice 65 : jeu de cartes (hritage multiple) voir/view avoir/download 14. Templates et STL Exercice 66 : ensembles et itrateurs (STL) voir/view avoir/download Exercice 67 : tris revisits (template, STL) Solution 1 : voir/view avoir/download Solution 2 : voir/view avoir/download 15. Exceptions Exercice 68 : le retour des rationnels (exceptions) voir/view avoir/download Exercice 69 : compression RLE (exceptions) voir/view avoir/download 16. Exercices gnraux Exercice 70 : algbre matricielle voir/view avoir/download Exercice 71 : fichiers et programmes voir/view avoir/download Exercice 72 : bibliothque 1 voir/view avoir/download Exercice 73 : checs voir/view avoir/download Exercice 74 : bibliothque 2 voir/view avoir/download
Dernire mise jour le 15 dcembre 2009 Last modified: Tue Dec 15, 2009 ($Revision: 1.11 $).

4 sur 4

15/09/2013 21:41

Você também pode gostar