Вы находитесь на странице: 1из 1

Exercice 3 – Factorielle

AP1 TD3 – Schémas itératifs Ecrire un algorithme qui calcule la factorielle n ! d'un nombre n saisi par l'utilisateur.

On rappelle que :
Exercice 1 – Baguettes 0 ! =1
Ecrire un algorithme qui affiche une table des prix de 1 à 10 baguettes de pain sous la n ! = 1 × 2 × 3 × … × n
forme :
1 baguette(s) coute(nt) 0.8 euros
Exercice 4
2 baguette(s) coute(nt) 1.6 euros
3 baguette(s) coute(nt) 2.4 euros Ecrire un algorithme qui demande des nombres à l'utilisateur et qui indique, à la fin de la
… saisie, le nombre le plus grand et son rang. L'utilisateur met fin à la saisie en entrant la
10 baguette(s) coute(nt) 8 euros valeur zéro.

Par exemple, si l'utilisateur entre les nombres suivants :
Exercice 2 – Un grand classique 6  8.5  ­52.3  95  23.8  0
Que   résultat   fournit   l'algorithme   suivant ?  Pour   répondre   à  cette   question,   on   pourra L'algorithme affichera
simuler une exécution de l’algorithme avec pim valant 5 à l'aide du tableau ci­dessous. Le nombre le plus grand est 95, situé au rang 4.

ALGORITHME fondamental
VARIABLE : pim, pam, poum: entiers Exercice 5 – La démographie de la ville de Poitiers
DEBUT Le taux d'accroissement annuel de la ville de Poitiers (Vienne) est de 0.89 %. Ecrire un
saisir pim
poum ← 0
algorithme qui indique le nombre d'années à partir de l'an 2013 pour atteindre 100 000
POUR pam ALLANT DE 1 A pim FAIRE habitants, sachant la ville compte actuellement 87 697 habitants. 
poum ← poum + pam
FINPOUR
afficher poum Exercice 6 – Pour la semaine prochaine...
FIN
Concevoir un algorithme qui imprime, pour n saisi par l'utilisateur :

1
12
Valeur de pam (boucle POUR) Valeur de poum 123
1234
1 0+1
12345
2 (0 + 1) + 2 ...
1 2 3 4 5 6 ... n
... …

Pour cet exercice, on pourra supposer l'existence :
• d'une instruction afficherSRL qui affiche un texte à l'écran sans faire de retour à
la ligne
• d'une instruction RetourLigne qui affiche un retour à la ligne

I.U.T. d’Amiens, département Informatique, année universitaire 2013/2014   AP1 ­ algorithmique  TD3 ­ page 1/1

Вам также может понравиться

  • TDMMM 1
    TDMMM 1
    Документ1 страница
    TDMMM 1
    reda
    Оценок пока нет
  • TDMMM 1
    TDMMM 1
    Документ1 страница
    TDMMM 1
    reda
    Оценок пока нет
  • ZEEE
    ZEEE
    Документ1 страница
    ZEEE
    reda
    Оценок пока нет
  • Eeeeeeee
    Eeeeeeee
    Документ1 страница
    Eeeeeeee
    reda
    Оценок пока нет
  • TDMMM 1
    TDMMM 1
    Документ1 страница
    TDMMM 1
    reda
    Оценок пока нет
  • Eeeeeeeeee
    Eeeeeeeeee
    Документ1 страница
    Eeeeeeeeee
    reda
    Оценок пока нет
  • EEEEEEEE
    EEEEEEEE
    Документ1 страница
    EEEEEEEE
    reda
    Оценок пока нет
  • TDMMM 1
    TDMMM 1
    Документ1 страница
    TDMMM 1
    reda
    Оценок пока нет
  • TDMMM 1
    TDMMM 1
    Документ1 страница
    TDMMM 1
    reda
    Оценок пока нет
  • EEEEE
    EEEEE
    Документ1 страница
    EEEEE
    reda
    Оценок пока нет
  • EEEEEEEEE
    EEEEEEEEE
    Документ1 страница
    EEEEEEEEE
    reda
    Оценок пока нет
  • TD3 - Schémas Itératifs: Saisir Pim Poum 0 Poum Poum + Pam Afficher Poum
    TD3 - Schémas Itératifs: Saisir Pim Poum 0 Poum Poum + Pam Afficher Poum
    Документ1 страница
    TD3 - Schémas Itératifs: Saisir Pim Poum 0 Poum Poum + Pam Afficher Poum
    reda
    Оценок пока нет
  • Zzeeeee
    Zzeeeee
    Документ1 страница
    Zzeeeee
    reda
    Оценок пока нет
  • Eeeeee
    Eeeeee
    Документ1 страница
    Eeeeee
    reda
    Оценок пока нет
  • Eeeee
    Eeeee
    Документ1 страница
    Eeeee
    reda
    Оценок пока нет
  • Eeeeeee
    Eeeeeee
    Документ1 страница
    Eeeeeee
    reda
    Оценок пока нет
  • TD3 - Schémas Itératifs: Saisir Pim Poum 0 Poum Poum + Pam Afficher Poum
    TD3 - Schémas Itératifs: Saisir Pim Poum 0 Poum Poum + Pam Afficher Poum
    Документ1 страница
    TD3 - Schémas Itératifs: Saisir Pim Poum 0 Poum Poum + Pam Afficher Poum
    reda
    Оценок пока нет
  • Eeeeeee
    Eeeeeee
    Документ1 страница
    Eeeeeee
    reda
    Оценок пока нет
  • BGV GH
    BGV GH
    Документ1 страница
    BGV GH
    reda
    Оценок пока нет
  • tdmmm1 PDF
    tdmmm1 PDF
    Документ1 страница
    tdmmm1 PDF
    reda
    Оценок пока нет
  • TDM 354
    TDM 354
    Документ1 страница
    TDM 354
    reda
    Оценок пока нет
  • TD 849
    TD 849
    Документ1 страница
    TD 849
    reda
    Оценок пока нет
  • Tdhuh 5156
    Tdhuh 5156
    Документ1 страница
    Tdhuh 5156
    reda
    Оценок пока нет
  • TD 588
    TD 588
    Документ1 страница
    TD 588
    reda
    Оценок пока нет
  • TDDKN
    TDDKN
    Документ1 страница
    TDDKN
    reda
    Оценок пока нет
  • TDMDFTD
    TDMDFTD
    Документ1 страница
    TDMDFTD
    reda
    Оценок пока нет
  • Tdfrko
    Tdfrko
    Документ1 страница
    Tdfrko
    reda
    Оценок пока нет
  • TDMGGTD
    TDMGGTD
    Документ1 страница
    TDMGGTD
    reda
    Оценок пока нет
  • TDDTTF
    TDDTTF
    Документ1 страница
    TDDTTF
    reda
    Оценок пока нет
  • Communiquer Communiquer: Figure 1: Deux Décompositions de La Tâche T
    Communiquer Communiquer: Figure 1: Deux Décompositions de La Tâche T
    Документ12 страниц
    Communiquer Communiquer: Figure 1: Deux Décompositions de La Tâche T
    he200gab
    100% (1)
  • Devoir M1 Math
    Devoir M1 Math
    Документ1 страница
    Devoir M1 Math
    Solene Tsina
    Оценок пока нет
  • Voyage Du Jeune - Tome 3
    Voyage Du Jeune - Tome 3
    Документ568 страниц
    Voyage Du Jeune - Tome 3
    Paula Aranha
    Оценок пока нет
  • Le Zodiaque de Dendérah (Réparé)
    Le Zodiaque de Dendérah (Réparé)
    Документ40 страниц
    Le Zodiaque de Dendérah (Réparé)
    marion
    100% (1)
  • Corr td1 PDF
    Corr td1 PDF
    Документ3 страницы
    Corr td1 PDF
    Blewoussi
    Оценок пока нет
  • Programme Séminaire UCESIF Bucarest, 13 - 14 Mai 2013
    Programme Séminaire UCESIF Bucarest, 13 - 14 Mai 2013
    Документ24 страницы
    Programme Séminaire UCESIF Bucarest, 13 - 14 Mai 2013
    Victor Cozmei
    Оценок пока нет
  • MCC Ing Cycle Preparatoire Integree
    MCC Ing Cycle Preparatoire Integree
    Документ2 страницы
    MCC Ing Cycle Preparatoire Integree
    Nadia Ait Ahmed
    Оценок пока нет
  • Cellule - Ultra - Cours PDF
    Cellule - Ultra - Cours PDF
    Документ6 страниц
    Cellule - Ultra - Cours PDF
    Ada
    Оценок пока нет
  • Chapitre 2-2
    Chapitre 2-2
    Документ15 страниц
    Chapitre 2-2
    Reda Bachnou
    Оценок пока нет
  • Exercices Correction Théorème de Pythagore 4ème
    Exercices Correction Théorème de Pythagore 4ème
    Документ3 страницы
    Exercices Correction Théorème de Pythagore 4ème
    haquenne.laurent
    Оценок пока нет
  • TS 019m 184 (OA4 ROUHIA TE2S 2ID)
    TS 019m 184 (OA4 ROUHIA TE2S 2ID)
    Документ69 страниц
    TS 019m 184 (OA4 ROUHIA TE2S 2ID)
    jawhar eddine boukhris
    Оценок пока нет
  • Chapitre 5-Signature Numérique
    Chapitre 5-Signature Numérique
    Документ4 страницы
    Chapitre 5-Signature Numérique
    DO UA
    Оценок пока нет
  • Iec 60372
    Iec 60372
    Документ46 страниц
    Iec 60372
    Luis Andres Pradenas Fuentes
    Оценок пока нет
  • Correction Emd MR 2017 2018
    Correction Emd MR 2017 2018
    Документ4 страницы
    Correction Emd MR 2017 2018
    Benlouanas Kamel
    Оценок пока нет
  • Iso 14539
    Iso 14539
    Документ42 страницы
    Iso 14539
    David Southgate
    Оценок пока нет
  • Note Technique de La Voie D'acces Principlae VF
    Note Technique de La Voie D'acces Principlae VF
    Документ21 страница
    Note Technique de La Voie D'acces Principlae VF
    Sanaa
    Оценок пока нет
  • Mobilite Internationale
    Mobilite Internationale
    Документ2 страницы
    Mobilite Internationale
    vettielle vettielle
    Оценок пока нет
  • 03 Vocabulaire Metrologique
    03 Vocabulaire Metrologique
    Документ14 страниц
    03 Vocabulaire Metrologique
    Bouchedda Yassine
    Оценок пока нет
  • 293 Conception de La Commande de Processus Popescu
    293 Conception de La Commande de Processus Popescu
    Документ295 страниц
    293 Conception de La Commande de Processus Popescu
    Steve Demirel
    Оценок пока нет
  • Draft Charte Graphique Pdl-145
    Draft Charte Graphique Pdl-145
    Документ22 страницы
    Draft Charte Graphique Pdl-145
    damien batoba
    Оценок пока нет
  • L3 TP Jet
    L3 TP Jet
    Документ6 страниц
    L3 TP Jet
    Amel Hyd
    Оценок пока нет
  • Fiche Enseignant
    Fiche Enseignant
    Документ4 страницы
    Fiche Enseignant
    Wulfa
    Оценок пока нет
  • Annexe I Construction Hangar Chambre Froide
    Annexe I Construction Hangar Chambre Froide
    Документ51 страница
    Annexe I Construction Hangar Chambre Froide
    AL Diallo
    Оценок пока нет
  • Inbound Marketing
    Inbound Marketing
    Документ13 страниц
    Inbound Marketing
    Paweł Sajdek
    Оценок пока нет
  • Uca2 1 1a
    Uca2 1 1a
    Документ3 страницы
    Uca2 1 1a
    Marie
    Оценок пока нет
  • NCT Memento Rinaldo v2
    NCT Memento Rinaldo v2
    Документ15 страниц
    NCT Memento Rinaldo v2
    Manmzel Rapha
    Оценок пока нет
  • EXA Auto
    EXA Auto
    Документ6 страниц
    EXA Auto
    قرين لطفي
    Оценок пока нет
  • P2621v2analyse Des Surface Technique de L Ingenieur
    P2621v2analyse Des Surface Technique de L Ingenieur
    Документ13 страниц
    P2621v2analyse Des Surface Technique de L Ingenieur
    salim
    Оценок пока нет
  • MC1.06 Metallurgie Generale Et Choix Des Materiaux 3j
    MC1.06 Metallurgie Generale Et Choix Des Materiaux 3j
    Документ1 страница
    MC1.06 Metallurgie Generale Et Choix Des Materiaux 3j
    Guillaume
    Оценок пока нет
  • Mini Projet Urbanisme
    Mini Projet Urbanisme
    Документ5 страниц
    Mini Projet Urbanisme
    Badra Ali Sanogo
    Оценок пока нет