<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>exercice langage c débutant - F2School</title>
	<atom:link href="https://f2school.com/tag/exercice-langage-c-debutant/feed/" rel="self" type="application/rss+xml" />
	<link>https://f2school.com/tag/exercice-langage-c-debutant/</link>
	<description>Votre bibliothèque en ligne</description>
	<lastBuildDate>Thu, 01 Oct 2020 13:32:01 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://f2school.com/wp-content/uploads/2019/09/69591802_108099623904091_8806667596762972160_n-150x150.png</url>
	<title>exercice langage c débutant - F2School</title>
	<link>https://f2school.com/tag/exercice-langage-c-debutant/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Les Instructions itératives Exercices corrigés &#8211; Langage C</title>
		<link>https://f2school.com/les-instructions-iteratives-exercices-corriges-langage-c/</link>
					<comments>https://f2school.com/les-instructions-iteratives-exercices-corriges-langage-c/#comments</comments>
		
		<dc:creator><![CDATA[F2School]]></dc:creator>
		<pubDate>Fri, 20 Mar 2020 16:30:35 +0000</pubDate>
				<category><![CDATA[Algorithme et Programmation]]></category>
		<category><![CDATA[Informatique]]></category>
		<category><![CDATA[exercice langage c débutant]]></category>
		<category><![CDATA[exercice langage c débutant pdf]]></category>
		<category><![CDATA[exercices corrigés langage c boucles pdf]]></category>
		<category><![CDATA[exercices corrigés langage c les structures]]></category>
		<category><![CDATA[langage c exercices corrigés gratuit pdf]]></category>
		<category><![CDATA[les structures itératives pdf]]></category>
		<category><![CDATA[structure itérative exercice]]></category>
		<category><![CDATA[structure itérative exercice corrigé]]></category>
		<guid isPermaLink="false">http://f2school.com/?p=6001</guid>

					<description><![CDATA[<p>Les Instructions itératives Exercices corrigés &#8211; Langage C Exercice 1 sur les Instructions itératives Ecrire un algorithme qui lit un réel x et un enter positif p et affiche x puissance p. Solution #include &#60;stdio.h&#62; #include &#60;math.h&#62; void main() { &#160;&#160;&#160; float r; &#160;&#160;&#160; int n; &#160;&#160;&#160; printf(&#8220;Donner un reel: \n&#8221;); &#160;&#160;&#160; scanf(&#8220;%f&#8221;,&#38;r); &#160;&#160;&#160; do [&#8230;]</p>
<p>The post <a href="https://f2school.com/les-instructions-iteratives-exercices-corriges-langage-c/">Les Instructions itératives Exercices corrigés – Langage C</a> first appeared on <a href="https://f2school.com">F2School</a>.</p>
<p>L’article <a href="https://f2school.com/les-instructions-iteratives-exercices-corriges-langage-c/">Les Instructions itératives Exercices corrigés &#8211; Langage C</a> est apparu en premier sur <a href="https://f2school.com">F2School</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img fetchpriority="high" decoding="async" src="http://f2school.com/wp-content/uploads/2020/03/Les-Instructions-itératives-1024x574.png" alt="Les Instructions itératives Exercices corrigés - Langage C" class="wp-image-6004" width="620" height="347" srcset="https://f2school.com/wp-content/uploads/2020/03/Les-Instructions-itératives-1024x574.png 1024w, https://f2school.com/wp-content/uploads/2020/03/Les-Instructions-itératives-600x337.png 600w, https://f2school.com/wp-content/uploads/2020/03/Les-Instructions-itératives-300x168.png 300w, https://f2school.com/wp-content/uploads/2020/03/Les-Instructions-itératives-768x431.png 768w, https://f2school.com/wp-content/uploads/2020/03/Les-Instructions-itératives.png 1280w" sizes="(max-width: 620px) 100vw, 620px" /></figure></div>



<span id="more-6001"></span>



<p><strong>Les Instructions itératives Exercices corrigés &#8211; Langage C</strong></p>



<h5 class="wp-block-heading"><strong>Exercice 1</strong> sur les Instructions itératives </h5>



<p>Ecrire un algorithme qui lit un réel x et un enter positif p et affiche x puissance p.</p>


<p><span style="color: #0000ff;"><strong><u>Solution</u></strong></span></p>
<p><span style="color: #0000ff;">#include &lt;stdio.h&gt;</span></p>
<p><span style="color: #0000ff;">#include &lt;math.h&gt;</span></p>
<p><span style="color: #0000ff;">void main()</span></p>
<p><span style="color: #0000ff;">{</span></p>
<p>&nbsp;&nbsp;<span style="color: #0000ff;">&nbsp; float r;</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; int n;</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; printf(&#8220;Donner un reel: \n&#8221;);</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; scanf(&#8220;%f&#8221;,&amp;r);</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; do</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; {</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&#8220;Donner un entier :\n&#8221;);</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scanf(&#8220;%d&#8221;,&amp;n);</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; }while(n&lt;0);</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; float puiss= pow(r,n);</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; printf(&#8220;%f ^ %d = %f&#8221;,r,n,puiss);</span></p>
<p><span style="color: #0000ff;">}</span></p>


<h5 class="wp-block-heading"><strong>Exercice 2</strong> sur les Instructions itératives  </h5>



<p>Ecrire un algorithme qui lit un entier positif et affiche sa
factorielle. </p>



<p>n! = n*(n-1)*….*3*2*1</p>



<p>0! = 1</p>


<p><span style="color: #0000ff;"><strong><u>Solution</u></strong></span></p>
<p><span style="color: #0000ff;">#include &lt;stdio.h&gt;</span></p>
<p><span style="color: #0000ff;">void main()</span></p>
<p><span style="color: #0000ff;">{</span></p>
<p><span style="color: #0000ff;">int n;</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp;&nbsp; do</span></p>
<p>&nbsp;&nbsp;<span style="color: #0000ff;">&nbsp; {</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&#8220;Donner un entier :\n&#8221;);</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scanf(&#8220;%d&#8221;,&amp;n);</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; }while(n&lt;0);</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; int i=1;</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; int fact;</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; if(n!=0)</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; {</span></p>
<p>&nbsp;&nbsp;&nbsp;<span style="color: #0000ff;"> fact=n;</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; for(i=1;i&lt;n;i++)</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; {</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; fact=fact*(n-i);</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; }</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; }</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; else fact=1;</span></p>
<p><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; printf(&#8220;Le factotiel de %d est %d&#8221;,n,fact);</span></p>
<p><span style="color: #0000ff;">}</span></p>


<h5 class="wp-block-heading"><strong>Exercice 3</strong> sur les Instructions itératives  </h5>



<p>Ecrire un algorithme qui lit 20 valeurs réelles et qui
détermine la moyenne des valeurs strictement positives et la moyenne des
valeurs strictement négatives.</p>



<h5 class="wp-block-heading"><strong>Exercice 4</strong> sur les Instructions itératives  </h5>



<p>Ecrire un algorithme qui permet d’afficher les n premiers
entiers impairs dans l’ordre décroissant, n étant un entier positif saisi au
clavier.</p>



<h5 class="wp-block-heading"><strong>Exercice 5</strong> sur les Instructions itératives  </h5>



<p>Ecrire un algorithme qui permet de lire pour 35 étudiants
leurs notes en programmation, électronique et en anglais et d’afficher pour
chaque étudiant sa moyenne et la moyenne de la classe pour chaque matière.</p>



<h5 class="wp-block-heading"><strong>Exercice 6</strong> sur les Instructions itératives  </h5>



<p>Ecrire un algorithme qui saisit un nombre et qui détermine
combien de fois il est divisible par deux.</p>



<p>Exemples </p>



<ul class="wp-block-list"><li>11 est divisible 0 fois par 2</li><li>8 est divisible 3 fois par 2</li><li>4 est divisible 2 fois par 2</li></ul>



<h5 class="wp-block-heading"><strong>Exercice 7</strong> sur les Instructions itératives  </h5>



<p>Ecrire un algorithme qui calcule le produit de deux entiers
positifs sans utiliser l’opérateur de multiplication.</p>



<p>Ecrire un algorithme qui calcule le quotient de deux entiers
positifs sans utiliser l’opérateur de division.</p>



<h5 class="wp-block-heading"><strong>Exercice 8</strong> sur les Instructions itératives  </h5>



<p>Ecrire un algorithme qui lit un entier positif et affiche si
c’est un nombre premier ou non.</p>



<h5 class="wp-block-heading"><strong>Exercice 9</strong> sur les Instructions itératives  </h5>



<p>Ecrire l’algorithme d’Euclide qui permet de calculer le PGCD
de deux nombres entiers x et y. Cet algorithme consiste à effectuer la division
entière de x par y (x supposé &gt; à y) si cette division possède un reste non
nul on affecte à x la valeur de y et à y la valeur de ce reste non nul.</p>



<p>On répète ce processus tant que le reste n’est pas nul.
Lorsque le reste est nul, le PGCD des deux nombres initiaux est le dernier
nombre utilisé.</p>



<h5 class="wp-block-heading"><strong>Exercice 10</strong> sur les Instructions itératives  </h5>



<p>Ecrire un algorithme qui affiche la liste des nombres
parfaits compris entre 1 et n (n étant un nombre positif saisi au clavier). Un
nombre est dit parfait s’il est égal à la somme de ses diviseurs. Exemple :
6=3+2+1</p>



<h5 class="wp-block-heading"><strong>Exercice 11</strong> sur les Instructions itératives  </h5>



<p>Ecrire un algorithme qui affiche la liste des nombres
d’Armstrong compris entre 1 et n (n étant un nombre positif saisi au clavier).
Un nombre d’Armstrong est égal à la somme des cubes de ses chiffres. </p>



<h5 class="wp-block-heading"><strong>Exercice 12</strong> sur les Instructions_itératives  </h5>



<p>Ecrire un algorithme qui permet de saisir une suite de
chiffres se terminant par 0, et qui calcule et affiche le nombre constitué des
chiffres lus à l’envers.</p>



<p>Exemple :</p>



<p>Si la suite est constituée des chiffres : 5,3,8,2,0</p>



<p>Alors le programme devra afficher le nombre 2835 </p>



<hr class="wp-block-separator has-text-color has-background has-vivid-cyan-blue-background-color has-vivid-cyan-blue-color is-style-wide"/>



<h4 class="has-vivid-cyan-blue-color has-text-color wp-block-heading">Voir aussi :</h4>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-f-2-school"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="hpFqlMdCo9"><a href="https://f2school.com/exercices-corriges-langage-c-instructions-simples/">Exercices corrigés langage c &#8211; Instructions Simples</a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="« Exercices corrigés langage c &#8211; Instructions Simples » &#8212; F2School" src="https://f2school.com/exercices-corriges-langage-c-instructions-simples/embed/#?secret=hpFqlMdCo9" data-secret="hpFqlMdCo9" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-f-2-school"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="BxEZGSU9II"><a href="https://f2school.com/exercices-corriges-sur-les-pointeurs-et-fonctions-langage-c/">Exercices corrigés sur les pointeurs et fonctions – Langage C</a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="« Exercices corrigés sur les pointeurs et fonctions – Langage C » &#8212; F2School" src="https://f2school.com/exercices-corriges-sur-les-pointeurs-et-fonctions-langage-c/embed/#?secret=BxEZGSU9II" data-secret="BxEZGSU9II" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"></div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"></div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"></div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"></div>
</div>



<hr class="wp-block-separator has-text-color has-background has-vivid-cyan-blue-background-color has-vivid-cyan-blue-color is-style-wide"/>



<h5 class="has-text-align-center wp-block-heading">Partagez au maximum pour que tout le monde puisse en profiter</h5>



<hr class="wp-block-separator has-text-color has-background has-vivid-cyan-blue-background-color has-vivid-cyan-blue-color is-style-wide"/><p>The post <a href="https://f2school.com/les-instructions-iteratives-exercices-corriges-langage-c/">Les Instructions itératives Exercices corrigés – Langage C</a> first appeared on <a href="https://f2school.com">F2School</a>.</p><p>L’article <a href="https://f2school.com/les-instructions-iteratives-exercices-corriges-langage-c/">Les Instructions itératives Exercices corrigés &#8211; Langage C</a> est apparu en premier sur <a href="https://f2school.com">F2School</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://f2school.com/les-instructions-iteratives-exercices-corriges-langage-c/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
