<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1401059883331742142</id><updated>2024-12-19T09:00:39.368+05:30</updated><category term="Java"/><category term="CPP"/><category term="Basic"/><category term="Array"/><category term="Iteration"/><category term="SQL"/><category term="Advanced"/><category term="Data Structures"/><category term="Loops"/><category term="Selection"/><category term="Flow Control"/><category term="For Loop"/><category term="Function"/><category term="Functions"/><category term="Object-Oriented-Programming"/><category term="for"/><category term="if"/><category term="Matrix"/><category term="While Loop"/><category term="Divide and Conquer"/><category term="Introduction"/><category term="Perl"/><category term="Sorting"/><category term="Stack"/><category term="Tutorials"/><category term="while"/><category term="Linux"/><category term="feature"/><category term="Adobe - Photoshop Design"/><category term="Generic Type"/><category term="RESTful"/><category term="Recursive"/><category term="Search"/><category term="Statement"/><category term="Statistical Machine Translation System"/><category term="Syntax"/><category term="Ubuntu 14.04"/><category term="University of Jaffna"/><category term="Web Services"/><category term="AngularJS"/><category term="Backtracking"/><category term="C#"/><category term="Class"/><category term="Cloud"/><category term="Data Structure"/><category term="Dynamic Programming"/><category term="Linear list"/><category term="Moses"/><category term="Network"/><category term="OpenShift"/><category term="Operator Overloading"/><category term="PHP"/><category term="Python"/><category term="Python3"/><category term="Queue"/><category term="Ubuntu"/><category term="Video"/><title type='text'>Blog </title><subtitle type='html'>This website consists of every thing about programming right from basics to highly advanced topics with Examples. The world of Java, PHP , C# , C++ , Perl , Python , CSS3 , HTML5 , MySql , Ruby Examples.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>128</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-2273552134186363630</id><published>2021-12-12T17:47:00.000+05:30</published><updated>2022-11-14T11:52:16.033+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Python3"/><title type='text'>Python For Loop Examples </title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg-uUgj8zGJ3Xsr2Uis2Wo4ssfjtfSS1QpnpHVu2HoD5OukKxXnmkyR9aNDiS_zhnSpuWIHtGn-AEIUSTRh2MlLmwJx-bpa2qIQprUSwUZU7ZZv7U1FpREwWYy8yIhFGiDHmRA09HX86F0cI_6C1WxC2V_y8kjdb_hND94NhgfWMkw--kp2zUbw3nus=s250&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg-uUgj8zGJ3Xsr2Uis2Wo4ssfjtfSS1QpnpHVu2HoD5OukKxXnmkyR9aNDiS_zhnSpuWIHtGn-AEIUSTRh2MlLmwJx-bpa2qIQprUSwUZU7ZZv7U1FpREwWYy8yIhFGiDHmRA09HX86F0cI_6C1WxC2V_y8kjdb_hND94NhgfWMkw--kp2zUbw3nus&quot; width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The value we put in the range function determines how many times we will loop. The way range works is it produces a list of numbers from zero to the value minus one. For instance, range(5) produces five values: 0, 1, 2, 3, and 4.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Here are a few more examples:&amp;nbsp;&lt;/h4&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/h4&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;range(10): &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,1,2,3,4,5,6,7,8,9&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;range(1,10):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,2,3,4,5,6,7,8,9&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;range(3,7):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3,4,5,6&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;range(2,15,3):&amp;nbsp;&amp;nbsp; 2,5,8,11,14&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;range(9,2,-1):&amp;nbsp;&amp;nbsp;&amp;nbsp; 9,8,7,6,5,4,3&lt;/b&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt; &lt;script src=&quot;https://gist.github.com/achchuthany/f03056df6d5e8255487403aa19a24644.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/2273552134186363630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2021/12/python-for-loop-examples.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/2273552134186363630'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/2273552134186363630'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2021/12/python-for-loop-examples.html' title='Python For Loop Examples '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEg-uUgj8zGJ3Xsr2Uis2Wo4ssfjtfSS1QpnpHVu2HoD5OukKxXnmkyR9aNDiS_zhnSpuWIHtGn-AEIUSTRh2MlLmwJx-bpa2qIQprUSwUZU7ZZv7U1FpREwWYy8yIhFGiDHmRA09HX86F0cI_6C1WxC2V_y8kjdb_hND94NhgfWMkw--kp2zUbw3nus=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-8217989632271016186</id><published>2020-05-29T10:09:00.007+05:30</published><updated>2023-05-12T20:42:01.683+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="For Loop"/><category scheme="http://www.blogger.com/atom/ns#" term="Iteration"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Loops"/><category scheme="http://www.blogger.com/atom/ns#" term="Selection"/><title type='text'>Java Program to Display Factors of a Number</title><content type='html'>&lt;div&gt;&lt;div class=&quot;separator&quot; hidden=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span id=&quot;docs-internal-guid-b312def2-7fff-c3d1-b1c2-23599cb22ef4&quot;&gt;&lt;br /&gt;&lt;br /&gt;In mathematics, a factor of a number is a number that divides evenly into that number. For example, 2 and 4 are factors of 8 because 8 / 2 = 4 and 8 / 4 = 2. The factors of a number can be found using a variety of methods, including the following:&lt;br /&gt;&lt;br /&gt;The Division Method: The division method is the most straightforward way to find the factors of a number. To use the division method, simply divide the number by each of the natural numbers from 1 to the number itself. Any number that divides evenly into the original number is a factor. For example, to find the factors of 8, we would divide 8 by each of the natural numbers from 1 to 8. The results of these divisions are as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8 / 1 = 8&lt;br /&gt;&lt;br /&gt;8 / 2 = 4&lt;br /&gt;&lt;br /&gt;8 / 3 = 2 2/3&lt;br /&gt;&lt;br /&gt;8 / 4 = 2&lt;br /&gt;&lt;br /&gt;8 / 5 = 1 3/5&lt;br /&gt;&lt;br /&gt;8 / 6 = 1 2/3&lt;br /&gt;&lt;br /&gt;8 / 7 = 1 1/7&lt;br /&gt;&lt;br /&gt;8 / 8 = 1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The numbers 1, 2, 4, and 8 are all factors of 8.&lt;br /&gt;&lt;br /&gt;The Factor Tree Method: The factor tree method is a visual way to find the factors of a number. To use the factor tree method, first draw a tree with the original number at the top. Then, divide the original number by its largest prime factor. This will give you two new numbers. Draw these numbers as branches of the tree, and repeat the process with each new number. Continue this process until you have reached numbers that are prime. The prime numbers at the bottom of the tree are the factors of the original number. For example, to find the factors of 12, we would draw a factor tree as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12&lt;br /&gt;&lt;br /&gt;/ \&lt;br /&gt;&lt;br /&gt;6 2&lt;br /&gt;&lt;br /&gt;/ \ /&lt;br /&gt;&lt;br /&gt;3 2 1&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 18pt; margin-right: 18pt; margin-top: 18pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;The prime factors of 12 are 2 and 3. Therefore, the factors of 12 are 1, 2, 3, 4, 6, and 12.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;In this program, you&#39;ll learn to display all factors of a given number using for loop in Java.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Example: Display Factors of a Number&lt;/h4&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/d17a974db45e01091d6d8f51ab101ae0.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;When you run the program, the output will be:&lt;/h4&gt;&lt;div&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;&lt;blockquote&gt;Factors of 40 are : 1 2 4 5 8 10 20 40 &lt;/blockquote&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/8217989632271016186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/java-program-to-display-factors-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/8217989632271016186'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/8217989632271016186'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/java-program-to-display-factors-of.html' title='Java Program to Display Factors of a Number'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-5013367356349754892</id><published>2020-05-29T09:57:00.001+05:30</published><updated>2022-11-13T13:01:42.163+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Loops"/><category scheme="http://www.blogger.com/atom/ns#" term="Selection"/><category scheme="http://www.blogger.com/atom/ns#" term="While Loop"/><title type='text'>Java Program to Check Whether a Number is Palindrome or Not</title><content type='html'>&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot; hidden&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;In this program, you&#39;ll learn to check whether a number is palindrome or not in Java. This is done by using for and while loop.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Execution Steps&lt;/h4&gt;&lt;h4&gt;&lt;/h4&gt;&lt;/div&gt;&lt;table border=&quot;1&quot; bordercolor=&quot;#888&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; border-color: rgb(136, 136, 136); border-width: 1px; height: 39px; width: 457px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;min-width: 60px;&quot;&gt;&amp;nbsp;num&lt;span&gt;ber &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;min-width: 60px;&quot;&gt;&amp;nbsp;number!=0&lt;/td&gt;&lt;td style=&quot;min-width: 60px;&quot;&gt;&amp;nbsp;remainder&lt;/td&gt;&lt;td style=&quot;min-width: 60px;&quot;&gt;reversedNumber&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;min-width: 60px;&quot;&gt;&amp;nbsp;131&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;min-width: 60px;&quot;&gt;&amp;nbsp;true&lt;/td&gt;&lt;td style=&quot;min-width: 60px;&quot;&gt;&amp;nbsp;1&lt;/td&gt;&lt;td style=&quot;min-width: 60px;&quot;&gt;&amp;nbsp;0*10+1 = 1&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;13&lt;/td&gt;&lt;td&gt;&amp;nbsp;true&lt;/td&gt;&lt;td&gt;&amp;nbsp;3&lt;/td&gt;&lt;td&gt;&amp;nbsp;1*10+3 = 13&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;1&lt;/td&gt;&lt;td&gt;&amp;nbsp;true&lt;/td&gt;&lt;td&gt;&amp;nbsp;1&lt;/td&gt;&lt;td&gt;&amp;nbsp;13*10+1 = 131&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;0&lt;/td&gt;&lt;td&gt;&amp;nbsp;false&lt;/td&gt;&lt;td&gt;&amp;nbsp;-&lt;/td&gt;&lt;td&gt;&amp;nbsp;-&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h4&gt;Example:Check Whether a Number is Palindrome or Not&lt;/h4&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/faa0348518a2e3361c835e4b727e1101.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h4&gt;When you run the program, the output will be:&lt;/h4&gt;&lt;div&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;&lt;blockquote&gt;131 is a palindrome.&lt;/blockquote&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/5013367356349754892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/java-program-to-check-whether-number-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/5013367356349754892'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/5013367356349754892'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/java-program-to-check-whether-number-is.html' title='Java Program to Check Whether a Number is Palindrome or Not'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-8851222762926582588</id><published>2020-05-13T11:17:00.004+05:30</published><updated>2022-11-13T13:01:42.170+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="For Loop"/><category scheme="http://www.blogger.com/atom/ns#" term="Iteration"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Loops"/><category scheme="http://www.blogger.com/atom/ns#" term="While Loop"/><title type='text'>Java Program to  Calculate the Power of a Number</title><content type='html'>&lt;div&gt;&lt;div class=&quot;separator&quot; hidden=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;In this program, you&#39;ll learn to calculate the power of a number in Java. &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Calculate the Power of a Number using a For Loop &lt;/h4&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/01d2e64b55eda92ff49996ad83786001.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;When you run the program, the output will be:&lt;/h4&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;3 to the power of 3 is equal to 27


&lt;/pre&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h4&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Calculate the Power of a Number using a While Loop &lt;/h4&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/5889f21e14b3f5579293c9d456b83512.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;When you run the program, the output will be:&lt;/h4&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;2 to the power of 5 is equal to 32&lt;/pre&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/8851222762926582588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/calculate-power-of-number-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/8851222762926582588'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/8851222762926582588'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/calculate-power-of-number-in-java.html' title='Java Program to  Calculate the Power of a Number'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-7219041780314606209</id><published>2020-05-11T18:28:00.003+05:30</published><updated>2022-11-13T13:01:42.166+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="For Loop"/><category scheme="http://www.blogger.com/atom/ns#" term="Iteration"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Loops"/><category scheme="http://www.blogger.com/atom/ns#" term="While Loop"/><title type='text'>Java Program to Generate Multiplication Table</title><content type='html'>&lt;div class=&quot;separator&quot; hidden=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;In this program, you&#39;ll learn to generate multiplication table of a given number. This is done by using a for and a while loop in Java.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h4&gt;Generate Multiplication Table using For Loop&lt;/h4&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/7c3e0494b4970c884b8b4ebba350dc0c.js&quot;&gt;&lt;/script&gt;
&lt;br /&gt;
&lt;h4&gt;Generate Multiplication Table using While Loop&lt;/h4&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/78cc831d0d9f0dcab5e7145d0e99c7fd.js&quot;&gt;&lt;/script&gt;
&lt;br /&gt;
&lt;h4&gt;When you run the program, the output will be:&lt;/h4&gt;
&lt;div&gt;&lt;blockquote style=&quot;text-align: left;&quot;&gt;&lt;pre&gt;1 x 5 = 5&lt;/pre&gt;&lt;pre&gt;2 x 5 = 10&lt;/pre&gt;&lt;pre&gt;3 x 5 = 15&lt;/pre&gt;&lt;pre&gt;4 x 5 = 20&lt;/pre&gt;&lt;pre&gt;5 x 5 = 25&lt;/pre&gt;&lt;pre&gt;6 x 5 = 30&lt;/pre&gt;&lt;pre&gt;7 x 5 = 35&lt;/pre&gt;&lt;pre&gt;8 x 5 = 40&lt;/pre&gt;&lt;pre&gt;9 x 5 = 45&lt;/pre&gt;&lt;pre&gt;10 x 5 = 50&lt;/pre&gt;&lt;pre&gt;11 x 5 = 55&lt;/pre&gt;&lt;pre&gt;12 x 5 = 60&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/7219041780314606209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/generate-multiplication-table-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/7219041780314606209'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/7219041780314606209'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/generate-multiplication-table-in-java.html' title='Java Program to Generate Multiplication Table'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-3128466540317705517</id><published>2020-05-11T18:17:00.001+05:30</published><updated>2022-11-13T13:01:42.159+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="For Loop"/><category scheme="http://www.blogger.com/atom/ns#" term="Iteration"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Loops"/><category scheme="http://www.blogger.com/atom/ns#" term="While Loop"/><title type='text'>Java Program to  Display Fibonacci Series</title><content type='html'>&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot; hidden&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;In this program, you&#39;ll learn to display fibonacci series in Java using for and while loops. You&#39;ll learn to display the series up to a specific term or a number.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;
The Fibonacci Sequence is the series of numbers: &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ... &lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The next number is found by adding up the two numbers before it. &lt;br /&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;
    The 2 is found by adding the two numbers before it (1+1) &lt;/li&gt;&lt;li&gt;The 3 is found by adding the two numbers before it (1+2), &lt;/li&gt;&lt;li&gt;And the 5 is (2+3),
    and so on! &lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;
      
&lt;h4 style=&quot;text-align: left;&quot;&gt;Fibonacci Series Using For Loop&lt;/h4&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/74d89de3ad3224e31bd99ef6a9c665dc.js&quot;&gt;&lt;/script&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt; When you run the program, the output will be:&lt;/h4&gt;
      &lt;blockquote&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;First 10Terms Fibonacci Series : 0  1  1  2  3  5  8  13  21  34  &lt;/pre&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;Fibonacci Series Using While Loop&lt;/h4&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/d1fdf18e5520b139f8c58ce5cad962d1.js&quot;&gt;&lt;/script&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt; When you run the program, the output will be:&lt;/h4&gt;
      &lt;blockquote&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;First 10Terms Fibonacci Series : 0  1  1  2  3  5  8  13  21  34  &lt;/pre&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;Fibonacci Series upto a Given Number&lt;/h4&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/37457e6c0c23eff38719bae01cd39178.js&quot;&gt;&lt;/script&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt; When you run the program, the output will be:&lt;/h4&gt;
&lt;blockquote&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;Fibonacci Series up-to 50 : 0 1 1 2 3 5 8 13 21 34 &lt;/pre&gt;&lt;/blockquote&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/3128466540317705517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/display-fibonacci-series-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/3128466540317705517'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/3128466540317705517'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/display-fibonacci-series-in-java.html' title='Java Program to  Display Fibonacci Series'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0_lgKa5fBW0GA-g_BeqzghDX6eLCF0ml7QKq8DrodgHoKFlfDjlaSs_7Pv6J74y9EzjDcfkJ4RFmi4c25AHDw0Itu1STVNzcnKXAHyy83xcNs1BAFbfgBIYmOyL3G_z4i-NzImnsZhtfj/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-2201509682380475428</id><published>2020-05-10T22:00:00.001+05:30</published><updated>2022-11-13T13:01:42.157+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Selection"/><title type='text'>Java Program to Check Whether a Number is Positive or Negative</title><content type='html'>&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot; hidden&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5uwYC53ELDSXLen4YPo6NI3awwwJ5w0_WsJHPx0kM2i4PwLqJZttLMxq54Tg7qr4DsedpH8kJ-_rWCL0w-pAmMncrlfAcEZgL7HScwar3huEDb8-HLFCLt-jLsqnIsDtaFxA71er7EHo/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5uwYC53ELDSXLen4YPo6NI3awwwJ5w0_WsJHPx0kM2i4PwLqJZttLMxq54Tg7qr4DsedpH8kJ-_rWCL0w-pAmMncrlfAcEZgL7HScwar3huEDb8-HLFCLt-jLsqnIsDtaFxA71er7EHo/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;In this program, you&#39;ll learn to check if a number entered by an user is Positive or Negative. This will be done using if...else statement in Java.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h4&gt;Check Whether a Number is Even or Odd &lt;/h4&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/0ec43911972b63d5d33694d6ca2c169d.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;
  
  &lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h4&gt;When you run the program, the output will be:&lt;/h4&gt;&lt;/div&gt;
&lt;div&gt;&lt;blockquote&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;-25 is negative&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/2201509682380475428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/number-is-positive-or-negative-in-java .html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/2201509682380475428'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/2201509682380475428'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/number-is-positive-or-negative-in-java .html' title='Java Program to Check Whether a Number is Positive or Negative'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5uwYC53ELDSXLen4YPo6NI3awwwJ5w0_WsJHPx0kM2i4PwLqJZttLMxq54Tg7qr4DsedpH8kJ-_rWCL0w-pAmMncrlfAcEZgL7HScwar3huEDb8-HLFCLt-jLsqnIsDtaFxA71er7EHo/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-6435780442858859546</id><published>2020-05-07T18:16:00.001+05:30</published><updated>2022-11-13T13:01:42.165+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Functions"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Object-Oriented-Programming"/><title type='text'>Java Program to Find the Perimeter of a Circle, Rectangle and Triangle</title><content type='html'>&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot; hidden&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvhYzLOUIxa7ltrAaxDmhxBsKVUPRzdN_KfKtZ7SvjFAjz81M2JE1gncZfKKQteryM_VKy24TUef-zbTP3OKukGo42ogkPKq0_VYfrDT68XXdBlGaqn1peDLntQWAfVSkNChXskXrqdHSe/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvhYzLOUIxa7ltrAaxDmhxBsKVUPRzdN_KfKtZ7SvjFAjz81M2JE1gncZfKKQteryM_VKy24TUef-zbTP3OKukGo42ogkPKq0_VYfrDT68XXdBlGaqn1peDLntQWAfVSkNChXskXrqdHSe/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;In this program, you will learn to  Find the Perimeter of a Circle, Rectangle and Triangle  in Java. &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Formula:&lt;/h4&gt;&lt;/div&gt;&lt;blockquote&gt; Perimeter of circle = 2*pi*r&lt;br /&gt; Perimeter of rectangle = 2*(l+b)&lt;br /&gt; Perimeter of triangle = (s1+s2+s3) &lt;/blockquote&gt;&lt;br /&gt;Enter the radius of the circle, length and breadth of the rectangle and three sides of the triangle as inputs. Calculate the perimeter by using formula and get the desired output. &lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Find the Perimeter of a Circle, Rectangle and Triangle&lt;/h4&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/b9e563aec3dc312aa142fed4970458c8.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt; When you run the program, the output will be:&lt;/h4&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote style=&quot;text-align: left;&quot;&gt;&lt;pre&gt;Enter Radius of Circle : 7&lt;/pre&gt;&lt;pre&gt;Perimeter of Circle is 42.0&lt;/pre&gt;&lt;pre&gt;Enter Length of Rectangle : 12&lt;/pre&gt;&lt;pre&gt;Enter Breadth of Rectangle : 8&lt;/pre&gt;&lt;pre&gt;Perimeter of Rectangle is 40.0&lt;/pre&gt;&lt;pre&gt;Enter Length of First Side of Triangle : 25&lt;/pre&gt;&lt;pre&gt;Enter Length of Second Side of Triangle : 6&lt;/pre&gt;&lt;pre&gt;Enter Length of Third Side of Triangle : 8&lt;/pre&gt;&lt;pre&gt;Perimeter of Triangle is 39.0&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/6435780442858859546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/perimeter-of-a-circle-rectangle-and-triangle-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/6435780442858859546'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/6435780442858859546'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/perimeter-of-a-circle-rectangle-and-triangle-in-java.html' title='Java Program to Find the Perimeter of a Circle, Rectangle and Triangle'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvhYzLOUIxa7ltrAaxDmhxBsKVUPRzdN_KfKtZ7SvjFAjz81M2JE1gncZfKKQteryM_VKy24TUef-zbTP3OKukGo42ogkPKq0_VYfrDT68XXdBlGaqn1peDLntQWAfVSkNChXskXrqdHSe/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-5616167029365133479</id><published>2020-05-06T19:51:00.004+05:30</published><updated>2022-11-13T13:01:42.164+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Selection"/><title type='text'>Java Program to Find the Largest Among Three Numbers</title><content type='html'>&lt;div&gt;&lt;div class=&quot;separator&quot; hidden=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk2wHKwXUpv4jcXd-94hDwNfGC0LhycCLCAFXgZaejrpSoHIRkuO-ryn2yl6F4tUC_ZliUDEvuJdkb_zceHvUhLoMONltPtpIQo1aMxu_laR5bERD69jNw38AzqR2u398ditperVUKBfoS/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk2wHKwXUpv4jcXd-94hDwNfGC0LhycCLCAFXgZaejrpSoHIRkuO-ryn2yl6F4tUC_ZliUDEvuJdkb_zceHvUhLoMONltPtpIQo1aMxu_laR5bERD69jNw38AzqR2u398ditperVUKBfoS/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;In this program, you&#39;ll learn to find the largest among three numbers using if else and nested if..else statement in Java.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h4&gt;Example:Find the Largest Among Three Numbers&lt;/h4&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/41d38c45b84d6abe0fb0ba6c7cfeb97a.js&quot;&gt;&lt;/script&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h4&gt;&lt;br /&gt;&lt;/h4&gt;&lt;h4&gt;When you run the program, the output will be:&lt;/h4&gt;&lt;/div&gt;
&lt;blockquote&gt;&lt;div&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;5.75 is the largest number.&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/5616167029365133479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/find-largest-among-three-numbers-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/5616167029365133479'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/5616167029365133479'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/find-largest-among-three-numbers-in-java.html' title='Java Program to Find the Largest Among Three Numbers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk2wHKwXUpv4jcXd-94hDwNfGC0LhycCLCAFXgZaejrpSoHIRkuO-ryn2yl6F4tUC_ZliUDEvuJdkb_zceHvUhLoMONltPtpIQo1aMxu_laR5bERD69jNw38AzqR2u398ditperVUKBfoS/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-8898219086370087576</id><published>2020-05-06T19:35:00.003+05:30</published><updated>2022-11-13T13:01:42.170+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Selection"/><title type='text'>Java Program to Check Whether a Given Number is Even or Odd</title><content type='html'>&lt;div&gt;&lt;div class=&quot;separator&quot; hidden=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk2wHKwXUpv4jcXd-94hDwNfGC0LhycCLCAFXgZaejrpSoHIRkuO-ryn2yl6F4tUC_ZliUDEvuJdkb_zceHvUhLoMONltPtpIQo1aMxu_laR5bERD69jNw38AzqR2u398ditperVUKBfoS/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk2wHKwXUpv4jcXd-94hDwNfGC0LhycCLCAFXgZaejrpSoHIRkuO-ryn2yl6F4tUC_ZliUDEvuJdkb_zceHvUhLoMONltPtpIQo1aMxu_laR5bERD69jNw38AzqR2u398ditperVUKBfoS/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;In this program, you will learn to check whether the number entered by an user is even or odd. This will be done using if...else statement in Java.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Java Program to Check Whether a Given Number is Even or Odd&lt;/h4&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/982197a7fe4c4c60e6a4067a04f7af82.js&quot;&gt;&lt;/script&gt;
&lt;/div&gt;&lt;div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;
When you run the program, the output will be:&lt;/h4&gt;&lt;blockquote&gt;&lt;div&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;Enter a number :125&lt;br /&gt;125 is odd&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/8898219086370087576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/check-whether-a-given-number-is-even-or-odd-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/8898219086370087576'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/8898219086370087576'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/check-whether-a-given-number-is-even-or-odd-in-java.html' title='Java Program to Check Whether a Given Number is Even or Odd'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk2wHKwXUpv4jcXd-94hDwNfGC0LhycCLCAFXgZaejrpSoHIRkuO-ryn2yl6F4tUC_ZliUDEvuJdkb_zceHvUhLoMONltPtpIQo1aMxu_laR5bERD69jNw38AzqR2u398ditperVUKBfoS/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-6291489748603494238</id><published>2020-05-05T12:30:00.001+05:30</published><updated>2022-11-13T13:01:42.165+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Advanced"/><category scheme="http://www.blogger.com/atom/ns#" term="Iteration"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Selection"/><title type='text'>Java Program to Find the Data of Birth of Given (New/Old) National Identity Card(NIC) Number </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; hidden=&quot;&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; height=&quot;136&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3qfGRP_09hVPFH4DgNAcRv9hxRS3he4XIINkcMqeZHO89KXAU1g7dDxKxYt1lB-GaLvG2Ewn1PeHM02j_mFL3rrkhlnrl0JIGr2987pbrN_xfwlNF9MwZ3N9ubI1rwAi3xFeniIyUi9Zn/s200/%25231.png&quot; width=&quot;200&quot; /&gt;&lt;/div&gt;
In this program, you&#39;ll learn to find the Date of Birth of given National Identity Card(NIC) Number of Sri Lanka.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;h4&gt;The Logic Behind The National Identity Card(NIC) Number of Sri Lanka.&lt;/h4&gt;
Sri Lanka now has Old NIC No Format as well as a New NIC Format. Conversion of Old NIC number to New NIC number (Reference Wikipedia) &lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;table class=&quot;wikitable&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;th style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/th&gt; &lt;th style=&quot;text-align: center;&quot;&gt;Birth &lt;br /&gt;
by year &lt;/th&gt; &lt;th style=&quot;text-align: center;&quot;&gt;Birth day &lt;br /&gt;
of the year &lt;/th&gt; &lt;th style=&quot;text-align: center;&quot;&gt;Serial &lt;br /&gt;
number &lt;/th&gt; &lt;th style=&quot;text-align: center;&quot;&gt;Check &lt;br /&gt;
digit &lt;/th&gt; &lt;th style=&quot;text-align: center;&quot;&gt;Special &lt;br /&gt;
letter &lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;th style=&quot;text-align: center;&quot;&gt;Old NIC number &lt;/th&gt; &lt;td style=&quot;text-align: center;&quot;&gt;64 &lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;104 &lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;275 &lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;7 &lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;V &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;th style=&quot;text-align: center;&quot;&gt;New NIC number &lt;/th&gt; &lt;td style=&quot;text-align: center;&quot;&gt;1964 &lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;104 &lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;0275 &lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;7 &lt;/td&gt; &lt;td style=&quot;text-align: center;&quot;&gt;- &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;, &amp;quot;courier&amp;quot;, monospace; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
The following numbering system is followed in OLD Format: 641042757V&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;OLD NIC has a unique 9 digit number, in the format 000000000A (where 0 is a digit and A is a letter) Digits 1 and 2: The year of birth &lt;/li&gt;
&lt;li&gt;Digits 3-5: The number of the day in the year on which the person&#39;s birth date falls. &lt;/li&gt;
&lt;li&gt;A male would be assigned the number 1-366 and a female the number 501-866. This is a way of confirming if the person&#39;s listed birth date is accurate. A male&#39;s birth date would be represented by the exact number of days, a female&#39;s birth date would be represented by the exact number of days + 500. &lt;/li&gt;
&lt;li&gt; Example: The first five digits of the NIC for a male born on 1 January 1997 would be 97001; however, a female born on that same date would be 97501. &lt;/li&gt;
&lt;li&gt;Digits 6-8 are the serial number from the Record book maintained at the Department [for the Registration of Persons]. &lt;/li&gt;
&lt;li&gt;Digit 9 is a check digit &lt;/li&gt;
&lt;li&gt;The letter V stands for voter and X for a non-voter. Example: a student who applies for a NIC at 16, at which age he/she does not have the right to vote, the number on his/her card will end with an X. Cards issued in 2007 (no exact date available) no longer make this distinction – everyone is issued numbers that end with the letter V.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
The following numbering system is followed in NEW Format: 196410402757&lt;/h4&gt;
New NIC Format consist of 12 digit,  in the format 000000000000 (where 0 is a digit) &lt;br /&gt;
Only first 7 digits contains the date of birth logic.&lt;br /&gt;
First four digits represents the born year.&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
As you can see in the above example its &quot;1964&quot;. That means birth year is 1964.&lt;br /&gt;
Then next three numeric digits represent the no of days to your birthday date from January 1.&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
But when calculating the month and date, you have to consider two things.&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt; For all the years February month has 29 days.&lt;/li&gt;
&lt;li&gt; For women&#39;s this three digits will start from 500. That means for women&#39;s this three digits has an additional 500.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/25284a98e0d65c9c34ee342425f44679.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
 When you run the program, the output will be:&lt;/h4&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Enter Your NIC Number &lt;br /&gt;
Like : 000000000V or Like : 000000000000&lt;br /&gt;
196410402757&lt;br /&gt;
Your Details of given NIC Number&lt;br /&gt;
Year : 1964&lt;br /&gt;
Month : 4&lt;br /&gt;
Date : 13&lt;br /&gt;
Sex : Male&lt;br /&gt;
&lt;br /&gt;
Enter Your NIC Number &lt;br /&gt;
Like : 000000000V or Like : 000000000000&lt;br /&gt;
641042757V&lt;br /&gt;
Your Details of given NIC Number&lt;br /&gt;
Year : 1964&lt;br /&gt;
Month : 4&lt;br /&gt;
Date : 13&lt;br /&gt;
Sex : Male&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/6291489748603494238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2011/06/import-java.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/6291489748603494238'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/6291489748603494238'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2011/06/import-java.html' title='Java Program to Find the Data of Birth of Given (New/Old) National Identity Card(NIC) Number '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3qfGRP_09hVPFH4DgNAcRv9hxRS3he4XIINkcMqeZHO89KXAU1g7dDxKxYt1lB-GaLvG2Ewn1PeHM02j_mFL3rrkhlnrl0JIGr2987pbrN_xfwlNF9MwZ3N9ubI1rwAi3xFeniIyUi9Zn/s72-c/%25231.png" height="72" width="72"/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-5682312064117697717</id><published>2020-05-04T13:12:00.005+05:30</published><updated>2022-11-13T13:01:42.164+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java Program to Swap Two Numbers</title><content type='html'>
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot; hidden&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5uwYC53ELDSXLen4YPo6NI3awwwJ5w0_WsJHPx0kM2i4PwLqJZttLMxq54Tg7qr4DsedpH8kJ-_rWCL0w-pAmMncrlfAcEZgL7HScwar3huEDb8-HLFCLt-jLsqnIsDtaFxA71er7EHo/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5uwYC53ELDSXLen4YPo6NI3awwwJ5w0_WsJHPx0kM2i4PwLqJZttLMxq54Tg7qr4DsedpH8kJ-_rWCL0w-pAmMncrlfAcEZgL7HScwar3huEDb8-HLFCLt-jLsqnIsDtaFxA71er7EHo/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;In this program, you&#39;ll learn two techniques to swap two numbers in Java. The first one uses a temporary variable for swapping, while the second one doesn&#39;t use any temporary variables.&lt;br /&gt;

&lt;script src=&quot;https://gist.github.com/achchuthany/d64810d179f3c1b896b555e1397b528e.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;

&lt;h4&gt;When you run the program, the output will be:&lt;/h4&gt;

&lt;blockquote class=&quot;tr_bq&quot;&gt;Before Swap&lt;br /&gt;
First number = 12.0&lt;br /&gt;
Second number = 24.5&lt;br /&gt;
After Swap&lt;br /&gt;
First number = 24.5&lt;br /&gt;
Second number = 12.0&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/5682312064117697717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/java-program-to-swap-two-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/5682312064117697717'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/5682312064117697717'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/java-program-to-swap-two-numbers.html' title='Java Program to Swap Two Numbers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5uwYC53ELDSXLen4YPo6NI3awwwJ5w0_WsJHPx0kM2i4PwLqJZttLMxq54Tg7qr4DsedpH8kJ-_rWCL0w-pAmMncrlfAcEZgL7HScwar3huEDb8-HLFCLt-jLsqnIsDtaFxA71er7EHo/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-7700761270701535528</id><published>2020-05-04T13:05:00.003+05:30</published><updated>2022-11-13T13:01:42.168+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java Program to Compute Quotient and Remainder</title><content type='html'>&lt;div class=&quot;separator&quot; hidden=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5uwYC53ELDSXLen4YPo6NI3awwwJ5w0_WsJHPx0kM2i4PwLqJZttLMxq54Tg7qr4DsedpH8kJ-_rWCL0w-pAmMncrlfAcEZgL7HScwar3huEDb8-HLFCLt-jLsqnIsDtaFxA71er7EHo/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5uwYC53ELDSXLen4YPo6NI3awwwJ5w0_WsJHPx0kM2i4PwLqJZttLMxq54Tg7qr4DsedpH8kJ-_rWCL0w-pAmMncrlfAcEZgL7HScwar3huEDb8-HLFCLt-jLsqnIsDtaFxA71er7EHo/&quot; /&gt;&lt;/a&gt;&lt;/div&gt;In this program, you&#39;ll learn to compute quotient and remainder from the given dividend and divisor in Java.
&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/4a8d8acc90b7a61f3e39e80a38d4bfef.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;h4&gt;
When you run the program, the output will be:&lt;/h4&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Quotient : 4&lt;br /&gt;
Remainder : 1&lt;/blockquote&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/e5a8bdfe7287580d750f5c163335aaa8.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;h4&gt;
When you run the program, the output will be:&lt;/h4&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Quotient : 4.666666666666667&lt;br /&gt;
Remainder : 2.0&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/7700761270701535528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/java-program-to-compute-quotient-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/7700761270701535528'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/7700761270701535528'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/java-program-to-compute-quotient-and.html' title='Java Program to Compute Quotient and Remainder'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5uwYC53ELDSXLen4YPo6NI3awwwJ5w0_WsJHPx0kM2i4PwLqJZttLMxq54Tg7qr4DsedpH8kJ-_rWCL0w-pAmMncrlfAcEZgL7HScwar3huEDb8-HLFCLt-jLsqnIsDtaFxA71er7EHo/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-2712135817267146688</id><published>2020-05-04T12:50:00.001+05:30</published><updated>2022-11-13T13:01:42.158+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java Program to Add Two Integers</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh1OY9VOq9rGl40xW1DI0pBKoqBkMKqveKFyF3WapsHDyah19-HdcX5I_pxqwOfItEkQWEuGPAg3Sg1scWJEFyMBdFLlaTTV8AjDX-9sx0jlRxW_eHUbFg4DuiS4vWrfRVhLs4TVY6Fcyf/s1600/%25232.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; hidden&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; height=&quot;136&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh1OY9VOq9rGl40xW1DI0pBKoqBkMKqveKFyF3WapsHDyah19-HdcX5I_pxqwOfItEkQWEuGPAg3Sg1scWJEFyMBdFLlaTTV8AjDX-9sx0jlRxW_eHUbFg4DuiS4vWrfRVhLs4TVY6Fcyf/s200/%25232.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;

In this program, you&#39;ll learn to store and add two integer numbers in Java. After addition, the final sum is displayed on the terminal.
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/achchuthany/5619911287a62e37440491b64c4a2471.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;h4&gt;
When you run the program, the output will be:&lt;/h4&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
The sum is : 50&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/2712135817267146688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/05/java-program-to-add-two-integers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/2712135817267146688'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/2712135817267146688'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/05/java-program-to-add-two-integers.html' title='Java Program to Add Two Integers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh1OY9VOq9rGl40xW1DI0pBKoqBkMKqveKFyF3WapsHDyah19-HdcX5I_pxqwOfItEkQWEuGPAg3Sg1scWJEFyMBdFLlaTTV8AjDX-9sx0jlRxW_eHUbFg4DuiS4vWrfRVhLs4TVY6Fcyf/s72-c/%25232.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>10845 106 Rd, Dodge City, KS 67801, USA</georss:featurename><georss:point>37.788081579220496 -100.10742225000001</georss:point><georss:box>12.266047079220495 -141.41601625 63.310116079220492 -58.798828250000014</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-3760776839343439079</id><published>2020-04-29T18:19:00.001+05:30</published><updated>2022-11-13T13:01:42.161+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java Program to Print an Integer (Entered by the User)</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh1OY9VOq9rGl40xW1DI0pBKoqBkMKqveKFyF3WapsHDyah19-HdcX5I_pxqwOfItEkQWEuGPAg3Sg1scWJEFyMBdFLlaTTV8AjDX-9sx0jlRxW_eHUbFg4DuiS4vWrfRVhLs4TVY6Fcyf/s1600/%25232.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; hidden&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; height=&quot;136&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh1OY9VOq9rGl40xW1DI0pBKoqBkMKqveKFyF3WapsHDyah19-HdcX5I_pxqwOfItEkQWEuGPAg3Sg1scWJEFyMBdFLlaTTV8AjDX-9sx0jlRxW_eHUbFg4DuiS4vWrfRVhLs4TVY6Fcyf/s200/%25232.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;

In this program, you&#39;ll learn to print a number entered by the user in Java. The integer is stored in a variable using System.in, and is displayed on the screen using System.out.&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Example: How to Print an Integer entered by an user&lt;/h4&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/e89fe82a93edb88042067bcf4df937f8.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;When you run the program, the output will be:&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter a number: 12&lt;br /&gt;
You entered: 12&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/3760776839343439079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2020/04/java-program-to-print-integer-entered.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/3760776839343439079'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/3760776839343439079'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2020/04/java-program-to-print-integer-entered.html' title='Java Program to Print an Integer (Entered by the User)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh1OY9VOq9rGl40xW1DI0pBKoqBkMKqveKFyF3WapsHDyah19-HdcX5I_pxqwOfItEkQWEuGPAg3Sg1scWJEFyMBdFLlaTTV8AjDX-9sx0jlRxW_eHUbFg4DuiS4vWrfRVhLs4TVY6Fcyf/s72-c/%25232.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-4401552066956881639</id><published>2019-11-19T12:00:00.000+05:30</published><updated>2022-11-13T13:02:55.487+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Array"/><category scheme="http://www.blogger.com/atom/ns#" term="CPP"/><category scheme="http://www.blogger.com/atom/ns#" term="Function"/><title type='text'>C++ Program to Calculate Average of Numbers Using Arrays</title><content type='html'>&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZHTaA8RQdOSLbfjqxE2JjZQP4DrT7LEApXlgPropLWkBWdZbziR9xDa-k-Cp6n0bZPF3iuhoK9BJU1_uuJdLDWBguEIB-8kTY1EWotGKIvX-egqL-HCo_ft_-mpdXb2H23aCBIqVotGqE/s1600/CPP%252326.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;C++ Program to Calculate Average of Numbers Using Arrays&quot; border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZHTaA8RQdOSLbfjqxE2JjZQP4DrT7LEApXlgPropLWkBWdZbziR9xDa-k-Cp6n0bZPF3iuhoK9BJU1_uuJdLDWBguEIB-8kTY1EWotGKIvX-egqL-HCo_ft_-mpdXb2H23aCBIqVotGqE/s1600/CPP%252326.png&quot; title=&quot;C++ Program to Calculate Average of Numbers Using Arrays&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Average of numbers is calculated by adding all the numbers and then dividing the sum by count of numbers available.&lt;br /&gt;&lt;br /&gt;This program calculates the average of marks if the data are from 1 to 100. If user enters value of n above 100 or below 1 then, while loop is executed which asks user to enter value of n until it is between 1 and 100. When the numbers are entered by the user, subsequently the sum is calculated and stored in the variable sum. After storing all the numbers, average is calculated and displayed.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Example: Look at these numbers:&lt;/h4&gt;&lt;i&gt;3, 7, 5, 13, 20, 23, 39, 23, 40, 23, 14, 12, 56, 23, 29&lt;/i&gt;&lt;br /&gt;The sum of these numbers is 330&lt;br /&gt;There are fifteen numbers.&lt;br /&gt;The mean is equal to 330 / 15 = 22&lt;br /&gt;The mean of the above numbers is 22&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;C++ Program to Calculate Average of Numbers Using Arrays&lt;/h3&gt;For loop is started from 0 to n-1. This loop adds all the elements of the array. The code snippet demonstrating this is as follows.&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;sum += num[i]; &lt;/blockquote&gt;The average of the numbers is obtained by dividing the sum by n i.e amount of numbers. This is shown below&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;average= sum / n;&amp;nbsp;&lt;/blockquote&gt;Finally the average is displayed. &lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/8ac0f417246c543ba496a59e9d4500c9.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter the numbers of data: 5&lt;br /&gt;1. Enter number: 125&lt;br /&gt;Error! number should in range of (1 to 100).&lt;br /&gt;Enter the number again: 100.0&lt;br /&gt;2. Enter number: 75.0&lt;br /&gt;3. Enter number: 65.0&lt;br /&gt;4. Enter number: 65.36&lt;br /&gt;5. Enter number: 75.98&lt;br /&gt;Average = 76.268&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/4401552066956881639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-calculate-average-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/4401552066956881639'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/4401552066956881639'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-calculate-average-of.html' title='C++ Program to Calculate Average of Numbers Using Arrays'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZHTaA8RQdOSLbfjqxE2JjZQP4DrT7LEApXlgPropLWkBWdZbziR9xDa-k-Cp6n0bZPF3iuhoK9BJU1_uuJdLDWBguEIB-8kTY1EWotGKIvX-egqL-HCo_ft_-mpdXb2H23aCBIqVotGqE/s72-c/CPP%252326.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-2954302285770047357</id><published>2019-11-19T11:28:00.000+05:30</published><updated>2022-11-13T13:02:55.529+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Array"/><category scheme="http://www.blogger.com/atom/ns#" term="Class"/><category scheme="http://www.blogger.com/atom/ns#" term="CPP"/><category scheme="http://www.blogger.com/atom/ns#" term="Data Structure"/><title type='text'>C++ Program to Implement of Stack using Array</title><content type='html'>&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPw1Y3PDKu73swuqNN-qkmDWtAoNpgJ1UGZ0MJj7h-Ls68pM2uoq81ZO2LmHQvTliyuiLWgSc5du_3oVFFRx9o-8wDqio6dmRlLUXhFQGP1TEg9PCdYD_IKmx2V4OAHdiSjYQlBYCJMX8R/s1600/CPP%252325.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;C++ Program to Implement of stack using array&quot; border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPw1Y3PDKu73swuqNN-qkmDWtAoNpgJ1UGZ0MJj7h-Ls68pM2uoq81ZO2LmHQvTliyuiLWgSc5du_3oVFFRx9o-8wDqio6dmRlLUXhFQGP1TEg9PCdYD_IKmx2V4OAHdiSjYQlBYCJMX8R/s1600/CPP%252325.png&quot; title=&quot;C++ Program to Implement of stack using array&quot; /&gt;&lt;/a&gt;&lt;/div&gt;A stack is a very important data structure because it can store data in a very practical way. A stack is a linear data structure. Stack array list follows the Last in First Out principle. The element gets to add up at the TOP and deleted from the TOP. &lt;br /&gt;&lt;br /&gt;Mainly the following three basic operations are performed in the stack:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Push:&lt;/b&gt; Adds an item in the stack. If the stack is full, then it is said to be an Overflow condition.&lt;br /&gt;&lt;b&gt;Pop: &lt;/b&gt;Removes an item from the stack. The items are popped in the reversed order in which they are pushed. If the stack is empty, then it is said to be an Underflow condition.&lt;br /&gt;&lt;b&gt;Peek&lt;/b&gt;: Returns top element of stack.&lt;br /&gt;&lt;b&gt;isEmpty: &lt;/b&gt;Returns true if stack is empty, else false.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;C++ Program to Implement of stack using array&lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/ccd87ad524a954aa5e7902953dddd372.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h4&gt;Output &lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;9&lt;br /&gt;7&lt;br /&gt;10&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/2954302285770047357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-implement-of-stack-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/2954302285770047357'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/2954302285770047357'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-implement-of-stack-using.html' title='C++ Program to Implement of Stack using Array'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPw1Y3PDKu73swuqNN-qkmDWtAoNpgJ1UGZ0MJj7h-Ls68pM2uoq81ZO2LmHQvTliyuiLWgSc5du_3oVFFRx9o-8wDqio6dmRlLUXhFQGP1TEg9PCdYD_IKmx2V4OAHdiSjYQlBYCJMX8R/s72-c/CPP%252325.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-1631004949059904521</id><published>2019-11-18T18:53:00.000+05:30</published><updated>2022-11-13T13:02:55.559+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPP"/><category scheme="http://www.blogger.com/atom/ns#" term="Flow Control"/><category scheme="http://www.blogger.com/atom/ns#" term="for"/><category scheme="http://www.blogger.com/atom/ns#" term="Function"/><title type='text'>C++ Program to Convert Binary Number to Octal and vice-versa</title><content type='html'>&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhchoSKOUsaQ8yzVo-z8bMIKAlNwPRvVBn0rvHV_mQ-_AECAW2bJSnWvEx0Xb_espD7vF4KukRzPIjSUHcmiOcU07x4h2hqoBwjwoeox3qKhDvwBavlY6BmLgssUtdbU2HgKBiHo-cEg9SX/s1600/CPP%252324.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;C++ Program to Convert Binary Number to Octal and vice-versa&quot; border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhchoSKOUsaQ8yzVo-z8bMIKAlNwPRvVBn0rvHV_mQ-_AECAW2bJSnWvEx0Xb_espD7vF4KukRzPIjSUHcmiOcU07x4h2hqoBwjwoeox3qKhDvwBavlY6BmLgssUtdbU2HgKBiHo-cEg9SX/s1600/CPP%252324.png&quot; title=&quot;C++ Program to Convert Binary Number to Octal and vice-versa&quot; /&gt;&lt;/a&gt;&lt;/div&gt;The Octal numeral system uses the number 8 as its base. As a base-8 numeral system, it consists of only eight numbers: 0,1,2,3,4,5,6 and 7.&lt;br /&gt;The Binary numeral system uses the number 2 as its base. As a  base-2 numeral system, it consists of only two numbers: 0 and 1.&lt;br /&gt;The decimal numeral system is the most commonly used and the standard system in daily life. It uses the number 10 as its base. Therefore, it has 10 symbols: The numbers from 0 to 9; namely 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;C++ program to convert Binary number to Octal&lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/599a36aeec9d9da9db15e71688d50b35.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter a binary number : 1010                                                                                                         &lt;br /&gt;1010 in binary = 12 in octal&lt;/blockquote&gt;&lt;br /&gt;&lt;h3&gt;C++ Program to convert Octal number to Binary &lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/8b653168b7c1ed01ee6123891406b29a.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter an octal number : 23                                                                                                           &lt;br /&gt;23 in octal = 10011in binary&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/1631004949059904521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-convert-binary-number-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/1631004949059904521'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/1631004949059904521'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-convert-binary-number-to.html' title='C++ Program to Convert Binary Number to Octal and vice-versa'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhchoSKOUsaQ8yzVo-z8bMIKAlNwPRvVBn0rvHV_mQ-_AECAW2bJSnWvEx0Xb_espD7vF4KukRzPIjSUHcmiOcU07x4h2hqoBwjwoeox3qKhDvwBavlY6BmLgssUtdbU2HgKBiHo-cEg9SX/s72-c/CPP%252324.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-8982580299830356260</id><published>2019-11-17T20:53:00.000+05:30</published><updated>2022-11-13T13:02:55.585+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPP"/><category scheme="http://www.blogger.com/atom/ns#" term="Flow Control"/><category scheme="http://www.blogger.com/atom/ns#" term="Function"/><category scheme="http://www.blogger.com/atom/ns#" term="while"/><title type='text'>C++ Program to Convert Octal Number to Decimal and vice-versa</title><content type='html'>&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxvDBkocsa6mV7xtCO3P_KIZX4WKV1gk9uuXkv4xUCZfNVFWqrh4Br8at3KYA3wftlUxq2no3VZblFGulVi5Ort7ULISV5TlIoLtudc5Q595isbdilggn2o4wQrDUXNaOESx1OKAiQUEif/s1600/CPP%252323.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;C++ Program to Convert Octal Number to Decimal and vice-versa&quot; border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxvDBkocsa6mV7xtCO3P_KIZX4WKV1gk9uuXkv4xUCZfNVFWqrh4Br8at3KYA3wftlUxq2no3VZblFGulVi5Ort7ULISV5TlIoLtudc5Q595isbdilggn2o4wQrDUXNaOESx1OKAiQUEif/s1600/CPP%252323.png&quot; title=&quot;C++ Program to Convert Octal Number to Decimal and vice-versa&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The Octal numeral system uses the number 8 as its base (radix). As a base-8 numeral system, it consists of only eight numbers: 0,1,2,3,4,5,6 and 7.&lt;br /&gt;&lt;br /&gt;The decimal numeral system is the most commonly used and the standard system in daily life. It uses the number 10 as its base (radix). Therefore, it has 10 symbols: The numbers from 0 to 9; namely 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;How to Convert Octal to Decimal&lt;/h3&gt;&lt;b&gt;Step 1:&lt;/b&gt; Write down the Octal number.&lt;br /&gt;&lt;b&gt;Step 2: &lt;/b&gt;Starting with the least significant digit (LSB - the rightmost one), multiply the digit by the value of the position. Continue doing this until you reach the most significant digit (MSB - the leftmost one).&lt;br /&gt;&lt;b&gt;Step 3:&lt;/b&gt; Add the results and you will get the decimal equivalent of the given binary number.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Example: (123)&lt;sub&gt;8&lt;/sub&gt;&lt;/h3&gt;&lt;b&gt;Step 1:&lt;/b&gt; Write down (123)&lt;sub&gt;8&lt;/sub&gt; and determine the positions, namely the powers of 8 that the digit belongs to.&lt;br /&gt;&lt;b&gt;Step 2:&lt;/b&gt; Represent the number in terms of its positions.&amp;nbsp; (1* 8&lt;sup&gt;2&lt;/sup&gt;) + (2 * 8&lt;sup&gt;1&lt;/sup&gt;) + (3 * 8&lt;sup&gt;0&lt;/sup&gt;)&lt;br /&gt;&lt;b&gt;Step 3:&lt;/b&gt; (1 * 64) + (2 * 8) + (3 * 1) = 64 + 16 + 3 =83&lt;br /&gt;Therefore,(123)&lt;sub&gt;8&lt;/sub&gt; = (83)&lt;sub&gt;10&lt;/sub&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;C++ program to convert octal number to decimal&lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/3e6cb46298256f827a056545adb24917.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter a Octal number: 123&lt;br /&gt;123 in Octal = 83 in decimal&lt;/blockquote&gt;&lt;br /&gt;&lt;h3&gt;C++ Program to convert decimal number to octal&lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/4b57ba2b3a6062c0f083e1f815472cdb.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter a decimal number: 83&lt;br /&gt;83 in decimal = 123 in binary&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/8982580299830356260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-convert-octal-number-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/8982580299830356260'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/8982580299830356260'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-convert-octal-number-to.html' title='C++ Program to Convert Octal Number to Decimal and vice-versa'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxvDBkocsa6mV7xtCO3P_KIZX4WKV1gk9uuXkv4xUCZfNVFWqrh4Br8at3KYA3wftlUxq2no3VZblFGulVi5Ort7ULISV5TlIoLtudc5Q595isbdilggn2o4wQrDUXNaOESx1OKAiQUEif/s72-c/CPP%252323.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-7850741270647942153</id><published>2019-11-13T13:37:00.000+05:30</published><updated>2022-11-13T13:02:55.609+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPP"/><category scheme="http://www.blogger.com/atom/ns#" term="Flow Control"/><category scheme="http://www.blogger.com/atom/ns#" term="Function"/><category scheme="http://www.blogger.com/atom/ns#" term="while"/><title type='text'>C++ program to convert binary number to decimal and vice-versa</title><content type='html'>&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxljhtU3WwfuDzdhZFOuDYfTz4-bnEalWBYNUW4kVBNqzNstVo8BIK8_65lt8Leex80ydr38UOprWC1tFaujYMVzG1QHJBi6pZgcIsDqEtiG8L4TDr1IvCbcPIkBCkilIcOvE8kJgnJIBq/s1600/CPP%25231.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;C++ program to convert binary number to decimal and vice-versa&quot; border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxljhtU3WwfuDzdhZFOuDYfTz4-bnEalWBYNUW4kVBNqzNstVo8BIK8_65lt8Leex80ydr38UOprWC1tFaujYMVzG1QHJBi6pZgcIsDqEtiG8L4TDr1IvCbcPIkBCkilIcOvE8kJgnJIBq/s1600/CPP%25231.png&quot; title=&quot;C++ program to convert binary number to decimal and vice-versa&quot; /&gt;&lt;/a&gt;&lt;/div&gt;The binary numeral system uses the number 2 as its base (radix). As a base-2 numeral system, it consists of only two numbers: 0 and 1. &lt;br /&gt;The decimal numeral system is the most commonly used and the standard system in daily life. It uses the number 10 as its base (radix). Therefore, it has 10 symbols: The numbers from 0 to 9; namely 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;How to Convert Binary to Decimal&lt;/h4&gt;&lt;b&gt;Step 1: &lt;/b&gt;Write down the binary number.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2: &lt;/b&gt;Starting with the least significant digit (LSB - the rightmost one), multiply the digit by the value of the position. Continue doing this until you reach the most significant digit (MSB - the leftmost one).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3:&lt;/b&gt; Add the results and you will get the decimal equivalent of the given binary number.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Example: (1010)&lt;sub&gt;2&lt;/sub&gt;&lt;/h4&gt;Step 1: Write down (1010)&lt;sub&gt;2&lt;/sub&gt; and determine the positions, namely the powers of 2 that the digit belongs to.&lt;br /&gt;Step 2: Represent the number in terms of its positions. (1 * 2&lt;sup&gt;3&lt;/sup&gt;) + (0 * 2&lt;sup&gt;2&lt;/sup&gt;) + (1 * 2&lt;sup&gt;1&lt;/sup&gt;) + (0 * 2&lt;sup&gt;0&lt;/sup&gt;)&lt;br /&gt;Step 3: (1 * 8) + (0 * 4) + (1 * 2) + (0 * 1) = 8 + 0 + 2 + 0 = 10&lt;br /&gt;Therefore, (1010)&lt;sub&gt;2&lt;/sub&gt; = (10)&lt;sub&gt;10&lt;/sub&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;C++ program to convert binary number to decimal&lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/d7cec6d57840ba74c3d4200bd971464b.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter a binary number: 1101&lt;br /&gt;1101 in binary = 13 in decimal&lt;/blockquote&gt;&lt;br /&gt;&lt;h3&gt;C++ Program to convert decimal number to binary&lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/03ea9ace05fb40cf474860d1c5792d10.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter a decimal number: 13&lt;br /&gt;13 in decimal = 1101 in binary&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/7850741270647942153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-convert-binary-number-to_13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/7850741270647942153'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/7850741270647942153'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-convert-binary-number-to_13.html' title='C++ program to convert binary number to decimal and vice-versa'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxljhtU3WwfuDzdhZFOuDYfTz4-bnEalWBYNUW4kVBNqzNstVo8BIK8_65lt8Leex80ydr38UOprWC1tFaujYMVzG1QHJBi6pZgcIsDqEtiG8L4TDr1IvCbcPIkBCkilIcOvE8kJgnJIBq/s72-c/CPP%25231.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-8507091819894402383</id><published>2019-11-13T10:42:00.000+05:30</published><updated>2022-11-13T13:02:55.636+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPP"/><category scheme="http://www.blogger.com/atom/ns#" term="Flow Control"/><category scheme="http://www.blogger.com/atom/ns#" term="for"/><category scheme="http://www.blogger.com/atom/ns#" term="Function"/><category scheme="http://www.blogger.com/atom/ns#" term="if"/><title type='text'>C++ program to check whether a number is prime or not prime </title><content type='html'>&lt;div &gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg80mDmT6n6FkDgYhE9afk-sELUDk_X-Bqv7BT2zI8SgTmzor7Lawz5L-FGq8Zw5PgQI1uy8VJuhEClEnuEG7AxieP2fi2K31Bu6kMHlspEXHJ_zd31C0-I34MimKryITwFon1L9pZhv2F_/s1600/CPP%25232.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg80mDmT6n6FkDgYhE9afk-sELUDk_X-Bqv7BT2zI8SgTmzor7Lawz5L-FGq8Zw5PgQI1uy8VJuhEClEnuEG7AxieP2fi2K31Bu6kMHlspEXHJ_zd31C0-I34MimKryITwFon1L9pZhv2F_/s1600/CPP%25232.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;A prime number is a whole number that is greater than one and the only factors of a prime number should be one and itself. Some of the first prime numbers are 2, 3, 5, 7, 11, 13 ,17 etc.&lt;br /&gt;&lt;br /&gt;There can be many prime numbers between two intervals. For example, the prime numbers between the intervals 5 and 15 are 5, 7, 11 and  13&lt;br /&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;Some facts:&lt;/h4&gt;The only even prime number is 2. All other even numbers can be divided by 2.&lt;br /&gt;&lt;br /&gt;If the sum of a number&#39;s digits is a multiple of 3, that number can be divided by 3.&lt;br /&gt;&lt;br /&gt;No prime number greater than 5 ends in a 5. Any number greater than 5 that ends in a 5 can be divided by 5.&lt;br /&gt;&lt;br /&gt;Zero and 1 are not considered prime numbers.&lt;br /&gt;&lt;br /&gt;Except for 0 and 1, a number is either a prime number or a composite number. A composite number is defined as any number, greater than 1, that is not prime.&lt;br /&gt;&lt;br /&gt;To prove whether a number is a prime number, first try dividing it by 2, and see if you get a whole number. If you do, it can&#39;t be a prime number. If you don&#39;t get a whole number, next try dividing it by prime numbers: 3, 5, 7, 11 (9 is divisible by 3) and so on, always dividing by a prime number&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Example: C++ program to check whether a number is prime or not prime &lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/e56afee82422603dff3de394b4f26a84.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter a positive integer: 13&lt;br /&gt;13 is a prime number&lt;/blockquote&gt;&lt;br /&gt;&lt;h3&gt;Optimized Method: C++ program to check whether a number is prime or not prime &lt;/h3&gt;Instead of checking till n, we can check till √n because a larger factor of n must be a multiple of smaller factor that has been already checked.&lt;br /&gt;The algorithm can be improved further by observing that all primes are of the form 6k ± 1, with the exception of 2 and 3. This is because all integers can be expressed as (6k + i) for some integer k and for i = ?1, 0, 1, 2, 3, or 4; 2 divides (6k + 0), (6k + 2), (6k + 4); and 3 divides (6k + 3). So a more efficient method is to test if n is divisible by 2 or 3, then to check through all the numbers of form 6k ± 1. (Source: &lt;a href=&quot;https://en.wikipedia.org/wiki/Primality_test&quot; target=&quot;_blank&quot;&gt;wikipedia&lt;/a&gt;)&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/253d6d7c3f730c827c9d1d3f56d89309.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter a positive integer: 13&lt;br /&gt;13 is a prime number&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/8507091819894402383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-check-whether-number-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/8507091819894402383'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/8507091819894402383'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-check-whether-number-is.html' title='C++ program to check whether a number is prime or not prime '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg80mDmT6n6FkDgYhE9afk-sELUDk_X-Bqv7BT2zI8SgTmzor7Lawz5L-FGq8Zw5PgQI1uy8VJuhEClEnuEG7AxieP2fi2K31Bu6kMHlspEXHJ_zd31C0-I34MimKryITwFon1L9pZhv2F_/s72-c/CPP%25232.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-1145863481812515350</id><published>2019-11-12T19:54:00.000+05:30</published><updated>2022-11-13T13:02:55.666+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPP"/><category scheme="http://www.blogger.com/atom/ns#" term="Flow Control"/><category scheme="http://www.blogger.com/atom/ns#" term="for"/><category scheme="http://www.blogger.com/atom/ns#" term="if"/><title type='text'>C++ Program to Display Factors of a Number</title><content type='html'>&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0b135tpU3HYYrMHdFMKHF0kijYR3tmhuBrmw1QvyFIsGGHalzfTvKS1FsykBfiNZZxg8up4RcdLsT448QWsnHCB7ZZm3lqhRJPzl7QXB-qMIBvGrnGkvf7f1TxaFie9wBA576D8v5qodr/s1600/CPP%25233.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;C++ Program to Display Factors of a Number&quot; border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0b135tpU3HYYrMHdFMKHF0kijYR3tmhuBrmw1QvyFIsGGHalzfTvKS1FsykBfiNZZxg8up4RcdLsT448QWsnHCB7ZZm3lqhRJPzl7QXB-qMIBvGrnGkvf7f1TxaFie9wBA576D8v5qodr/s1600/CPP%25233.png&quot; title=&quot;C++ Program to Display Factors of a Number&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Factors are the numbers you multiply together to get another number.&lt;br /&gt;&lt;br /&gt;For example, you get 2 and 3 as a factor pair of 6. If you also need negative factors you will need to duplicate the answer yourself and repeat all of the factors as negatives such as -2 and -3 as another factor pair of 6.&lt;br /&gt;&lt;br /&gt;Factors are whole numbers that are multiplied together to produce another number. The original numbers are factors of the product number. If &lt;b&gt;a&lt;/b&gt; x &lt;b&gt;b&lt;/b&gt; = c then &lt;b&gt;a&lt;/b&gt; and &lt;b&gt;b&lt;/b&gt; are factors of c.&lt;br /&gt;&lt;br /&gt;Say you wanted to find the factors of 16. You would find all pairs of numbers that when multiplied together resulted in 16. We know 2 and 8 are factors of 16 because 2 x 8 = 16. 4 is a factor of 16 because 4 x 4 = 16. Also 1 and 16 are factors of 16 because 1 x 16 = 16. The factors of 16 are 1, 2, 4, 8, 16.&lt;br /&gt;&lt;h4&gt;The factors of 60 are:&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60 &lt;br /&gt;&lt;br /&gt;1 × 60 = 60&lt;br /&gt;2 × 30 = 60&lt;br /&gt;3 × 20 = 60&lt;br /&gt;4 × 15 = 60&lt;br /&gt;5 × 12 = 60&lt;br /&gt;6 × 10 = 60&lt;/blockquote&gt;&lt;br /&gt;&lt;h3&gt;Example: C++ Program to Display Factors of a Number&lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/1ace16c99a8a361bd9dbe398def0c26e.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter a positive integer: 60&lt;br /&gt;Factors of 60 are:&lt;br /&gt;1 2 3 4 5 6 10 12 15 20 30 60&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/1145863481812515350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-display-factors-of-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/1145863481812515350'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/1145863481812515350'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-display-factors-of-number.html' title='C++ Program to Display Factors of a Number'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0b135tpU3HYYrMHdFMKHF0kijYR3tmhuBrmw1QvyFIsGGHalzfTvKS1FsykBfiNZZxg8up4RcdLsT448QWsnHCB7ZZm3lqhRJPzl7QXB-qMIBvGrnGkvf7f1TxaFie9wBA576D8v5qodr/s72-c/CPP%25233.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-3181485406167686447</id><published>2019-11-11T14:37:00.000+05:30</published><updated>2022-11-13T13:02:55.692+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPP"/><category scheme="http://www.blogger.com/atom/ns#" term="Flow Control"/><category scheme="http://www.blogger.com/atom/ns#" term="Function"/><category scheme="http://www.blogger.com/atom/ns#" term="while"/><title type='text'>C++ program to display prime numbers between two intervals</title><content type='html'>&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUTZcR0vden8KMIPju1dzt91cNxdutWb6v6Bggwl1EWI0ukCHkV2uXUafgswclRdNoKUUjUGq7FJcZTPIovRWS0Qb7wmMwDuUd89HXgIiAd93Ma5EZVsz5PzKgjv86ezqflP6X6EwaELgZ/s1600/CPP%25234.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;C++ program to display prime numbers between two intervals&quot; border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUTZcR0vden8KMIPju1dzt91cNxdutWb6v6Bggwl1EWI0ukCHkV2uXUafgswclRdNoKUUjUGq7FJcZTPIovRWS0Qb7wmMwDuUd89HXgIiAd93Ma5EZVsz5PzKgjv86ezqflP6X6EwaELgZ/s1600/CPP%25234.png&quot; title=&quot;C++ program to display prime numbers between two intervals&quot; /&gt;&lt;/a&gt;&lt;/div&gt;A Prime Number is a whole number that cannot be made by multiplying other whole numbers&lt;br /&gt;&lt;br /&gt;A prime number is a whole number that is greater than one and the only factors of a prime number should be one and itself. Some of the first prime numbers are 2, 3, 5, 7, 11, 13 ,17 etc.&lt;br /&gt;&lt;br /&gt;There can be many prime numbers between two intervals. For example, the prime numbers between the intervals 5 and 15 are 5, 7, 11 and&amp;nbsp; 13 &lt;br /&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;Some facts:&lt;/h4&gt;The only even prime number is 2. All other even numbers can be divided by 2.&lt;br /&gt;If the sum of a number&#39;s digits is a multiple of 3, that number can be divided by 3.&lt;br /&gt;No prime number greater than 5 ends in a 5. Any number greater than 5 that ends in a 5 can be divided by 5.&lt;br /&gt;Zero and 1 are not considered prime numbers.&lt;br /&gt;Except for 0 and 1, a number is either a prime number or a composite number. A composite number is defined as any number, greater than 1, that is not prime.&lt;br /&gt;&lt;br /&gt;To prove whether a number is a prime number, first try dividing it by 2, and see if you get a whole number. If you do, it can&#39;t be a prime number. If you don&#39;t get a whole number, next try dividing it by prime numbers: 3, 5, 7, 11 (9 is divisible by 3) and so on, always dividing by a prime number&lt;br /&gt;&lt;br /&gt;The program to find and display the prime numbers between two intervals is given as follows. &lt;br /&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;Example: Display Prime Numbers Between two Intervals&lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/3846587e4eec063e5e7f60ab2af43bbb.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter two numbers(intervals): 5&lt;br /&gt;30&lt;br /&gt;Prime numbers between 5 and 30 are: 5 7 11 13 17 19 23 29&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/3181485406167686447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-display-prime-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/3181485406167686447'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/3181485406167686447'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-display-prime-numbers.html' title='C++ program to display prime numbers between two intervals'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUTZcR0vden8KMIPju1dzt91cNxdutWb6v6Bggwl1EWI0ukCHkV2uXUafgswclRdNoKUUjUGq7FJcZTPIovRWS0Qb7wmMwDuUd89HXgIiAd93Ma5EZVsz5PzKgjv86ezqflP6X6EwaELgZ/s72-c/CPP%25234.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-6617247691269470484</id><published>2019-11-05T20:03:00.000+05:30</published><updated>2022-11-13T13:02:55.720+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPP"/><category scheme="http://www.blogger.com/atom/ns#" term="Flow Control"/><category scheme="http://www.blogger.com/atom/ns#" term="for"/><category scheme="http://www.blogger.com/atom/ns#" term="Function"/><category scheme="http://www.blogger.com/atom/ns#" term="if"/><title type='text'>C++ program to calculate power of a number</title><content type='html'>&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNNGmd-wKOH8Qiwvvv-G1s5y-u5f513uq7hy32m662p5BZdlqlp3jjGap_5Ayuz1YX00hQrfeT9Lvkulg6-ya-eKDM8S8iOaGbwYHSeyj8_siml7qUTg7JfQIfW4tdC1tyKcAXz4hY29bM/s1600/CPP%25235.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;C++ program to calculate power of a number&quot; border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNNGmd-wKOH8Qiwvvv-G1s5y-u5f513uq7hy32m662p5BZdlqlp3jjGap_5Ayuz1YX00hQrfeT9Lvkulg6-ya-eKDM8S8iOaGbwYHSeyj8_siml7qUTg7JfQIfW4tdC1tyKcAXz4hY29bM/s1600/CPP%25235.png&quot; title=&quot;C++ program to calculate power of a number&quot; /&gt;&lt;/a&gt;&lt;/div&gt;We know how to calculate the expression 3 x 3. This expression can be written in a shorter way using something called exponents.&lt;br /&gt;&lt;br /&gt;3 x 3=3&lt;sup&gt;2&lt;/sup&gt;&lt;br /&gt;&lt;br /&gt;An expression that represents repeated multiplication of the same factor is called a power.&lt;br /&gt;The number 3 is called the base, and the number 2 is called the exponent. The exponent corresponds to the number of times the base is used as a factor.&lt;br /&gt;&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;3&lt;sup&gt;1&lt;/sup&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  3 to the first power  3&lt;br /&gt;3&lt;sup&gt;2&lt;/sup&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 to the second power or 3 squared 3 x 3&lt;br /&gt;3&lt;sup&gt;3&lt;/sup&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 to the third power or 3 cubed 3 x 3 x 3&lt;br /&gt;3&lt;sup&gt;6&lt;/sup&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 to the power of six 3 x 3 x 3 x 3 x 3 x 3&lt;/blockquote&gt;&lt;br /&gt;This program takes two numbers from the user (a base number and an exponent) and calculates the power.&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Power of a number =  base&amp;nbsp; &lt;sup&gt; exponent &lt;/sup&gt; &lt;/blockquote&gt;[ads id=&#39;ads1&#39;]&lt;br /&gt;&lt;h3&gt;Example: Power of a number&amp;nbsp; &lt;/h3&gt;function power() is used to calculate the power of a number, for loop is used to runs from 1 to exponent. For each iteration of the loop, base is multiplied with power. i.e base is multiplied with itself exponent times and the result is stored in power. This will leads to base &lt;sup&gt; exponent&lt;/sup&gt;&amp;nbsp; is stored in power.&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/db9c5b7a81858c1529322710fb7e1f1f.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h4&gt;Output&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter base and exponent respectively:  2&lt;br /&gt;12&lt;br /&gt;2^12 = 4096&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/6617247691269470484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-calculate-power-of-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/6617247691269470484'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/6617247691269470484'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-calculate-power-of-number.html' title='C++ program to calculate power of a number'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNNGmd-wKOH8Qiwvvv-G1s5y-u5f513uq7hy32m662p5BZdlqlp3jjGap_5Ayuz1YX00hQrfeT9Lvkulg6-ya-eKDM8S8iOaGbwYHSeyj8_siml7qUTg7JfQIfW4tdC1tyKcAXz4hY29bM/s72-c/CPP%25235.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1401059883331742142.post-1525319353440210076</id><published>2019-11-03T20:44:00.000+05:30</published><updated>2022-11-13T13:02:55.746+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPP"/><category scheme="http://www.blogger.com/atom/ns#" term="Flow Control"/><category scheme="http://www.blogger.com/atom/ns#" term="for"/><category scheme="http://www.blogger.com/atom/ns#" term="Recursive"/><category scheme="http://www.blogger.com/atom/ns#" term="while"/><title type='text'>C++ program to display fibonacci series</title><content type='html'>&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_TnAokbQ6ZXAmry34O-42ZblXioSIoL7dL9PCdVz4rjd8pwU1VFA7TihcR2mQ8h8F1TsUVr_eMsTQ5Rxql-2B75agKzb5Y_aVUGzliodxP6tXmMShV1T49cReCF4WRT-2Exh5QmWDODyI/s1600/CPP%25236.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;C++ program to display fibonacci series&quot; border=&quot;0&quot; data-original-height=&quot;170&quot; data-original-width=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_TnAokbQ6ZXAmry34O-42ZblXioSIoL7dL9PCdVz4rjd8pwU1VFA7TihcR2mQ8h8F1TsUVr_eMsTQ5Rxql-2B75agKzb5Y_aVUGzliodxP6tXmMShV1T49cReCF4WRT-2Exh5QmWDODyI/s1600/CPP%25236.png&quot; title=&quot;C++ program to display fibonacci series&quot; /&gt;&lt;/a&gt;&lt;/div&gt;The Fibonacci sequence is a set of numbers that starts with a one or a zero, followed by a one, and proceeds based on the rule that each number (called a Fibonacci number) is equal to the sum of the preceding two numbers.&lt;br /&gt;The next number is found by adding up the two numbers before it.&lt;br /&gt;The 2 is found by adding the two numbers before it (1+1)&lt;br /&gt;The 3 is found by adding the two numbers before it (1+2),&lt;br /&gt;And the 5 is (2+3),&lt;br /&gt;and so on!&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The Fibonacci Sequence is the series of numbers:&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...&lt;/blockquote&gt;&lt;br /&gt;&lt;h4&gt;The recurrence relation that defines the Fibonacci numbers is as follows&lt;/h4&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;F(n) = F(n-1) + F(n-2) where&amp;nbsp;  F(0)=0 and  F(1)=1&lt;/blockquote&gt;&lt;br /&gt;&lt;h3&gt;Example : C++ program to generate Fibonacci series up to n number of terms&lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/3e4532d41f8e108044faadbe77a34fca.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h3&gt;Output&lt;/h3&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter the number of terms : 10&lt;br /&gt;Fibonacci Series is&amp;nbsp;&amp;nbsp; 0 1 1 2 3 5 8 13 21 34&lt;/blockquote&gt;&lt;br /&gt;&lt;h3&gt;Example : C++ program to generate Fibonacci sequence up to a certain number&lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/986faae05abe9db090aa85ec08b9b4fd.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h3&gt;Output&lt;/h3&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter a positive number: 100&lt;br /&gt;Fibonacci Series is 0 1 1 2 3 5 8 13 21 34 55 89&lt;/blockquote&gt;&lt;br /&gt;&lt;h3&gt;Example : C++ program to generate Fibonacci sequence up to n number of term recursive programming&lt;/h3&gt;&lt;script src=&quot;https://gist.github.com/achchuthany/67c2f69585814c8e01d5703b04bea84c.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;h3&gt;Output&lt;/h3&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;Enter the number of terms : 5&lt;br /&gt;Fibonacci Series is  0 1 1 2 3&lt;/blockquote&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.achchuthan.lk/feeds/1525319353440210076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-display-fibonacci-series.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/1525319353440210076'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1401059883331742142/posts/default/1525319353440210076'/><link rel='alternate' type='text/html' href='https://blog.achchuthan.lk/2019/11/c-program-to-display-fibonacci-series.html' title='C++ program to display fibonacci series'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_TnAokbQ6ZXAmry34O-42ZblXioSIoL7dL9PCdVz4rjd8pwU1VFA7TihcR2mQ8h8F1TsUVr_eMsTQ5Rxql-2B75agKzb5Y_aVUGzliodxP6tXmMShV1T49cReCF4WRT-2Exh5QmWDODyI/s72-c/CPP%25236.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>