Algorithmique
ALGORITHMIQUE
Exemple & Exercices Corrigés Avec Algorithme & VB.NET
ALGORITHMIQUE
9002
أﺳﺄل ﷲ أن ﯾﻜﻮن ھﺬا اﻟﻌﻤﻞ ﻣﻔﯿﺪا وﺧﺎﻟﺼﺎ ﻟﻮﺟـﮫ ﷲ، ﻓﻤﺎ ﻛﺎن ﻓﯿﮫ ﻣﻦ ﺻﻮاب ﻓﻤﻦ ﷲ، وﻣﺎ ﻛﺎن ﻣﻦ ﺧﻄﺄ أو ﻧﺴﯿﺎن ﻓﻤﻦ ﻧﻔﺴﻲ واﻟﺸﯿﻄﺎن.
2 Page
marouan.ts@gmail.fr
ALGORITHMIQUE
2009
Table Des Matières
Introduction ………………………………………………………….. 6
PARTIE I :
I. L’instruction d’affectation ……………………………………….. 7
I.1 Syntaxe ……………………………………………………………………... 7 I.2 Exemple …………………………………………………………………….. 7 I.3 Remarque …………………………………………………………………… 7 Exercices ………………………………………………………………………... 7
II. L’instruction d’entrée / sortie ……………………………………. 8
II.1 Remarque …………………………………………………………………... 8 II.2 Exemple ……………………………………………………………………..8 II.3 Remarque ……………………………………………………………………8 II.4 Exemple ……………………………………………………………………. 8 Exercices ………………………………………………………………………... 8
III. La structure alternative …………………………………………. 10
III.1 Les conditions simples ……………………………………………………10 III.1.1 Syntaxe …………………………………………………………...10 III.1.2 Exemple …………………………………………………………..10 III.2 L’instruction Si … Alors … Sinon … Finsi ………………………………10 III.2.1 Syntaxe …………………………………………………………...10 III.2.2 Exemple …………………………………………………………..10 III.3 L’instruction Selon ………………………………………………………..11 III.3.1 Syntaxe …………………………………………………………...11 Exercices …………………………………………………………………….… 11
IV. Les structures répétitives ………………………………………. 12
IV.1 L’instruction POUR …………………………………………………… 12 IV.1.1 Syntaxe ………………………………………………………... 12 IV.1.2 Exemple ……………………………………………………….. 12 Exercices …………………………………………………………………….. 12 IV.2 La structure TANT QUE ………………………………………………. 13 IV.2.1 Syntaxe ………………………………………………………... 13 IV.2.2 Exemple ……………………………………………………….. 13 Exercices …………………………………………………………………….. 14 IV.3 La structure REPETER ……………………………………………....... 14 IV.3.1 Syntaxe ………………………………………………………... 14 IV.3.2 Exemple ……………………………………………………….. 14
Page 3
marouan.ts@gmail.fr
ALGORITHMIQUE
2009
Exercices