<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://tala-informatique.fr/index.php?action=history&amp;feed=atom&amp;title=Java_algo_td3</id>
	<title>Java algo td3 - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://tala-informatique.fr/index.php?action=history&amp;feed=atom&amp;title=Java_algo_td3"/>
	<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Java_algo_td3&amp;action=history"/>
	<updated>2026-05-18T09:24:59Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://tala-informatique.fr/index.php?title=Java_algo_td3&amp;diff=1520&amp;oldid=prev</id>
		<title>Jc.forton : /* Exercice 1 */</title>
		<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Java_algo_td3&amp;diff=1520&amp;oldid=prev"/>
		<updated>2015-05-12T05:28:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Exercice 1&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 12 mai 2015 à 07:28&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot;&gt;Ligne 19 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 19 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;big&amp;gt;Afficher la solution:&amp;lt;/big&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;big&amp;gt;Afficher la solution:&amp;lt;/big&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source class=&amp;quot;mw-collapsible-content&amp;quot; lang=&amp;quot;C&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source class=&amp;quot;mw-collapsible-content&amp;quot; lang=&amp;quot;C&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#define N 5&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;int main() {&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	int tab[N], i;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	i = 0;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	while (i &amp;lt; N) {&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		tab[i] = N - i;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		printf(&quot;L&#039;index %d du tableau vaut %d\n&quot;, i, tab[i]);&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		i += 1;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	return 0;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki-mediawiki-:diff:1.41:old-1519:rev-1520:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Jc.forton</name></author>
	</entry>
	<entry>
		<id>https://tala-informatique.fr/index.php?title=Java_algo_td3&amp;diff=1519&amp;oldid=prev</id>
		<title>Jc.forton : Page créée avec « __NOTOC__ == Exercice 1 == Dérouler le programme suivant de façon à suivre l’état des variables : &lt;source lang=&quot;C&quot; style=&quot;width:685px&quot;&gt; #define N 5 int main(){     i... »</title>
		<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Java_algo_td3&amp;diff=1519&amp;oldid=prev"/>
		<updated>2015-05-12T05:27:51Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « __NOTOC__ == Exercice 1 == Dérouler le programme suivant de façon à suivre l’état des variables : &amp;lt;source lang=&amp;quot;C&amp;quot; style=&amp;quot;width:685px&amp;quot;&amp;gt; #define N 5 int main(){     i... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
== Exercice 1 ==&lt;br /&gt;
Dérouler le programme suivant de façon à suivre l’état des variables :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot; style=&amp;quot;width:685px&amp;quot;&amp;gt;&lt;br /&gt;
#define N 5&lt;br /&gt;
int main(){&lt;br /&gt;
    int tab[N], i;&lt;br /&gt;
    i=0;&lt;br /&gt;
    while(i &amp;lt; N){&lt;br /&gt;
        tab[i]=N-i;&lt;br /&gt;
        i+=1;&lt;br /&gt;
    }&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:700px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;Afficher la solution:&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source class=&amp;quot;mw-collapsible-content&amp;quot; lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define N 5&lt;br /&gt;
int main() {&lt;br /&gt;
	int tab[N], i;&lt;br /&gt;
	i = 0;&lt;br /&gt;
	while (i &amp;lt; N) {&lt;br /&gt;
		tab[i] = N - i;&lt;br /&gt;
		printf(&amp;quot;L&amp;#039;index %d du tableau vaut %d\n&amp;quot;, i, tab[i]);&lt;br /&gt;
		i += 1;&lt;br /&gt;
	}&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Exercice 2 ==&lt;br /&gt;
Dérouler le programme suivant de façon à suivre l’état des variables :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot; style=&amp;quot;width:685px&amp;quot;&amp;gt;&lt;br /&gt;
#define N 7&lt;br /&gt;
int main(){&lt;br /&gt;
    int tab[N], i;&lt;br /&gt;
    tab[0]=1;&lt;br /&gt;
    for(i=1; i &amp;lt; N; i++){&lt;br /&gt;
        tab[i]=tab[i-1]+2;&lt;br /&gt;
    }    &lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:950px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;Afficher la solution:&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source class=&amp;quot;mw-collapsible-content&amp;quot; lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Exercice 3 ==&lt;br /&gt;
Dérouler le programme suivant de façon à suivre l’état des variables :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot; style=&amp;quot;width:685px&amp;quot;&amp;gt;&lt;br /&gt;
#define N 10&lt;br /&gt;
int main() {&lt;br /&gt;
	int tab[N], i;&lt;br /&gt;
	tab[0] = 1;&lt;br /&gt;
	tab[1] = 1;&lt;br /&gt;
	i = 2;&lt;br /&gt;
	do {&lt;br /&gt;
		tab[i] = tab[i - 1] + tab[i - 2];&lt;br /&gt;
		i++;&lt;br /&gt;
	} while (i &amp;lt;= 7);&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:1070px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;Afficher la solution:&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source class=&amp;quot;mw-collapsible-content&amp;quot; lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Exercice 4 ==&lt;br /&gt;
L’objectif de cet exercice consiste à écrire un programme permettant d’inverser l’ordre des valeurs d’un tableau.&lt;br /&gt;
&lt;br /&gt;
Exemple : {1, 2, 3, 4} &amp;amp;rarr; {4, 3, 2, 1}.&lt;br /&gt;
&lt;br /&gt;
*Écrire l’algorithme en pseudo-code pour une version du programme utilisant un tableau intermédiaire.&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:1110px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;Afficher la solution:&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source class=&amp;quot;mw-collapsible-content&amp;quot; lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Écrire l’algorithme en pseudo-code pour une version du programme n’utilisant pas de tableau intermédiaire.&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:700px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;Afficher la solution:&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source class=&amp;quot;mw-collapsible-content&amp;quot; lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Exercice 5 ==&lt;br /&gt;
L’objectif consiste ici à généraliser l’exercice précédent. On souhaite permettre à l’utilisateur d’effectuer une permutation circulaire des valeurs du tableau en précisant la valeur d’un décalage de position. &lt;br /&gt;
&lt;br /&gt;
Cette valeur sera saisie par l’utilisateur : une valeur positive correspondant à un décalage vers la droite et une valeur négative à un décalage vers la gauche.&lt;br /&gt;
&lt;br /&gt;
Par exemple, un décalage de +2 donne :&lt;br /&gt;
&lt;br /&gt;
{‘a’, ‘b’, ‘c’, ‘d’} &amp;amp;rarr; {‘c’, ‘d’, ‘a’, ‘b’}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;Afficher la solution:&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source class=&amp;quot;mw-collapsible-content&amp;quot; lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Exercice 6 ==&lt;br /&gt;
Écrire un programme permettant à l’utilisateur de saisir un nombre choisi de valeurs, qui devront être stockées dans un tableau. L’utilisateur commence par entrer le nombre de valeurs qu’il compte saisir (maximum 100) et effectue ensuite la saisie.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:700px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;Afficher la solution:&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source class=&amp;quot;mw-collapsible-content&amp;quot; lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Exercice 7 ==&lt;br /&gt;
Modifier le programme pour qu’une fois la saisie terminée, le programme détermine et affiche le nombre de valeurs négatives, le nombre de valeurs nulles et le nombre de valeurs positives.&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:700px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;Afficher la solution:&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source class=&amp;quot;mw-collapsible-content&amp;quot; lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Exercice 8 ==&lt;br /&gt;
Sur le même principe, écrivez un programme permettant à l’utilisateur de saisir les notes d’une classe. &lt;br /&gt;
&lt;br /&gt;
Le programme, une fois la saisie terminée, renvoie le nombre de notes supérieures ou égales à la moyenne de la classe.&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:700px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;Afficher la solution:&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source class=&amp;quot;mw-collapsible-content&amp;quot; lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jc.forton</name></author>
	</entry>
</feed>