A<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.cppe.ru/index.php?action=history&amp;feed=atom&amp;title=C_Tutorial%2FStatement%2FDo_While</id>
		<title>C Tutorial/Statement/Do While - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.cppe.ru/index.php?action=history&amp;feed=atom&amp;title=C_Tutorial%2FStatement%2FDo_While"/>
		<link rel="alternate" type="text/html" href="http://www.cppe.ru/index.php?title=C_Tutorial/Statement/Do_While&amp;action=history"/>
		<updated>2026-04-17T22:31:47Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.cppe.ru/index.php?title=C_Tutorial/Statement/Do_While&amp;diff=3804&amp;oldid=prev</id>
		<title> в 14:21, 25 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.cppe.ru/index.php?title=C_Tutorial/Statement/Do_While&amp;diff=3804&amp;oldid=prev"/>
				<updated>2010-05-25T14:21:19Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 14:21, 25 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.cppe.ru/index.php?title=C_Tutorial/Statement/Do_While&amp;diff=3805&amp;oldid=prev</id>
		<title>Admin: 1 версия:&amp;#32;Импорт контента...</title>
		<link rel="alternate" type="text/html" href="http://www.cppe.ru/index.php?title=C_Tutorial/Statement/Do_While&amp;diff=3805&amp;oldid=prev"/>
				<updated>2010-05-25T10:32:39Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия: Импорт контента...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Nest for loop inside do while loop==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int start = 10;&lt;br /&gt;
    long delay = 1000;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
        printf(&amp;quot; %d\n&amp;quot;,start);&lt;br /&gt;
        start--;&lt;br /&gt;
        for(delay=0;delay&amp;lt;100000;delay++);   /* delay loop */&lt;br /&gt;
    }&lt;br /&gt;
    while(start&amp;gt;0);&lt;br /&gt;
 &lt;br /&gt;
    printf(&amp;quot;Zero!\nBlast off!\n&amp;quot;);&lt;br /&gt;
    return(0);&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;10&lt;br /&gt;
       9&lt;br /&gt;
       8&lt;br /&gt;
       7&lt;br /&gt;
       6&lt;br /&gt;
       5&lt;br /&gt;
       4&lt;br /&gt;
       3&lt;br /&gt;
       2&lt;br /&gt;
       1&lt;br /&gt;
      Zero!&lt;br /&gt;
      Blast off!&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Read number in a range==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main(){&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;Please enter the number to start\n&amp;quot;);&lt;br /&gt;
    printf(&amp;quot;the countdown (1 to 100):&amp;quot;);&lt;br /&gt;
    int start;&lt;br /&gt;
    scanf(&amp;quot;%d&amp;quot;,&amp;amp;start);&lt;br /&gt;
    do {&lt;br /&gt;
      printf(&amp;quot;%d&amp;quot;,start);&lt;br /&gt;
    }while(start&amp;lt;1 || start&amp;gt;100);&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Please enter the number to start&lt;br /&gt;
      the countdown (1 to 100):12&lt;br /&gt;
      12&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reversing the digits: do while loop==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
  int number = 123;&lt;br /&gt;
  int rightMostNumber = 0;&lt;br /&gt;
  int temp = 0;&lt;br /&gt;
  temp = number;&lt;br /&gt;
  do&lt;br /&gt;
  {&lt;br /&gt;
    rightMostNumber = 10*rightMostNumber + temp % 10;&lt;br /&gt;
    temp = temp/10;&lt;br /&gt;
  } while (temp);&lt;br /&gt;
  printf (&amp;quot;\nThe number %d reversed is  %d\n&amp;quot;, number, rightMostNumber );&lt;br /&gt;
  return 0;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;The number 123 reversed is  321&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The do...while loop==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;The do...while loop checks the conditional expression only after the repetition part is executed.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;The do...while loop is used when you want to execute the loop body at least once.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The general form of the do...while loop is&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;do {&lt;br /&gt;
       repetition part;&lt;br /&gt;
    } while (expr);&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>