<?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>electrofriends.com &#187; C</title>
	<atom:link href="http://electrofriends.com/category/source-codes/software-programs/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://electrofriends.com</link>
	<description>...bringing innovative minds together</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:43:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.6</generator>
		<item>
		<title>Program to calculate a simple interest</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-calculate-simple-interest/</link>
		<comments>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-calculate-simple-interest/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 10:14:53 +0000</pubDate>
		<dc:creator>chitra</dc:creator>
				<category><![CDATA[Simple programs]]></category>

		<guid isPermaLink="false">http://electrofriends.com/?p=2264</guid>
		<description><![CDATA[Here is the program to calculate a simple interest]]></description>
			<content:encoded><![CDATA[<p>Here is the program to calculate a simple interest</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &quot;stdio.h&quot;</span>
<span style="color: #339933;">#include &quot;conio.h&quot;</span>
&nbsp;
<span style="color: #993333;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">float</span> principal<span style="color: #339933;">,</span>rate<span style="color: #339933;">,</span>time<span style="color: #339933;">;</span>
  <span style="color: #993333;">float</span> simpleInterest<span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter the principal amount &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  scanf<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%f&quot;</span><span style="color: #339933;">,&amp;</span>principal<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter the rate of interest &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  scanf<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%f&quot;</span><span style="color: #339933;">,&amp;</span>rate<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter the time duration &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  scanf<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%f&quot;</span><span style="color: #339933;">,&amp;</span>time<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  simpleInterest<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span>principal<span style="color: #339933;">*</span>rate<span style="color: #339933;">*</span>time<span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #0000dd;">100</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The simple interest is %f&quot;</span><span style="color: #339933;">,</span>simpleInterest<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Output:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">Enter the principal amount <span style="color: #0000dd;">50000</span>
Enter the rate of interest <span style="color: #0000dd;">5</span>
Enter the time duration <span style="color: #0000dd;">2</span>
&nbsp;
The simple interest is <span style="color: #0000dd;">5000</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-calculate-simple-interest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Program to calculates the area of a rectangle</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-calculates-area-rectangle/</link>
		<comments>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-calculates-area-rectangle/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 08:59:20 +0000</pubDate>
		<dc:creator>chitra</dc:creator>
				<category><![CDATA[Simple programs]]></category>

		<guid isPermaLink="false">http://electrofriends.com/?p=2262</guid>
		<description><![CDATA[Here is the program to calculates the area of a rectangle,
]]></description>
			<content:encoded><![CDATA[<p>Here is the program to calculates the area of a rectangle,</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &quot;stdio.h&quot;</span>
<span style="color: #339933;">#include &quot;conio.h&quot;</span>
&nbsp;
<span style="color: #993333;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">int</span> w<span style="color: #339933;">,</span>h<span style="color: #339933;">;</span>
  <span style="color: #993333;">int</span> area<span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter the width of the rectangle &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  scanf<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%d&quot;</span><span style="color: #339933;">,&amp;</span>w<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter the height of the rectangle &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  scanf<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%d&quot;</span><span style="color: #339933;">,&amp;</span>h<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  area<span style="color: #339933;">=</span>w<span style="color: #339933;">*</span>h<span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The area of a rectangle is %d&quot;</span><span style="color: #339933;">,</span>area<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Output:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">Enter the width of the rectangle <span style="color: #0000dd;">8</span>
&nbsp;
Enter the height of the rectangle <span style="color: #0000dd;">6</span>
&nbsp;
The area of a rectangle is <span style="color: #0000dd;">48</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-calculates-area-rectangle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Program to accept five numbers and display the sum of even numbers and product of odd numbers</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-accept-numbers-display-sum-numbers-product-odd-numbers/</link>
		<comments>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-accept-numbers-display-sum-numbers-product-odd-numbers/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 10:40:47 +0000</pubDate>
		<dc:creator>chitra</dc:creator>
				<category><![CDATA[Simple programs]]></category>

		<guid isPermaLink="false">http://electrofriends.com/?p=2259</guid>
		<description><![CDATA[Here is the program which accepts five numbers and display the sum of even numbers and product of odd numbers.]]></description>
			<content:encoded><![CDATA[<p>Here is the program which accepts five numbers and display the sum of even numbers and product of odd numbers.</p>
<pre lang="c" escaped="true" line="c">
#include "conio.h"
#include "stdio.h"

void main()
{
  int n,sum=0,mul=1,i;
  printf("\nEnter numbers :\n");
  for(i=0;i&lt;5;i++)
  {
  scanf(&quot;%d&quot;,&amp;n);
  if(n%2==0)
    sum=sum+n;
  else
    mul=mul*n;
  }
  printf(&quot;\nThe sum of even numbers is : %d&quot;,sum);
  printf(&quot;\nThe multiplication of odd numbers is : %d&quot;,mul);
getch();
}
</pre>
<p><strong>Output:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">Enter numbers <span style="color: #339933;">:</span>
<span style="color: #0000dd;">4</span>
<span style="color: #0000dd;">7</span>
<span style="color: #0000dd;">18</span>
<span style="color: #0000dd;">23</span>
<span style="color: #0000dd;">19</span>
&nbsp;
The sum of even numbers is <span style="color: #339933;">:</span> <span style="color: #0000dd;">22</span>
The multiplication of odd numbers is <span style="color: #339933;">:</span> <span style="color: #0000dd;">3059</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-accept-numbers-display-sum-numbers-product-odd-numbers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Program to check the occurence of digit in a given number</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-check-occurence-digit-number/</link>
		<comments>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-check-occurence-digit-number/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 10:34:46 +0000</pubDate>
		<dc:creator>chitra</dc:creator>
				<category><![CDATA[Simple programs]]></category>

		<guid isPermaLink="false">http://electrofriends.com/?p=2257</guid>
		<description><![CDATA[This program checks the occurrence of digit 5 in a given number.]]></description>
			<content:encoded><![CDATA[<p>This program checks the occurrence of digit 5 in a given number.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &quot;conio.h&quot;</span>
<span style="color: #339933;">#include &quot;stdio.h&quot;</span>
&nbsp;
<span style="color: #993333;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">int</span> num<span style="color: #339933;">,</span>i<span style="color: #339933;">,</span>n<span style="color: #339933;">,</span>k<span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter a number : &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  scanf<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%d&quot;</span><span style="color: #339933;">,&amp;</span>num<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  n<span style="color: #339933;">=</span>num<span style="color: #339933;">;</span>
  i<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>n<span style="color: #339933;">!=</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  k<span style="color: #339933;">=</span>n<span style="color: #339933;">%</span><span style="color:#800080;">10</span><span style="color: #339933;">;</span>
  n<span style="color: #339933;">=</span>n<span style="color: #339933;">/</span><span style="color: #0000dd;">10</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>k<span style="color: #339933;">==</span><span style="color: #0000dd;">5</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  i<span style="color: #339933;">++;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The occurrence of 5 is %d times&quot;</span><span style="color: #339933;">,</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Output:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">Enter a number <span style="color: #339933;">:</span> <span style="color: #0000dd;">21353</span>
The occurrence of <span style="color: #0000dd;">5</span> is <span style="color: #0000dd;">1</span> times</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-check-occurence-digit-number/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Program to find out the sum of first n numbers</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-find-sum-numbers/</link>
		<comments>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-find-sum-numbers/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 10:25:54 +0000</pubDate>
		<dc:creator>chitra</dc:creator>
				<category><![CDATA[Simple programs]]></category>

		<guid isPermaLink="false">http://electrofriends.com/?p=2255</guid>
		<description><![CDATA[Here is the program to find out the sum of first n numbers.]]></description>
			<content:encoded><![CDATA[<p>Here is the program to find out the sum of first n numbers.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &quot;conio.h&quot;</span>
<span style="color: #339933;">#include &quot;stdio.h&quot;</span>
&nbsp;
<span style="color: #993333;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">int</span> i<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span>num<span style="color: #339933;">,</span>sum<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
clrscr<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter a number : &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  scanf<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%d&quot;</span><span style="color: #339933;">,&amp;</span>amp<span style="color: #339933;">;</span>num<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>num<span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  sum<span style="color: #339933;">=</span>sum<span style="color: #339933;">+</span>i<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;</span>\n The sum of numbers <span style="color: #339933;">=</span> <span style="color: #339933;">%</span>d<span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;,</span>sum<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Output:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">Enter a number <span style="color: #339933;">:</span> <span style="color: #0000dd;">15</span>
&nbsp;
 The sum of numbers <span style="color: #339933;">=</span> <span style="color: #0000dd;">105</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-find-sum-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Program to generate a table of a given input number</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-generate-table-input-number/</link>
		<comments>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-generate-table-input-number/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 09:47:36 +0000</pubDate>
		<dc:creator>chitra</dc:creator>
				<category><![CDATA[Simple programs]]></category>

		<guid isPermaLink="false">http://electrofriends.com/?p=2253</guid>
		<description><![CDATA[Here is the program which generates a table of a given input number.]]></description>
			<content:encoded><![CDATA[<p>Here is the program which generates a table of a given input number.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &quot;conio.h&quot;</span>
<span style="color: #339933;">#include &quot;stdio.h&quot;</span>
&nbsp;
<span style="color: #993333;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">int</span> num<span style="color: #339933;">,</span>result<span style="color: #339933;">,</span>i<span style="color: #339933;">=</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter a number to generate the table : &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  scanf<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%d&quot;</span><span style="color: #339933;">,&amp;</span>num<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The table of %d is given below&quot;</span><span style="color: #339933;">,</span>num<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">&lt;=</span><span style="color: #0000dd;">10</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  result<span style="color: #339933;">=</span>num<span style="color: #339933;">*</span>i<span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span> %d * %d = %d&quot;</span><span style="color: #339933;">,</span>num<span style="color: #339933;">,</span>i<span style="color: #339933;">,</span>result<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  i<span style="color: #339933;">++;</span>
  <span style="color: #009900;">&#125;</span>
getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Output</strong></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">Enter a number to generate the table <span style="color: #339933;">:</span> <span style="color: #0000dd;">3</span>
The table of <span style="color: #0000dd;">3</span> is given below
	<span style="color: #0000dd;">3</span> <span style="color: #339933;">*</span> <span style="color: #0000dd;">1</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">3</span>
	<span style="color: #0000dd;">3</span> <span style="color: #339933;">*</span> <span style="color: #0000dd;">2</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">6</span>
	<span style="color: #0000dd;">3</span> <span style="color: #339933;">*</span> <span style="color: #0000dd;">3</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">9</span>
	<span style="color: #0000dd;">3</span> <span style="color: #339933;">*</span> <span style="color: #0000dd;">4</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">12</span>
	<span style="color: #0000dd;">3</span> <span style="color: #339933;">*</span> <span style="color: #0000dd;">5</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">15</span>
	<span style="color: #0000dd;">3</span> <span style="color: #339933;">*</span> <span style="color: #0000dd;">6</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">18</span>
	<span style="color: #0000dd;">3</span> <span style="color: #339933;">*</span> <span style="color: #0000dd;">7</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">21</span>
	<span style="color: #0000dd;">3</span> <span style="color: #339933;">*</span> <span style="color: #0000dd;">8</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">24</span>
	<span style="color: #0000dd;">3</span> <span style="color: #339933;">*</span> <span style="color: #0000dd;">9</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">27</span>
	<span style="color: #0000dd;">3</span> <span style="color: #339933;">*</span> <span style="color: #0000dd;">10</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">30</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-generate-table-input-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Program to check a triangle is a equilateral, isosceles or scalene</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-check-triangle-equilateral-isosceles-scalene/</link>
		<comments>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-check-triangle-equilateral-isosceles-scalene/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 06:29:00 +0000</pubDate>
		<dc:creator>chitra</dc:creator>
				<category><![CDATA[Simple programs]]></category>

		<guid isPermaLink="false">http://electrofriends.com/?p=2249</guid>
		<description><![CDATA[Here is the program to check a triangle is equilateral, isosceles or scalene.]]></description>
			<content:encoded><![CDATA[<p>Here is the program to check a triangle is equilateral, isosceles or scalene.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &quot;conio.h&quot;</span>
<span style="color: #339933;">#include &quot;stdio.h&quot;</span>
&nbsp;
<span style="color: #993333;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">int</span> x<span style="color: #339933;">,</span>y<span style="color: #339933;">,</span>z<span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter the sides of a triangle&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  scanf<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%d %d %d&quot;</span><span style="color: #339933;">,&amp;</span>x<span style="color: #339933;">,&amp;</span>y<span style="color: #339933;">,&amp;</span>z<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">==</span>y<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>y<span style="color: #339933;">==</span>z<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The triangle is equilateral&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> 
  <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">==</span>z<span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>y<span style="color: #339933;">==</span>z<span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>x<span style="color: #339933;">==</span>y<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The triangle is isoseles&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">else</span>
  <span style="color: #009900;">&#123;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The triangle is scalene&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Output:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">Enter the sides of a triangle
<span style="color: #0000dd;">12</span>
<span style="color: #0000dd;">10</span>
<span style="color: #0000dd;">12</span>
&nbsp;
The triangle is isoseles</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-check-triangle-equilateral-isosceles-scalene/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Program to accept a character and check whether entered character is vowel or not using switch statement</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-accept-character-check-entered-charecter-vowel/</link>
		<comments>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-accept-character-check-entered-charecter-vowel/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 13:32:04 +0000</pubDate>
		<dc:creator>chitra</dc:creator>
				<category><![CDATA[Simple programs]]></category>

		<guid isPermaLink="false">http://electrofriends.com/?p=2231</guid>
		<description><![CDATA[This program accepts a character and check whether entered character is vowel or not using switch statement.]]></description>
			<content:encoded><![CDATA[<p>This program accepts a character and check whether entered character is vowel or not using switch statement.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &quot;conio.h&quot;</span>
<span style="color: #339933;">#include &quot;stdio.h&quot;</span>
&nbsp;
<span style="color: #993333;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">char</span> ch<span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter a charecter to check &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  scanf<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%c&quot;</span><span style="color: #339933;">,&amp;</span>ch<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">switch</span><span style="color: #009900;">&#40;</span>ch<span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'a'</span><span style="color: #339933;">:</span>
	 <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The entered charecter %c is a vowel&quot;</span><span style="color: #339933;">,</span>ch<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'e'</span><span style="color: #339933;">:</span>
	 <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The entered charecter %c is a vowel&quot;</span><span style="color: #339933;">,</span>ch<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'i'</span><span style="color: #339933;">:</span>
	 <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The entered charecter %c is a vowel&quot;</span><span style="color: #339933;">,</span>ch<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'o'</span><span style="color: #339933;">:</span>
	 <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The entered charecter %c is a vowel&quot;</span><span style="color: #339933;">,</span>ch<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'u'</span><span style="color: #339933;">:</span>
	 <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The entered charecter %c is a vowel&quot;</span><span style="color: #339933;">,</span>ch<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>
	 <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The entered is a consonant&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Output:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">Enter a charecter to check i
The entered charecter i is a vowel</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-accept-character-check-entered-charecter-vowel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Program to find out whether a entered number is divisible by 3 and 5 or not</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-find-entered-number-divisible-3-5/</link>
		<comments>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-find-entered-number-divisible-3-5/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 13:08:54 +0000</pubDate>
		<dc:creator>chitra</dc:creator>
				<category><![CDATA[Simple programs]]></category>

		<guid isPermaLink="false">http://electrofriends.com/?p=2229</guid>
		<description><![CDATA[This program find out whether a entered number is divisible by 3 and 5 or not.]]></description>
			<content:encoded><![CDATA[<p>This program find out whether a entered number is divisible by 3 and 5 or not.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &quot;conio.h&quot;</span>
<span style="color: #339933;">#include &quot;stdio.h&quot;</span>
&nbsp;
<span style="color: #993333;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">int</span> num<span style="color: #339933;">;</span>
  <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter a number &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  scanf<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%d&quot;</span><span style="color: #339933;">,&amp;</span>num<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>num<span style="color: #339933;">%</span><span style="color:#800080;">3</span><span style="color: #339933;">==</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>num<span style="color: #339933;">%</span><span style="color:#800080;">5</span><span style="color: #339933;">==</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The number %d is divisible by 3 and 5&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The number %d is divisible by 3 but not by 5&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">else</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The number %d is niether divisible by 3 nor by 5&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Output:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">Enter a number <span style="color: #0000dd;">21</span>
&nbsp;
Number is divisible by <span style="color: #0000dd;">3</span> but not by <span style="color: #0000dd;">5</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://electrofriends.com/source-codes/software-programs/c/simple-programs/program-find-entered-number-divisible-3-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Program to accept a list of numbers and display it in reverse order using function concept</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/number-programs/program-accept-list-numbers-display-reverse-order-function-concept/</link>
		<comments>http://electrofriends.com/source-codes/software-programs/c/number-programs/program-accept-list-numbers-display-reverse-order-function-concept/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 12:34:58 +0000</pubDate>
		<dc:creator>chitra</dc:creator>
				<category><![CDATA[Number Programs]]></category>

		<guid isPermaLink="false">http://electrofriends.com/?p=2227</guid>
		<description><![CDATA[This program accepts a list of numbers and displays it in reverse order using function concept. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 #include &#34;stdio.h&#34; #include &#34;conio.h&#34; &#160; int a&#91;5&#93;,b&#91;5&#93;; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>This program accepts a list of numbers and displays it in reverse order using function concept.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &quot;stdio.h&quot;</span>
<span style="color: #339933;">#include &quot;conio.h&quot;</span>
&nbsp;
<span style="color: #993333;">int</span> a<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>b<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #993333;">void</span> accept<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #993333;">int</span> j<span style="color: #339933;">;</span>
   <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;Enter the list <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span>j<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>j<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>j<span style="color: #339933;">--,</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
   <span style="color: #009900;">&#123;</span>
     b<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span>a<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> display<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #993333;">int</span> j<span style="color: #339933;">;</span>
   <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;The list in reverse is <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span>j<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>j<span style="color: #339933;">&lt;</span><span style="color: #0000dd;">5</span><span style="color: #339933;">;</span>j<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
   <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%d &quot;</span><span style="color: #339933;">,</span>b<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   accept<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   reverse<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   display<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
getch<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Output:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">Enter the list
<span style="color: #0000dd;">5</span>
<span style="color: #0000dd;">4</span>
<span style="color: #0000dd;">3</span>
<span style="color: #0000dd;">2</span>
<span style="color: #0000dd;">1</span>
The list in reverse is
<span style="color: #0000dd;">1</span> <span style="color: #0000dd;">2</span> <span style="color: #0000dd;">3</span> <span style="color: #0000dd;">4</span> <span style="color: #0000dd;">5</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://electrofriends.com/source-codes/software-programs/c/number-programs/program-accept-list-numbers-display-reverse-order-function-concept/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

