<?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>while loop Archives -</title>
	<atom:link href="https://mitindia.in/tag/while-loop/feed/" rel="self" type="application/rss+xml" />
	<link>https://mitindia.in/tag/while-loop/</link>
	<description></description>
	<lastBuildDate>Sat, 26 Nov 2016 07:27:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://mitindia.in/wp-content/uploads/2023/03/cropped-android-chrome-512x512-1-32x32.png</url>
	<title>while loop Archives -</title>
	<link>https://mitindia.in/tag/while-loop/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Programming construct</title>
		<link>https://mitindia.in/programming-construct/</link>
					<comments>https://mitindia.in/programming-construct/#comments</comments>
		
		<dc:creator><![CDATA[SKB]]></dc:creator>
		<pubDate>Tue, 05 Jul 2016 06:53:28 +0000</pubDate>
				<category><![CDATA[C Programming]]></category>
		<category><![CDATA[do while loop]]></category>
		<category><![CDATA[for loop]]></category>
		<category><![CDATA[while loop]]></category>
		<guid isPermaLink="false">http://www.mitindia.in/?p=246</guid>

					<description><![CDATA[<p>An iteration or loop in a computer program is a set of statements that is executed repeatedly. C provides three iteration constructs:  While Do…while ForSyntax on while statement:- initialization; while(condition) { statement or body of the loop; increment/decrements; } Syntax on do..while statement:- initialization; do { statement or body of the loop; increment/decrements; }while(condition); Syntax [&#8230;]</p>
<p>The post <a href="https://mitindia.in/programming-construct/">Programming construct</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>An iteration or loop in a computer program is a set of statements that is executed repeatedly.</p>
<p><span style="color: #ff0000;">C provides three iteration constructs: </span></p>
<ul>
<li>While</li>
<li>Do…while</li>
<li>For<em>Syntax on while statement:-</em></li>
</ul>
<p>initialization;</p>
<p>while(condition)</p>
<p>{</p>
<p>statement or body of the loop;</p>
<p>increment/decrements;</p>
<p>}</p>
<p><em>Syntax on do..while statement:-</em></p>
<p>initialization;</p>
<p>do</p>
<p>{</p>
<p>statement or body of the loop;</p>
<p>increment/decrements;</p>
<p>}while(condition);</p>
<p><em>Syntax on for statement:-</em></p>
<p>for (initialization; condition; increment/decrements){</p>
<p>statement or body of the loop;</p>
<p>}<br />
The while loop is used to perform a set of actions as long as the given condition is true.</p>
<p>The condition for the while loop can be any expression, including a numeric constant value.</p>
<p>The do…while loop is also used to perform a set of actions as long as the given condition is true. But here, the condition is checked after the actions have been performed; hence, the loop executes at least once.</p>
<p><span style="color: #ff0000;">Break statement</span>:- Upon encountering a break statement, the compiler stops the loop execution immediately and the control proceeds to the statement (if any) after the loop.<br />
Any statement placed after the break statement is not executed for that iteration if the break statement is executed</p>
<p><span style="color: #ff0000;">Continue statement</span>:- continue is used to skip further statements within a loop and proceed to the next iteration of the loop.</p>
<p>Any statement written after continue is not executed for that iteration when the continue statement is encountered.</p>
<p>A loop enclosed within another loop is called a nested loop. When two loops are nested, the outer loop takes control of the number of complete repetitions of the inner.</p>
<div></div>
<p>C Program to print 1 to 10 numbers using while loop.</p>
<pre>#include&lt;stdio.h&gt;
main()
{
int i;
i=1;
while(i&lt;=10)
{
printf("%d\n", i);
i++;
}
getch();
}</pre>
<p>C Program to print 1 to 10 numbers using do..while loop.</p>
<pre>#include&lt;stdio.h&gt;
main()
{
int i;
i=1;
do
{
printf("%d\n", i);
i++;
}
while(i&lt;=10);
getch();
}</pre>
<p>C Program to print 1 to 10 numbers using for loop.</p>
<pre>#include&lt;stdio.h&gt;
main()
{
int i;
for(i=1; i&lt;=10; i++)
{
printf("%d\n", i);
}
getch();
}</pre>
<p><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fmitindia.in%2Fprogramming-construct%2F&amp;linkname=Programming%20construct" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmitindia.in%2Fprogramming-construct%2F&amp;linkname=Programming%20construct" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fmitindia.in%2Fprogramming-construct%2F&#038;title=Programming%20construct" data-a2a-url="https://mitindia.in/programming-construct/" data-a2a-title="Programming construct"><img src="https://static.addtoany.com/buttons/favicon.png" alt="Share"></a></p><p>The post <a href="https://mitindia.in/programming-construct/">Programming construct</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mitindia.in/programming-construct/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Javascript loop programs</title>
		<link>https://mitindia.in/javascript-loop-programs/</link>
		
		<dc:creator><![CDATA[SKB]]></dc:creator>
		<pubDate>Tue, 28 Jun 2016 06:46:52 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[do while loop]]></category>
		<category><![CDATA[for loop]]></category>
		<category><![CDATA[looping]]></category>
		<category><![CDATA[while loop]]></category>
		<guid isPermaLink="false">http://www.mitindia.in/?p=183</guid>

					<description><![CDATA[<p>1. Print 1-10 numbers using FOR loop program &#60;html&#62; &#60;head&#62; &#60;title&#62; Javascript looping program &#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;script language="javascript"&#62; var i document.write("&#60;h1&#62;"+"FOR Looping program" +"&#60;/h1&#62;") for(i=1; i&#60;=10; i++) { document.write(i+"&#60;br&#62;") } &#60;/script&#62; &#60;/body&#62; &#60;/html&#62; 2. WHILE Loop using Javascript &#60;html&#62; &#60;head&#62; &#60;title&#62; Javascript while loop program &#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;script language="javascript"&#62; var i=1 document.write("&#60;h1&#62;"+"WHILE Loop [&#8230;]</p>
<p>The post <a href="https://mitindia.in/javascript-loop-programs/">Javascript loop programs</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<div dir="ltr">
<div dir="ltr">
<h3><b>1. Print 1-10 numbers using FOR loop program</b></h3>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt; Javascript looping program &lt;/title&gt; 
&lt;/head&gt;
&lt;body&gt;
&lt;script language="javascript"&gt;
var i
document.write("&lt;h1&gt;"+"FOR Looping program" +"&lt;/h1&gt;")
for(i=1; i&lt;=10; i++)
{
document.write(i+"&lt;br&gt;")
}
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</div>
<div>
<h3>2. WHILE Loop using Javascript</h3>
</div>
<div>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt; Javascript while loop program &lt;/title&gt; 
&lt;/head&gt;
&lt;body&gt;
&lt;script language="javascript"&gt;
var i=1
document.write("&lt;h1&gt;"+"WHILE Loop program" +"&lt;/h1&gt;")
while(i&lt;=10)
{
document.write(i"+&lt;br&gt;")
i++
}
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</div>
</div>
<div>
<h3>3. DO WHILE Loop using Javascript</h3>
</div>
<div>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt; Javascript while loop program &lt;/title&gt; 
&lt;/head&gt;
&lt;body&gt;
&lt;script language="javascript"&gt;
var i=1
document.write("&lt;h1&gt;"+"DO WHILE Loop program" +"&lt;/h1&gt;")
do
{
document.write(i"+&lt;br&gt;")
i++
}
while(i&lt;=10);
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</div>
<div></div>
<div>
<h3>4. Largest of two numbers</h3>
</div>
<div>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt; Using Javascript &lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;script language="javascript"&gt;
var a,b
a=prompt("Enter a value:")
b=prompt("Enter b value:")
if(a&gt;b)
document.write("a is big")
else
document.write("b is big")
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</div>
<p><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fmitindia.in%2Fjavascript-loop-programs%2F&amp;linkname=Javascript%20loop%20programs" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmitindia.in%2Fjavascript-loop-programs%2F&amp;linkname=Javascript%20loop%20programs" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fmitindia.in%2Fjavascript-loop-programs%2F&#038;title=Javascript%20loop%20programs" data-a2a-url="https://mitindia.in/javascript-loop-programs/" data-a2a-title="Javascript loop programs"><img src="https://static.addtoany.com/buttons/favicon.png" alt="Share"></a></p><p>The post <a href="https://mitindia.in/javascript-loop-programs/">Javascript loop programs</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
