<?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=Php_algo_td3</id>
	<title>Php 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=Php_algo_td3"/>
	<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Php_algo_td3&amp;action=history"/>
	<updated>2026-06-13T17:08:37Z</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=Php_algo_td3&amp;diff=1013&amp;oldid=prev</id>
		<title>Jc.forton : /* Partie B */</title>
		<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Php_algo_td3&amp;diff=1013&amp;oldid=prev"/>
		<updated>2014-03-18T09:03:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Partie B&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 18 mars 2014 à 11:03&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-l147&quot;&gt;Ligne 147 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 147 :&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;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;=&lt;/del&gt;= Exécution &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;=&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Exécution =&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;pre&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;pre&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;# php -f TD3.php 1205 o&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;# php -f TD3.php 1205 o&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki-mediawiki-:diff:1.41:old-1011:rev-1013:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Jc.forton</name></author>
	</entry>
	<entry>
		<id>https://tala-informatique.fr/index.php?title=Php_algo_td3&amp;diff=1011&amp;oldid=prev</id>
		<title>Jc.forton : /* Partie B */</title>
		<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Php_algo_td3&amp;diff=1011&amp;oldid=prev"/>
		<updated>2014-03-18T08:56:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Partie B&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 18 mars 2014 à 10:56&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-l92&quot;&gt;Ligne 92 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 92 :&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;&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;&amp;lt;div class=&quot;toccolours mw-collapsible mw-collapsed&quot; style=&quot;width:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;700px&lt;/del&gt;&quot;&amp;gt;&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div class=&quot;toccolours mw-collapsible mw-collapsed&quot; style=&quot;width:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;820px&lt;/ins&gt;&quot;&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;big&amp;gt;Exercice 5&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;Exercice 5&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 lang=&amp;quot;php&amp;quot; style=&amp;quot;border:1px solid black;font-size:130%&amp;quot; class=&amp;quot;mw-collapsible-content&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 lang=&amp;quot;php&amp;quot; style=&amp;quot;border:1px solid black;font-size:130%&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jc.forton</name></author>
	</entry>
	<entry>
		<id>https://tala-informatique.fr/index.php?title=Php_algo_td3&amp;diff=957&amp;oldid=prev</id>
		<title>Jc.forton : /* Partie A */</title>
		<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Php_algo_td3&amp;diff=957&amp;oldid=prev"/>
		<updated>2014-03-11T19:10:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Partie A&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 11 mars 2014 à 21:10&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-l6&quot;&gt;Ligne 6 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 6 :&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;* dividende // diviseur &amp;amp;rarr; quotient entier&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;* dividende // diviseur &amp;amp;rarr; quotient entier&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;* dividende % diviseur &amp;amp;rarr; reste&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;* dividende % diviseur &amp;amp;rarr; reste&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&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;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;&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 class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:700px&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;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:700px&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jc.forton</name></author>
	</entry>
	<entry>
		<id>https://tala-informatique.fr/index.php?title=Php_algo_td3&amp;diff=956&amp;oldid=prev</id>
		<title>Jc.forton : Page créée avec « = Sujet = Sujet_TD3.pdf = Partie A = On sait que : * dividende = (quotient x diviseur) + reste * dividende // diviseur &amp;rarr; quotient en... »</title>
		<link rel="alternate" type="text/html" href="https://tala-informatique.fr/index.php?title=Php_algo_td3&amp;diff=956&amp;oldid=prev"/>
		<updated>2014-03-11T19:09:57Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « = Sujet = &lt;a href=&quot;/images/d/dc/Sujet-php-algo-td3.pdf&quot; class=&quot;internal&quot; title=&quot;Sujet-php-algo-td3.pdf&quot;&gt;Sujet_TD3.pdf&lt;/a&gt; = Partie A = On sait que : * dividende = (quotient x diviseur) + reste * dividende // diviseur → quotient en... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Sujet =&lt;br /&gt;
[[Média:sujet-php-algo-td3.pdf|Sujet_TD3.pdf]]&lt;br /&gt;
= Partie A =&lt;br /&gt;
On sait que :&lt;br /&gt;
* dividende = (quotient x diviseur) + reste&lt;br /&gt;
* dividende // diviseur &amp;amp;rarr; quotient entier&lt;br /&gt;
* dividende % diviseur &amp;amp;rarr; reste&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;Exercice 1&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; style=&amp;quot;border:1px solid black;font-size:130%&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
FONCTION decimal_octal(n)&lt;br /&gt;
VAR&lt;br /&gt;
   tmp, resultat : liste d&amp;#039;entiers&lt;br /&gt;
   fin: booléen&lt;br /&gt;
   quotient, i, j : entier&lt;br /&gt;
   fin &amp;lt;- faux&lt;br /&gt;
   quotient &amp;lt;- n&lt;br /&gt;
   i &amp;lt;- 0&lt;br /&gt;
   TANT QUE fin = faux&lt;br /&gt;
      tmp[i] = quotient % 8&lt;br /&gt;
      quotient = quotient // 8&lt;br /&gt;
      SI quotient = 0&lt;br /&gt;
         fin &amp;lt;- vrai&lt;br /&gt;
      FIN SI&lt;br /&gt;
      i++&lt;br /&gt;
   FIN TANT QUE&lt;br /&gt;
   j &amp;lt;- i&lt;br /&gt;
   TANT QUE i &amp;gt; 0&lt;br /&gt;
      resultat[j-i] = tmp[i]&lt;br /&gt;
      i--&lt;br /&gt;
   FIN TANT QUE&lt;br /&gt;
   RETOURNE resultat &lt;br /&gt;
FIN FONCTION&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&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;Exercice 2&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; style=&amp;quot;border:1px solid black;font-size:130%&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
FONCTION octal_decimal(n)&lt;br /&gt;
VAR&lt;br /&gt;
   resultat, i : entier&lt;br /&gt;
   i &amp;lt;- len(n)&lt;br /&gt;
   POUR TOUT m de n FAIRE&lt;br /&gt;
      resultat += m * (8**i)&lt;br /&gt;
      i--&lt;br /&gt;
   FIN POUR&lt;br /&gt;
   RETOURNE resultat &lt;br /&gt;
FIN FONCTION&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Partie B =&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;Exercice 3&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; style=&amp;quot;border:1px solid black;font-size:130%&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
function decimal_octal($n) {&lt;br /&gt;
   $resultat = array ();&lt;br /&gt;
   $fin = false;&lt;br /&gt;
   $quotient = $n;&lt;br /&gt;
   while ( ! $fin ) {&lt;br /&gt;
      $resultat [] = $quotient % 8;&lt;br /&gt;
      $quotient = floor ( $quotient / 8 );&lt;br /&gt;
      if ($quotient == 0) {&lt;br /&gt;
         $fin = true;&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
   return array_reverse ( $resultat );&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;
&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;Exercice 4&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; style=&amp;quot;border:1px solid black;font-size:130%&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
function octal_decimal($n) {&lt;br /&gt;
   $resultat = 0;&lt;br /&gt;
   $i = sizeof ( $n )-1;&lt;br /&gt;
   foreach ( $n as $m ) {&lt;br /&gt;
      $resultat += $m * pow ( 8, $i );&lt;br /&gt;
      $i --;&lt;br /&gt;
   }&lt;br /&gt;
   return $resultat;&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;
&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;Exercice 5&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; style=&amp;quot;border:1px solid black;font-size:130%&amp;quot; class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
function decimal_octal($n) {&lt;br /&gt;
   $resultat = array ();&lt;br /&gt;
   $fin = false;&lt;br /&gt;
   $quotient = $n;&lt;br /&gt;
   while ( ! $fin ) {&lt;br /&gt;
      $resultat [] = $quotient % 8;&lt;br /&gt;
      $quotient = floor ( $quotient / 8 );&lt;br /&gt;
      if ($quotient == 0) {&lt;br /&gt;
         $fin = true;&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
   return array_reverse ( $resultat );&lt;br /&gt;
}&lt;br /&gt;
function octal_decimal($n) {&lt;br /&gt;
   $resultat = 0;&lt;br /&gt;
   $i = sizeof ( $n ) - 1;&lt;br /&gt;
   foreach ( $n as $m ) {&lt;br /&gt;
      $resultat += $m * pow ( 8, $i );&lt;br /&gt;
      $i --;&lt;br /&gt;
   }&lt;br /&gt;
   return $resultat;&lt;br /&gt;
}&lt;br /&gt;
function main($argv) {&lt;br /&gt;
   /* Récupération du nombre décimal */&lt;br /&gt;
   if (sizeof ( $argv ) &amp;lt; 2) {&lt;br /&gt;
      echo &amp;quot;Spécifier un nombre en paramètre et un un base (decimal (d) octal (o)) !&amp;quot;;&lt;br /&gt;
      exit ( 1 );&lt;br /&gt;
   }&lt;br /&gt;
   /* Lecture du nombre */&lt;br /&gt;
   $nombre = $argv [1];&lt;br /&gt;
   /* Lecture de la base */&lt;br /&gt;
   $base = $argv [2];&lt;br /&gt;
   /* Convertion du nombre */&lt;br /&gt;
   if ($base == &amp;#039;d&amp;#039;) {&lt;br /&gt;
      $decimal = octal_decimal ( str_split ( $nombre ) );&lt;br /&gt;
      echo &amp;quot;Le nombre &amp;quot; . $nombre . &amp;quot; en base 8 s&amp;#039;écrit &amp;quot; . $decimal . &amp;quot; en base 10.&amp;quot;;&lt;br /&gt;
   } else if ($base == &amp;#039;o&amp;#039;) {&lt;br /&gt;
      $octal = &amp;quot;&amp;quot;;&lt;br /&gt;
      foreach ( decimal_octal ( $nombre ) as $digit ) {&lt;br /&gt;
         $octal .= $digit;&lt;br /&gt;
      }&lt;br /&gt;
      echo &amp;quot;Le nombre &amp;quot; . $nombre . &amp;quot; en base 10 s&amp;#039;écrit &amp;quot; . $octal . &amp;quot; en base 8.&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   echo &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
main ( $argv );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Exécution ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# php -f TD3.php 1205 o&lt;br /&gt;
Le nombre 1205 en base 10 s&amp;#039;écrit 2265 en base 8.&lt;br /&gt;
&lt;br /&gt;
# php -f TD3.php 2265 d&lt;br /&gt;
Le nombre 2265 en base 8 s&amp;#039;écrit 1205 en base 10.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jc.forton</name></author>
	</entry>
</feed>