<?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-6309287525669005415</id><updated>2024-11-06T08:31:04.538+05:30</updated><category term="Difference between Html.Partial() and Html.RenderPartial()"/><category term="How To Teach palindrome program in c Like A Pro"/><category term="In c language output screen text color"/><category term="Introduction to c++ language"/><category term="Number searching  program through enum in c"/><category term="Program find next prime number"/><category term="average program in cpp"/><category term="c program fibonacci series using recursion"/><category term="c program for multiplication of two matrices"/><category term="c program pattern 4"/><category term="c program swap two numbers using pointers"/><category term="c program triangle pattern"/><category term="coprime number program"/><category term="default arguments in c++ program"/><category term="define in c"/><category term="factorial program in cpp using function"/><category term="find greater number between three"/><category term="function overloading in c++"/><category term="function overloading sphere and cuboid"/><category term="pattern program in c | pyramid"/><category term="prime number"/><category term="program default arguments in cpp"/><category term="program to calculate simple interest"/><category term="this pointer in c++"/><category term="what is deep copy and shallow copy In C#"/><category term="what is the difference between string and stringbuilder in c#"/><title type='text'>Ancient code</title><subtitle type='html'>&#xa;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/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>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-3732962545686772433</id><published>2023-05-24T00:32:00.006+05:30</published><updated>2023-06-04T20:30:51.857+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="what is the difference between string and stringbuilder in c#"/><title type='text'>What is the difference between string and stringbuilder in c#</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEjI8HuGPEYKdnEHcxIxGa5o2xsR0IVR9lYcwtPZBtgoPEx1abCSg5aVEOt0j1ljZrOUKJMRHRqMZAIvPbq7TMoXkjwL6IhxLHhpvXS3uED-lzOhsqKY_kWoyu2n4TKvLt3i9aakIMrjr1Kg2uLSiR3WrLDP3FGjs8tyaMVnRBc_UbueiBH_ZseDM_4C/s2240/program-in-c-language%20%20(2).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;What is the difference between string and stringbuilder in c#&quot; border=&quot;0&quot; data-original-height=&quot;1260&quot; data-original-width=&quot;2240&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI8HuGPEYKdnEHcxIxGa5o2xsR0IVR9lYcwtPZBtgoPEx1abCSg5aVEOt0j1ljZrOUKJMRHRqMZAIvPbq7TMoXkjwL6IhxLHhpvXS3uED-lzOhsqKY_kWoyu2n4TKvLt3i9aakIMrjr1Kg2uLSiR3WrLDP3FGjs8tyaMVnRBc_UbueiBH_ZseDM_4C/w640-h360/program-in-c-language%20%20(2).png&quot; title=&quot;difference between string and stringbuilder&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In C#, both &lt;b&gt;string&lt;/b&gt; and &lt;b&gt;StringBuilder&lt;/b&gt; are used to work with textual data, but they have different characteristics and are optimized for different scenarios. Here&#39;s an overview of the differences between the two:&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Immutability:&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;String&lt;/b&gt;: In &lt;b&gt;C#&lt;/b&gt;, a string is &lt;b&gt;immutable&lt;/b&gt;, which means that once a string object is created, its value cannot be changed. Any operation that modifies a string actually creates a new string object.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;StringBuilder&lt;/b&gt;: On the other hand, &lt;i&gt;StringBuilder&lt;/i&gt; is mutable, allowing you to modify the contents of the string without creating a new object each time. This can be more efficient when you need to perform multiple modifications on a string.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Performance:&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;String&lt;/b&gt;: Since strings are immutable, performing operations such as concatenation or insertion can be inefficient because they require creating new string objects. In scenarios where you need to perform a large number of string manipulations, the performance can degrade due to memory allocations and object creation.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;StringBuilder&lt;/b&gt;: StringBuilder is designed to address the performance issues associated with frequent string modifications. It provides methods such as Append, Insert, Replace, etc., which modify the underlying string buffer efficiently. By using &lt;i&gt;StringBuilder&lt;/i&gt;, you can avoid unnecessary memory allocations and improve performance.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Usage:&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;String:&lt;/b&gt; string is commonly used when you have a fixed string value or when you need to perform operations that don&#39;t involve frequent modifications, such as string comparisons, searching, or substring extraction. It is also the preferred choice when working with string literals or constants.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;StringBuilder:&lt;/b&gt; StringBuilder is useful when you need to perform frequent modifications on a string, such as building a dynamic string by appending or inserting values in a loop. It is particularly efficient when dealing with large strings or when you concatenate a significant number of smaller strings together.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In summary, if you have a scenario where you need to perform frequent modifications on a string, it is more efficient to use StringBuilder to avoid unnecessary object creation and improve performance. However, for scenarios involving fixed or unchanging strings, or when you need to perform operations that don&#39;t modify the string, using the &lt;b&gt;string&lt;/b&gt; type is sufficient.&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/3732962545686772433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2023/05/string-and-stringbuilder.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3732962545686772433'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3732962545686772433'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2023/05/string-and-stringbuilder.html' title='What is the difference between string and stringbuilder in c#'/><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/AVvXsEjI8HuGPEYKdnEHcxIxGa5o2xsR0IVR9lYcwtPZBtgoPEx1abCSg5aVEOt0j1ljZrOUKJMRHRqMZAIvPbq7TMoXkjwL6IhxLHhpvXS3uED-lzOhsqKY_kWoyu2n4TKvLt3i9aakIMrjr1Kg2uLSiR3WrLDP3FGjs8tyaMVnRBc_UbueiBH_ZseDM_4C/s72-w640-h360-c/program-in-c-language%20%20(2).png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Delhi, India</georss:featurename><georss:point>28.7040592 77.102490199999991</georss:point><georss:box>0.39382536382115418 41.946240199999991 57.014293036178842 112.25874019999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-3428270846837440671</id><published>2023-05-08T21:57:00.009+05:30</published><updated>2023-05-25T19:13:30.159+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="what is deep copy and shallow copy In C#"/><title type='text'>what is deep copy and shallow copy In C#</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question

&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpLS1r9NXhfIXOJ2GftbGYBpblZleyN-13i1WCbAH9w5qmTABf0gzR-H6V_CqxHMNd2ZjPwyzvBNTMBxmjLWTECGP-oilKiCNa1sPKxE469Y9hN_2eFqFADJNKnFMk1tDj_GMCVn48qGONycuoEDppE6fi76pnHbOf1wtJvWGzIpfH1HNJPyqjE-07/s2240/program-in-c-language%20.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;what is deep copy and shallow copy In C#&quot; border=&quot;0&quot; data-original-height=&quot;1260&quot; data-original-width=&quot;2240&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpLS1r9NXhfIXOJ2GftbGYBpblZleyN-13i1WCbAH9w5qmTABf0gzR-H6V_CqxHMNd2ZjPwyzvBNTMBxmjLWTECGP-oilKiCNa1sPKxE469Y9hN_2eFqFADJNKnFMk1tDj_GMCVn48qGONycuoEDppE6fi76pnHbOf1wtJvWGzIpfH1HNJPyqjE-07/w640-h360/program-in-c-language%20.png&quot; title=&quot;Deep Copy Shallow Copy&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In C#, as in other programming languages, you may encounter the terms &quot;deep copy&quot; and &quot;shallow copy&quot; when working with objects and data structures. These two concepts refer to the different ways in which data can be copied from one variable to another. Let&#39;s take a closer look at what deep copy and shallow copy mean in C#, and when to use each one.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Shallow Copy&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;A shallow copy in C# creates a new object but does not create new copies of the objects within the original object. Instead, the new object contains references to the objects in the original object. Therefore, changes made to the original object will also affect the new object, and vice versa.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Here&#39;s an example to illustrate shallow copy in C#:&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; rows=&quot;32&quot; style=&quot;background-color: rgba(0, 0, 0, 0.87); color: #0dc00d;&quot;&gt;            
int[] originalArray = {1, 2, 3};
int[] newArray = (int[])originalArray.Clone();

// modify the original array
originalArray[0] = 5;

// both the original and new arrays have changed
Console.WriteLine(string.Join(&quot;,&quot;, originalArray)); // 5,2,3
Console.WriteLine(string.Join(&quot;,&quot;, newArray)); // 1,2,3

          &lt;/textarea&gt;
  &lt;button onclick=&quot;copyToClipboard(&#39;#p1&#39;)&quot;&gt;Copy&lt;br /&gt;&lt;/button&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;/form&gt;

&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In the example above, originalArray is an array of integers. We make a shallow copy of it using the Clone() method and casting the result to the array type, and store it in newArray. Then, we modify the first element of originalArray. As a result, both originalArray and newArray are updated because they both refer to the same underlying objects.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Deep Copy&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;A deep copy in C# creates a new object and recursively creates new copies of the objects within the original object. In other words, it creates a completely independent copy of the original object, so changes made to the original object will not affect the new object, and vice versa.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Here&#39;s an example to illustrate deep copy in C#:&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; rows=&quot;32&quot; style=&quot;background-color: rgba(0, 0, 0, 0.87); color: #0dc00d;&quot;&gt;            
using System;
using System.Collections.Generic;
using System.Linq;

class Person
{
    public string Name;
    public List&lt;string&gt; Hobbies;
}

class Program
{
    static void Main(string[] args)
    {
        var originalPerson = new Person()
        {
            Name = &quot;John&quot;,
            Hobbies = new List&lt;string&gt;() { &quot;reading&quot;, &quot;running&quot; }
        };

        var newPerson = new Person()
        {
            Name = originalPerson.Name,
            Hobbies = new List&lt;string&gt;(originalPerson.Hobbies)
        };

        // modify the original person
        originalPerson.Name = &quot;Jane&quot;;
        originalPerson.Hobbies.Add(&quot;swimming&quot;);

        // only the original person has changed, the new person remains unchanged
        Console.WriteLine(originalPerson.Name); // Jane
        Console.WriteLine(string.Join(&quot;,&quot;, originalPerson.Hobbies)); // reading,running,swimming
        Console.WriteLine(newPerson.Name); // John
        Console.WriteLine(string.Join(&quot;,&quot;, newPerson.Hobbies)); // reading,running
    }
}

          &lt;/textarea&gt;
  &lt;button onclick=&quot;copyToClipboard(&#39;#p1&#39;)&quot;&gt;Copy&lt;br /&gt;&lt;/button&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;/form&gt;
    
    &lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In the example above, we define a Person class with a name and a list of hobbies. We create a new instance of Person called original Person and initialize its name and hobbies. Then, we create a new instance of Person called newPerson and initialize its name to originalPerson.Name and its hobbies to a new list created from originalPerson.Hobbies. This creates a deep copy of original Person because the new list created from originalPerson.Hobbies is a new object.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Then, we modify the name and hobbies of original Person. As a result, only original Person is updated, and new Person remains unchanged.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;When to Use Shallow Copy and Deep Copy&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Which one you use depends&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/3428270846837440671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2023/05/what-is-deep-copy-and-shallow-copy-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3428270846837440671'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3428270846837440671'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2023/05/what-is-deep-copy-and-shallow-copy-in-c.html' title='what is deep copy and shallow copy In C#'/><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/AVvXsEhpLS1r9NXhfIXOJ2GftbGYBpblZleyN-13i1WCbAH9w5qmTABf0gzR-H6V_CqxHMNd2ZjPwyzvBNTMBxmjLWTECGP-oilKiCNa1sPKxE469Y9hN_2eFqFADJNKnFMk1tDj_GMCVn48qGONycuoEDppE6fi76pnHbOf1wtJvWGzIpfH1HNJPyqjE-07/s72-w640-h360-c/program-in-c-language%20.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Delhi, India</georss:featurename><georss:point>28.7040592 77.102490199999991</georss:point><georss:box>0.39382536382115418 41.946240199999991 57.014293036178842 112.25874019999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-3830318291360717117</id><published>2022-02-05T21:11:00.013+05:30</published><updated>2022-02-05T21:51:43.109+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Difference between Html.Partial() and Html.RenderPartial()"/><title type='text'>8 Things You Don&#39;t Want to Hear About Difference between Html.Partial() and Html.RenderPartial() in ASP.NET MVC</title><content type='html'>&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;


c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;
&lt;h2&gt;Html.Partial()&lt;/h2&gt;

&lt;li&gt;Html.Partial returns html string.&lt;/li&gt;
  
&lt;li&gt;Html.Partial injects the html string of the partial view into the main view.&lt;/li&gt;
&lt;li&gt;Performance is slow.&lt;/li&gt;
&lt;li&gt;Html.Partial() need not to be inside the braces.&lt;/li&gt;

&lt;h2&gt;Html.RenderPartial()&lt;/h2&gt;

&lt;li&gt;Html.RenderPartial returns void.&lt;/li&gt;
&lt;li&gt;Html.RenderPartial writes html in the response stream.&lt;/li&gt;
&lt;li&gt;Perform is faster compared with HtmlPartial().&lt;/li&gt;
&lt;li&gt;Html.RenderPartial must be inside braces @{ }.&lt;/li&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/3830318291360717117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2022/02/8-things-you-dont-want-to-hear-about.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3830318291360717117'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3830318291360717117'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2022/02/8-things-you-dont-want-to-hear-about.html' title='8 Things You Don&#39;t Want to Hear About Difference between Html.Partial() and Html.RenderPartial() in ASP.NET MVC'/><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-2050365011609812689</id><published>2021-06-07T13:22:00.003+05:30</published><updated>2021-06-07T13:25:46.051+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Introduction to c++ language"/><title type='text'>What Is loading program in c language and How Does It Work?</title><content type='html'>&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
  function copyToClipboard(element) {
    var $temp = $(&quot;&lt;input&gt;&quot;);
    $(&quot;body&quot;).append($temp);
    $temp.val($(element).text()).select();
    document.execCommand(&quot;copy&quot;);
    $temp.remove();
  }
&lt;/script&gt;
&lt;style&gt;
  .list1 {
              border-left-color: rgb(255 32 32);
              padding: 10px 10px 10px 20px;
              border-radius: 4px;
              border-left: 5px solid rgb(6, 160, 147);
              box-shadow: rgb(48 163 27) 1px 3px 10px;
              margin: 30px 0px;

          }
&lt;/style&gt;
&lt;style&gt;
  .list3 {

      border-left-color: rgb(255 32 32);
      padding: 10px 10px 10px 20px;
      border-radius: 4px;
      border-left: 5px solid rgb(123, 249, 169);
      box-shadow: rgb(110, 238, 255) 1px 3px 10px;
      margin: 30px 0px;

  }
&lt;/style&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
  &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizU1bVJqTO61ha1-_2t3ea9N3chX4yo61tyaRCkEdUV-BXa3AaMFoSsGpSqYZIziZHW8BzhdZ5rCzTZmdykE0ZTDUKsOIP-pjAbuyr3zSkqCDw6pyteC714o8jcNOwHchKOJku-SoGCys/s0/program-in-c-language+.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;program-in-c-language, c language program login, c language color&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizU1bVJqTO61ha1-_2t3ea9N3chX4yo61tyaRCkEdUV-BXa3AaMFoSsGpSqYZIziZHW8BzhdZ5rCzTZmdykE0ZTDUKsOIP-pjAbuyr3zSkqCDw6pyteC714o8jcNOwHchKOJku-SoGCys/w400-h225/program-in-c-language+.png&quot; title=&quot;program-in-c-language, c language program login, c language color&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;
  In this program, we will learn how to make c language loading program with
  graphical mode.
&lt;/p&gt;

&lt;p&gt;To understand this program, you must have this knowledge:&lt;/p&gt;

&lt;ul class=&quot;list3&quot;&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://users.cs.cf.ac.uk/Dave.Marshall/C/node4.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Basic c&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://www.google.com/search?sxsrf=ALeKk035Zf3axYpbCDIpZXwqJqP0yU20LA%3A1598431008790&amp;amp;source=hp&amp;amp;ei=IB9GX-WULsjf9QPF_ryQBA&amp;amp;q=what+is+c+function&amp;amp;oq=what+is+c+funct&amp;amp;gs_lcp=CgZwc3ktYWIQAxgAMgIIADICCAAyBggAEBYQHjIGCAAQFhAeMgYIABAWEB4yBggAEBYQHjIGCAAQFhAeMgYIABAWEB4yBggAEBYQHjIGCAAQFhAeOgQIIxAnOgUIABCRAjoICAAQsQMQgwE6BQguELEDOgUIABCxAzoHCCMQ6gIQJzoHCC4Q6gIQJzoLCC4QsQMQxwEQowI6AgguOggIABCxAxCRAjoECAAQClDMElizU2C9XGgDcAB4AIAB4wGIAdEWkgEGMC4xNi4ymAEAoAEBqgEHZ3dzLXdperABCg&amp;amp;sclient=psy-ab&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;function&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://www.javatpoint.com/structure-in-c&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;structure&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://www.javatpoint.com/for-loop-in-c&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;loop&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://www.google.com/search?q=ascii+chart&amp;amp;sxsrf=ALeKk03aJSdUHsOJJkLimp80uYu_Jt051g:1623050608093&amp;amp;source=lnms&amp;amp;tbm=isch&amp;amp;sa=X&amp;amp;ved=2ahUKEwi_msrX_oTxAhUUgOYKHfrEByAQ_AUoAXoECAEQAw&amp;amp;biw=1600&amp;amp;bih=757#imgrc=r2mhIpxZORWqBM&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;ascii&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;source code: loading program in c language&lt;/h3&gt;
&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; rows=&quot;32&quot; style=&quot;background-color: rgba(0, 0, 0, 0.87); color: #0dc00d;&quot;&gt;            
            #include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
#include&lt;graphics.h&gt;
#include&lt;dos.h&gt;
#include&lt;stdlib.h&gt;

void LOAD();
struct det input();
void display(struct det);
struct det
{
	char string[50];


       int roll_no;
};
void main()
{
textcolor( LIGHTMAGENTA);
 struct det d2;
 clrscr();

printf(&quot;\t\t\tWelcome ancientcode\n&quot;);
printf(&quot;\t\t\tAncientcode1.blogspot.com\n&quot;);
getch();
textcolor(RED);
d2=input();
clrscr();
LOAD();
textcolor(LIGHTBLUE);
clrscr();
 display(d2);

getch();

}

det input()
{
	struct det d1;
     printf(&quot;\nEnter Your Name:&quot;);
     gets(d1.string);
     printf(&quot;\nEnter Your Roll No:&quot;);
     scanf(&quot;%d&quot;,d1.roll_no);
	return(d1);

}
void display(struct det d)
{


	srand(time(0));
	printf(&quot;\n\n\t\t\tWelcome User\n\n\n\n&quot;);

	printf(&quot;\n   User Id :   %d\n&quot;,rand());
	printf(&quot;   Name      :   %s\n&quot;,d.string);
	printf(&quot;   Roll No   :   %d&quot;,d.roll_no);
}
void LOAD()
{
    _setcursortype(0);
    int j;
    for(j=30;j&lt;=50;j++)
    {
	textbackground(WHITE);
	gotoxy(j,13); cprintf(&quot; &quot;);
    }
    gotoxy(34,14); printf(&quot; LOADING....&quot;);
    textbackground(LIGHTGREEN);
    for(j=30;j&lt;=50;j++)
    {
	gotoxy(j,13);
	cprintf(&quot; &quot;);
	gotoxy(38,13);
	delay(100);
    }
    textbackground(0);
    gotoxy(34,14); printf(&quot; COMPLETED  &quot;);
    gotoxy(27,16); printf(&quot;PRESS ANY KEY TO CONTINUE&quot;);
}


          &lt;/textarea&gt;
  &lt;button onclick=&quot;copyToClipboard(&#39;#p1&#39;)&quot;&gt;Copy&lt;/button&gt;
  &lt;br /&gt;
&lt;/form&gt;
     &lt;br /&gt; &lt;br /&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Remember: if you run this code you have a need to turbo c/c++.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
   Click: &lt;a href=&quot;https://fileswin.com/turbo-c/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Turbo&lt;/a&gt;
    &lt;br /&gt; &lt;br /&gt;
&lt;h3&gt;Recommended Post&lt;/h3&gt;
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;ul class=&quot;list1&quot;&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/define-in-c%20.html&quot;&gt;#define in c&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/palindrome-program-in-c.html&quot;&gt;How To Teach palindrome program in c Like A Pro&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/number-searching-program-through-enum.html&quot;&gt;Number searching program through enum in c&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-for-multiplication-of-two-matrices.html&quot;&gt;c program for multiplication of two matrices&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-fibonacci-series-using-recursion.html&quot;&gt;c program fibonacci series using recursion&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/coprime-number-program.html&quot;&gt;coprime number program&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/08/c-program-swap-two-numbers-using-pointers.html&quot;&gt;c program swap two numbers using pointers&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p style=&quot;font-size: 20px;&quot;&gt;
  Now next you are, write your code in the comment below.😊
&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/2050365011609812689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2021/06/what-is-loading-program-in-c-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/2050365011609812689'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/2050365011609812689'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2021/06/what-is-loading-program-in-c-language.html' title='What Is loading program in c language and How Does It Work?'/><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/AVvXsEizU1bVJqTO61ha1-_2t3ea9N3chX4yo61tyaRCkEdUV-BXa3AaMFoSsGpSqYZIziZHW8BzhdZ5rCzTZmdykE0ZTDUKsOIP-pjAbuyr3zSkqCDw6pyteC714o8jcNOwHchKOJku-SoGCys/s72-w400-h225-c/program-in-c-language+.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-3002495630841374943</id><published>2020-10-14T00:00:00.019+05:30</published><updated>2023-03-16T22:57:21.987+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="How To Teach palindrome program in c Like A Pro"/><title type='text'>How To Teach palindrome program in c Like A Pro</title><content type='html'>  &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;style&gt;
        .mycode,
        var {
            border: 1px solid rgb(44, 190, 0);
            background-color: rgb(75, 78, 122);
            padding: 0px 8px;
            border-radius: 8px;
            font-style: normal;
            font-family: &quot;Droid Sans Mono&quot;, Inconsolata, Menlo, Consolas, &quot;Bitstream Vera Sans Mono&quot;, Courier, monospace;
            display: inline-block;
            font-size: 14px;
            line-height: 20px;
          	color:white;
        }
    &lt;/style&gt;



    &lt;style&gt;
        .list1 {
            border-left-color: rgb(255 32 32);
            padding: 10px 10px 10px 20px;
            border-radius: 4px;
            border-left: 5px solid rgb(6, 160, 147);
            box-shadow: rgb(48 163 27) 1px 3px 10px;
            margin: 30px 0px;

        }
    &lt;/style&gt;
    &lt;style&gt;
        .list3 {

            border-left-color: rgb(255 32 32);
            padding: 10px 10px 10px 20px;
            border-radius: 4px;
            border-left: 5px solid rgb(123, 249, 169);
            box-shadow: rgb(110, 238, 255) 1px 3px 10px;
            margin: 30px 0px;

        }
    &lt;/style&gt;
&lt;style&gt;
        textarea.scrollmenu {
            background-color: #333;
            overflow: auto;
            white-space: nowrap;
            color: #19b819;
            height: 500px;
            width: 500px;
        }
    &lt;/style&gt;



&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgGcVkCqldIto7u-yWorllvMjns0oUTzqEeCJvb9A-DSYQ9rtEum0pTDwUCb8Pl_5NRyiq8De9B_p5qOODweSv38BwxVQ_nEMkUXaOoVsrxd-RRoCTJgj-l2PCqVgMXwNO5AtHqnnsrrQ/s0/palindrome-program-in-c.jpg&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;palindrome program in c&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgGcVkCqldIto7u-yWorllvMjns0oUTzqEeCJvb9A-DSYQ9rtEum0pTDwUCb8Pl_5NRyiq8De9B_p5qOODweSv38BwxVQ_nEMkUXaOoVsrxd-RRoCTJgj-l2PCqVgMXwNO5AtHqnnsrrQ/s16000/palindrome-program-in-c.jpg&quot; title=&quot;palindrome program in c&quot; /&gt;&lt;/a&gt;&lt;/div&gt;






    &lt;p&gt;In this post, we will talk about the &lt;b&gt;palindrome program in c&lt;/b&gt; And we will know. &lt;b&gt;What is a palindrome&lt;/b&gt;? And how to make the Palindrome program.&lt;/p&gt;

    &lt;p&gt;To understand this program, you must have this &lt;b&gt;knowledge:&lt;/b&gt;&lt;/p&gt;
    &lt;ul class=&quot;list1&quot;&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/c-programming&quot;&gt;Basic c&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cprogramming/if_else_statement_in_c.htm&quot;&gt;if-else&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cprogramming/c_loops.htm&quot;&gt;loop&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/c-programming/c-functions&quot;&gt;function&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/c-programming/c-string-examples&quot;&gt;string&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/c-programming/c-pointers&quot;&gt;pointer&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/number-searching-program-through-enum.html&quot;&gt;enum&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;


    &lt;h3&gt;what is Palindrome?&lt;/h3&gt;

&lt;p&gt;In the most simple terms, a &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/palindrome-program-in-c.html&quot;&gt;palindrome&lt;/a&gt; is a word, phrase, or number which reads the same backwards as it does when being read forwards. it does not matter if there are punctuation marks within the &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/palindrome-program-in-c.html&quot;&gt;palindrome&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;these do not count and if they are present, the sequence or word will still fall under the category of the palindrome.&lt;/p&gt;
&lt;p&gt;the word palindrome originally comes from the greek language and is made up of two words, the first being palin which translates to mean again and the second being dromos which translates to mean direction or way.&lt;/p&gt;
&lt;p&gt;the palindrome, when read backwards will have the same pattern, layout, appearance, sound, and meaning. For the use of the palindrome in the &lt;i&gt;English language&lt;/i&gt;, we can thank a man named &lt;i&gt;Ben jonson&lt;/i&gt; who introduced the idea way back in the &lt;i&gt;17th century&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;Palindrome example:&lt;/p&gt;
&lt;pre&gt;    
	stats, madam, wow, 
    level, refer
    191 225522
    222 9955599
&lt;/pre&gt;
   
  &lt;h3&gt;source code: palindrome program in c&lt;/h3&gt;


    

    &lt;textarea class=&quot;scrollmenu&quot;&gt;    
        #include &lt;stdio.h&gt;
            #include &lt;string.h&gt;
            char *Reverse(char *);
            enum String oracle(char*, char* );
            
            enum String
            {
                not_palindrome,
                palindrome
            
            };
            
            int main()
            {
                enum String s1;
                char Rstring[20], Ustring[20], Nstring[20];
            
                printf(&quot;\t\t\tString palindrome Program&quot;);
                printf(&quot;\nEnter your String: &quot;);
                gets(Ustring);
            
                strcpy(Nstring, Ustring);
                strcpy(Rstring, Reverse(Ustring));
            
               s1 = oracle(Nstring, Rstring);
            
                if (s1 == 1)
                    printf(&quot;palindrome:%s&quot;, Rstring);
                else
                    printf(&quot;Not palindrome:%s &quot;, Rstring);
            }
            enum String oracle(char Nstring[], char Rstring[])
            {
                int orange;
                orange=strcmp(Nstring,Rstring);
                if (orange== 0)
                    return (palindrome);
                else
                    return (not_palindrome);
            }
            
            char *Reverse(char *code1)
            {
                int i, l;
                char Ancien_code;
            
                for (l = 1; *(code1 + l); l++);
            
                for (i = 0; i &amp;lt; l / 2; i++)
                {
                    Ancien_code = *(code1 + i);
                    *(code1 + i) = *(code1 + l - 1 - i);
                    *(code1 + l - 1 - i) = Ancien_code;
                }
                return (code1);
            }
  &lt;/textarea&gt;
    &lt;br /&gt;
 
  
  
  
     
    &lt;p&gt;&lt;strong&gt;Output Screen&lt;/strong&gt;&lt;/p&gt;

    &lt;pre class=&quot;list3&quot;&gt;    Enter your String: computer
	Not palindrome:retupmoc 
     
    Enter your String: level
    palindrome:level
    &lt;/pre&gt;

    &lt;h3&gt;Program Logic&lt;/h3&gt;
    
    &lt;p&gt;First, we will take input in an array named &lt;code class=&quot;mycode&quot;&gt;Ustring&lt;/code&gt;.&lt;/p&gt;
    &lt;p&gt;Then we will copy the string in the &lt;code class=&quot;mycode&quot;&gt;Nstring&lt;/code&gt; array with the help of &lt;code class=&quot;mycode&quot;&gt;strcpy&lt;/code&gt; function.&lt;/p&gt;
    &lt;p&gt;Will create another &lt;code class=&quot;mycode&quot;&gt;strcpy&lt;/code&gt; function. &lt;code class=&quot;mycode&quot;&gt;Nstring&lt;/code&gt; and &lt;code class=&quot;mycode&quot;&gt;reverse&lt;/code&gt; function will pass in it. We will pass &lt;code class=&quot;mycode&quot;&gt;Ustring&lt;/code&gt; in reverse function.&lt;/p&gt;
    &lt;p&gt;From here the cursor will go to the definition of the reverse function. In the argument bracket of the reverse function, we will create a pointer named &lt;code class=&quot;mycode&quot;&gt;code1&lt;/code&gt;.&lt;/p&gt;
    &lt;p&gt;Inside the reverse we will make &lt;code class=&quot;mycode&quot;&gt;i&lt;/code&gt; and &lt;code class=&quot;mycode&quot;&gt;l&lt;/code&gt;. And we will create an &lt;code class=&quot;mycode&quot;&gt;ancientcode&lt;/code&gt; variable of type &lt;code class=&quot;mycode&quot;&gt;char&lt;/code&gt;.&lt;/p&gt;
    &lt;p&gt;Then we will put a &lt;code class=&quot;mycode&quot;&gt;loop&lt;/code&gt;. The length of string will be obtained with the help of &lt;code class=&quot;mycode&quot;&gt;l&lt;/code&gt; and &lt;code class=&quot;mycode&quot;&gt;code1&lt;/code&gt;.&lt;/p&gt;
    &lt;p&gt;Put another loop And in that &lt;code class=&quot;mycode&quot;&gt;i&lt;/code&gt; will run till &lt;code class=&quot;mycode&quot;&gt;length/2&lt;/code&gt;.&lt;/p&gt;
    &lt;p&gt;Then inside the loop we will do swapping with the help of pointer. After that function will return value of &lt;code class=&quot;mycode&quot;&gt;code1&lt;/code&gt;. &lt;/p&gt;
    &lt;p&gt;now cursor will move on previous position where reverse function call was made.&lt;/p&gt;
    &lt;p&gt;The reverse function that will return the value. The same will be copied to &lt;code class=&quot;mycode&quot;&gt;Rstring&lt;/code&gt;.&lt;/p&gt;
    &lt;p&gt;We will then call the &lt;code class=&quot;mycode&quot;&gt;Oracle&lt;/code&gt; function. And will pass &lt;code class=&quot;mycode&quot;&gt;Nstring&lt;/code&gt; and &lt;code class=&quot;mycode&quot;&gt;Rstring&lt;/code&gt; in it. The cursor will go to the &lt;code class=&quot;mycode&quot;&gt;oracle&lt;/code&gt; function. Then the code of the Oracle function will be executed.&lt;/p&gt;
    &lt;p&gt;Inside the function, we will create an &lt;code class=&quot;mycode&quot;&gt;orange&lt;/code&gt; variable. we will call the &lt;code class=&quot;mycode&quot;&gt;strcmp&lt;/code&gt; function then will pass &lt;code class=&quot;mycode&quot;&gt;Nstring&lt;/code&gt;, &lt;code class=&quot;mycode&quot;&gt;Rstring&lt;/code&gt;. &lt;code class=&quot;mycode&quot;&gt;strcmp&lt;/code&gt; will return an integer value that will be assigned to a variable named &lt;code class=&quot;mycode&quot;&gt;Orange&lt;/code&gt;.&lt;/p&gt;
    &lt;p&gt;Then we will apply the &lt;code class=&quot;mycode&quot;&gt;if-else&lt;/code&gt; condition. And will check. if &lt;code class=&quot;mycode&quot;&gt;orange&lt;/code&gt; equal to &lt;code class=&quot;mycode&quot;&gt;0&lt;/code&gt; So the return is a &lt;code class=&quot;mycode&quot;&gt;palindrome&lt;/code&gt; variable. Otherwise, return &lt;var class=&quot;mycode&quot;&gt;no_palindrome&lt;/var&gt; variable. Then the Oracle function will return value. that value will be assigned to &lt;var class=&quot;mycode&quot;&gt;s1&lt;/var&gt;.&lt;/p&gt;
    &lt;p&gt;Here we will once again apply the &lt;code class=&quot;mycode&quot;&gt;if-else&lt;/code&gt; condition. if &lt;code class=&quot;mycode&quot;&gt;s1&lt;/code&gt; equal to &lt;code class=&quot;mycode&quot;&gt;1&lt;/code&gt;. So the string is a &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/palindrome-program-in-c.html&quot;&gt;palindrome&lt;/a&gt;. Otherwise, there is no palindrome.&lt;/p&gt;


    &lt;h3&gt;Recommended Post&lt;/h3&gt;
    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
    &lt;ul class=&quot;list1&quot;&gt;
        &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/define-in-c%20.html&quot;&gt;#define in c&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/number-searching-program-through-enum.html&quot;&gt;Number
                searching program through enum in c&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-for-multiplication-of-two-matrices.html&quot;&gt;c
                program for multiplication of two matrices&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-fibonacci-series-using-recursion.html&quot;&gt;c
                program fibonacci series using recursion&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/coprime-number-program.html&quot;&gt;coprime number program&lt;/a&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/08/c-program-swap-two-numbers-using-pointers.html&quot;&gt;c program
                swap two numbers using pointers&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;



&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
    &lt;br /&gt;&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
    &lt;p style=&quot;font-size: 20px;&quot;&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/3002495630841374943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/10/palindrome-program-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3002495630841374943'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3002495630841374943'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/10/palindrome-program-in-c.html' title='How To Teach palindrome program in c Like A Pro'/><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/AVvXsEhgGcVkCqldIto7u-yWorllvMjns0oUTzqEeCJvb9A-DSYQ9rtEum0pTDwUCb8Pl_5NRyiq8De9B_p5qOODweSv38BwxVQ_nEMkUXaOoVsrxd-RRoCTJgj-l2PCqVgMXwNO5AtHqnnsrrQ/s72-c/palindrome-program-in-c.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-7663554079125305452</id><published>2020-10-10T00:27:00.011+05:30</published><updated>2023-03-16T23:13:16.543+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="define in c"/><title type='text'>Here&#39;s A Quick Way To Solve A Problem with #define in c </title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;
&lt;style&gt;
        .mycode,
        var {
            border: 1px solid rgb(44, 190, 0);
            background-color: rgb(75, 78, 122);
            padding: 0px 8px;
            border-radius: 8px;
            font-style: normal;
            font-family: &quot;Droid Sans Mono&quot;, Inconsolata, Menlo, Consolas, &quot;Bitstream Vera Sans Mono&quot;, Courier, monospace;
            display: inline-block;
            font-size: 14px;
            line-height: 20px;
          color:white;
        }
    &lt;/style&gt;



    &lt;style&gt;
        .list1 {
            border-left-color: rgb(255 32 32);
            padding: 10px 10px 10px 20px;
            border-radius: 4px;
            border-left: 5px solid rgb(6, 160, 147);
            box-shadow: rgb(48 163 27) 1px 3px 10px;
            margin: 30px 0px;

        }
    &lt;/style&gt;
    &lt;style&gt;
        .list3 {
          
            border-left-color: rgb(255 32 32);
            padding: 10px 10px 10px 20px;
            border-radius: 4px;
            border-left: 5px solid rgb(123, 249, 169);
            box-shadow: rgb(110, 238, 255) 1px 3px 10px;
            margin: 30px 0px;

        }
    &lt;/style&gt;



&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz6YXi36kTC8OhBUiOTQ5wIKPLEXTP40wqtmHHq7LcCZaECHTltPhT40jYNE0hSTix9KsHhf65cSieD5yN7hc5g_Aa21l2Bc-qKt-TrwlBqa6fQVMZtjYc8IlDo9bD7lR-Pl6uVXOO_cs/s0/%2523define-in-c.jpg&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;#define in c, define in c, macros in c, define c language, #define in c program&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz6YXi36kTC8OhBUiOTQ5wIKPLEXTP40wqtmHHq7LcCZaECHTltPhT40jYNE0hSTix9KsHhf65cSieD5yN7hc5g_Aa21l2Bc-qKt-TrwlBqa6fQVMZtjYc8IlDo9bD7lR-Pl6uVXOO_cs/s16000/%2523define-in-c.jpg&quot; title=&quot;#define in c, define in c, macros in c, define c language, #define in c program&quot; /&gt;&lt;/a&gt;&lt;/div&gt;



&lt;p&gt;In this post, we will teach you what is &lt;b&gt;#define in c&lt;/b&gt; and how it is work. &lt;b&gt;#define in c&lt;/b&gt; is a very simple topic so
        we telling this topic.&lt;/p&gt;

    &lt;p&gt;To understand this program, you must have this &lt;b&gt;knowledge:&lt;/b&gt;&lt;/p&gt;
    &lt;ul class=&quot;list1&quot;&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/c-programming&quot;&gt;Basic c&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;


    &lt;h3&gt;what is #define in c?&lt;/h3&gt;

    &lt;p&gt;a macro is an &lt;a href=&quot;https://www.programiz.com/c-programming/c-keywords-identifier&quot; target=&quot;_blank&quot;&gt;identifier&lt;/a&gt; defined in a #define &lt;b&gt;preprocessor directive&lt;/b&gt;.&lt;/p&gt;
    &lt;p&gt;the &lt;i&gt;#define directive&lt;/i&gt; defines an identifier and a character sequence a set of characters that will be substituted for the identifier each time it is encountered in the source file.&lt;/p&gt;

    &lt;p&gt;the identifier is referred to as a macro name and the replacement process as macro replacement.&lt;/p&gt;
    &lt;p&gt;as with &lt;b&gt;symbolic constants&lt;/b&gt;, the macro &lt;a href=&quot;https://www.programiz.com/c-programming/c-keywords-identifier&quot; target=&quot;_blank&quot;&gt;identifier&lt;/a&gt; is replaced in the program with the replacement text before the program is compiled.&lt;/p&gt;
    &lt;p&gt; macros may be defined with or without &lt;i&gt;arguments&lt;/i&gt;.&lt;/p&gt;
    &lt;p&gt;a macro without arguments is processed like a symbolic constant.&lt;/p&gt;
    &lt;p&gt;In a macro with arguments, the arguments are substituted in the replacement text, then the macro is expanded.&lt;/p&gt;

    &lt;h3&gt;source code: program simple Interest with #define in c&lt;/h3&gt;
    &lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
        &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.7002197390077278&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;      #include &lt;stdio.h&gt;
      #define Intrest(p, r, t) (p * r * t) / 100
      
          void
          main()
      {
        int pri, rate, time;
        float Si;
        printf(&quot;Enter pri,rate,time: &quot;);
        scanf(&quot;%d%d%d&quot;, &amp;pri, &amp;rate, &amp;time);
        printf(&quot;\nIntrest: %1.4f&quot;, Si = Intrest(pri, rate, time));
        printf(&quot;\nYour simple Intrest is: %1.4f&quot;, pri + Si);
          return 0;
      }
      
       
      
      &lt;/textarea&gt;
        &lt;br /&gt;
    &lt;/form&gt;
    &lt;p&gt;&lt;strong&gt;Output Screen&lt;/strong&gt;&lt;/p&gt;

&lt;pre class=&quot;list3&quot;&gt;    
Enter pri, rate, time : 5000 10 1

Intrest : 500.0000 
Your simple Intrest is : 5500.0000
&lt;/pre&gt;

&lt;h3&gt;Program Logic&lt;/h3&gt;
&lt;p&gt;We will include &lt;code class=&quot;mycode&quot;&gt;#define&lt;/code&gt; as a &lt;i&gt;header file&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;We just have to write &lt;code class=&quot;mycode&quot;&gt;#define&lt;/code&gt;. Then the name of the macro and the character-sequences.&lt;/p&gt;
&lt;p&gt;We just have to take input from the user. whose macro we created. Have to pass the value in it. The macro will calculate and give the result.&lt;/p&gt;


    &lt;h3&gt;Recommended Post&lt;/h3&gt;
      &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;ul class=&quot;list1&quot;&gt;
    &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/number-searching-program-through-enum.html&quot;&gt;Number searching program through enum in c&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-for-multiplication-of-two-matrices.html&quot;&gt;c program for multiplication of two matrices&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-fibonacci-series-using-recursion.html&quot;&gt;c program fibonacci series using recursion&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/coprime-number-program.html&quot;&gt;coprime number program&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/08/c-program-swap-two-numbers-using-pointers.html&quot;&gt;c program swap two numbers using pointers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; 
      
      
&lt;br/&gt;&lt;br/&gt;

    &lt;br /&gt;&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
    &lt;p style=&quot;font-size: 20px;&quot;&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/7663554079125305452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/10/define-in-c .html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/7663554079125305452'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/7663554079125305452'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/10/define-in-c .html' title='Here&#39;s A Quick Way To Solve A Problem with #define in c '/><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/AVvXsEiz6YXi36kTC8OhBUiOTQ5wIKPLEXTP40wqtmHHq7LcCZaECHTltPhT40jYNE0hSTix9KsHhf65cSieD5yN7hc5g_Aa21l2Bc-qKt-TrwlBqa6fQVMZtjYc8IlDo9bD7lR-Pl6uVXOO_cs/s72-c/%2523define-in-c.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-4128181534895816684</id><published>2020-10-08T22:44:00.021+05:30</published><updated>2021-01-20T11:44:59.575+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="In c language output screen text color"/><title type='text'>In c language output screen text color</title><content type='html'>
 &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;
&lt;style&gt;
        .list1 {
            border-left-color: rgb(255 32 32);
            padding: 10px 10px 10px 20px;
            border-radius: 4px;
            border-left: 5px solid rgb(6, 180, 147);
            box-shadow: rgb(48 210 27) 1px 3px 10px;
            margin: 30px 0px;

        }
    &lt;/style&gt;

&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;

c/c++ program solver,c++ program, new program, program code ,programing question



&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In this program, we are telling this. How to change the text color of the output screen.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;



&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;pre&gt;
   &lt;code cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.4054689941309695&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;
   
  #include&lt;stdio.h&gt;
#include&lt;windows.h&gt;
int main()
{
    int i;
    for(i=0;i&lt;15;i++){
      SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),i);
    printf(&quot;hello world\n&quot;,i);
    }
 
}
                 
&lt;/code&gt;
&lt;/pre&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Output Screen&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/form&gt;

 &lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBO0gzTiw8dFND87FoDxw2ulI6aZP6Zxomwkk-ogz0iAUspgO7X47PgUrDRkfKBR1DzZUrLnYbmcmYGn1vEE4vcq3kvO80plj0FJuEaSsauX0y9KPloMNj2VqKnmFuA0KdY7g2rG0WpY4/s0/c-language-text-color.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;c language text color, c language color&quot; border=&quot;0&quot; data-original-height=&quot;392&quot; data-original-width=&quot;1514&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBO0gzTiw8dFND87FoDxw2ulI6aZP6Zxomwkk-ogz0iAUspgO7X47PgUrDRkfKBR1DzZUrLnYbmcmYGn1vEE4vcq3kvO80plj0FJuEaSsauX0y9KPloMNj2VqKnmFuA0KdY7g2rG0WpY4/s16000/c-language-text-color.png&quot; title=&quot;c language text color, c language color&quot; /&gt;&lt;/a&gt;&lt;/div&gt;   
    &lt;br /&gt;    &lt;br /&gt;    &lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Recommended Post&lt;/span&gt;&lt;/b&gt;
    
    &lt;br /&gt;  &lt;br /&gt;
    &lt;pre class=&quot;list1&quot;&gt;    		   
     &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-for-multiplication-of-two-matrices.html&quot;&gt;c program for multiplication of two matrices&lt;/a&gt;
     &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-fibonacci-series-using-recursion.html&quot;&gt;c program fibonacci series using recursion&lt;/a&gt;
     &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/coprime-number-program.html&quot;&gt;coprime number program&lt;/a&gt;
     &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/08/c-program-swap-two-numbers-using-pointers.html&quot;&gt;c program swap two numbers using pointers&lt;/a&gt;
    &lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;  &lt;br /&gt;  </content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/4128181534895816684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/10/in-c-language-output-screen-text-color.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/4128181534895816684'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/4128181534895816684'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/10/in-c-language-output-screen-text-color.html' title='In c language output screen text color'/><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/AVvXsEiBO0gzTiw8dFND87FoDxw2ulI6aZP6Zxomwkk-ogz0iAUspgO7X47PgUrDRkfKBR1DzZUrLnYbmcmYGn1vEE4vcq3kvO80plj0FJuEaSsauX0y9KPloMNj2VqKnmFuA0KdY7g2rG0WpY4/s72-c/c-language-text-color.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-712248570303867634</id><published>2020-10-08T21:46:00.003+05:30</published><updated>2023-03-16T23:13:56.727+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Number searching  program through enum in c"/><title type='text'>Number searching  program through enum in c</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;style&gt;
        .mycode,var {
     border: 1px solid rgb(44, 190, 0);
     background-color: rgb(75, 78, 122);
     padding: 0px 8px;
     border-radius: 8px;
     font-style: normal;
     font-family: &quot;Droid Sans Mono&quot;, Inconsolata, Menlo, Consolas, &quot;Bitstream Vera Sans Mono&quot;, Courier, monospace;
     display: inline-block;
     font-size: 14px;
     line-height: 20px;
          color:white;
 }
     &lt;/style&gt;
 
 
 
 &lt;style&gt;
         .list1 {
             border-left-color: rgb(255 32 32);
             padding: 10px 10px 10px 20px;
             border-radius: 4px;
             border-left: 5px solid rgb(6, 160, 147);
             box-shadow: rgb(48 163 27) 1px 3px 10px;
             margin: 30px 0px;
 
         }
     &lt;/style&gt;

&lt;style&gt;
    .list2 {
        border-left-color: rgb(255 32 32);
        padding: 10px 10px 10px 20px;
        border-radius: 4px;
        border-left: 5px solid rgb(27, 68, 201);
        box-shadow: rgb(13, 157, 253) 1px 3px 10px;
        margin: 30px 0px;

    }
&lt;/style&gt;

&lt;style&gt;
    .list3 {
        border-left-color: rgb(255 32 32);
        padding: 10px 10px 10px 20px;
        border-radius: 4px;
        border-left: 5px solid rgb(123, 249, 169);
        box-shadow: rgb(110, 238, 255) 1px 3px 10px;
        margin: 30px 0px;

    }
&lt;/style&gt;




&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyO1xajTxfDaSVu7SakHcg33bXxUAwbxyazjKzXPhjvws2RcdnKj2hYb9hQABsPk9tRoWL2FTiWpv5DVIN1YFNyNK8ZBAbmKdo7CWOSYjndyx9bD4zlfpVBCqETeK5EZAtkVjZAf_GmnE/s0/enum-in-c.jpg&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyO1xajTxfDaSVu7SakHcg33bXxUAwbxyazjKzXPhjvws2RcdnKj2hYb9hQABsPk9tRoWL2FTiWpv5DVIN1YFNyNK8ZBAbmKdo7CWOSYjndyx9bD4zlfpVBCqETeK5EZAtkVjZAf_GmnE/s0/enum-in-c.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;



 &lt;p&gt;In this post, we will create a &lt;b&gt;search program&lt;/b&gt; with the help of enum. This is a very simple and easy method for creating number &lt;b&gt;search program&lt;/b&gt; and We will learn &lt;i&gt;what is enumerator&lt;/i&gt;. What is its use in c language? how the enumerator is implemented in the program.&lt;/p&gt;

    &lt;p&gt;To understand this program, you must have this knowledge:&lt;/p&gt;
    &lt;ul class=&quot;list1&quot;&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/c-programming&quot;&gt;Basic c&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/c-programming/c-if-else-statement&quot;&gt;if-else&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/c-programming/c-for-loop&quot;&gt;loop&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/c-programming/c-functions&quot;&gt;function&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;h3&gt;what is enumerator?&lt;/h3&gt;
    &lt;ol&gt;

    &lt;li&gt;It gives an opportunity to invent own &lt;i&gt;data type&lt;/i&gt; and define what values the variable of this data type can take.&lt;/li&gt;

    
        &lt;pre class=&quot;list2&quot;&gt;            enum month 
            {
                sun, mon, tue, wed, thu, fri, sat
            };
            
            
            main()
            {
                enum week we1,we2;
            }  
        &lt;/pre&gt;
      

      &lt;li&gt;each value on the list of permissible values corresponds to an &lt;i&gt;integer&lt;/i&gt;, starting with 0. In the example sun is stored as 0, mon is stored as 1 ........, sat is stored as 6.&lt;/li&gt;

        &lt;li&gt;you can manually assign value in enum&lt;/li&gt;

        &lt;pre class=&quot;list2&quot;&gt;            enum month 
            {
             sun=1, tue=4, fri=5
            };
        &lt;/pre&gt;

        &lt;li&gt;we can initialize enumerators with different &lt;i&gt;integer values&lt;/i&gt;.&lt;/li&gt;

        &lt;li&gt;you can write any &lt;b&gt;program in c&lt;/b&gt; language without the help of enumerations but enumerations helps in writing clear codes and simplify programming&lt;/li&gt;
    &lt;/ol&gt;

        &lt;p&gt;Now, let us go to the example enum program.&lt;/p&gt;

        &lt;h3&gt;Source code: enum in c program&lt;/h3&gt;


        &lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
            &lt;textarea autocomplete=&quot;off&quot; cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.3121410345323903&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;            
                #include&lt;stdio.h&gt;
                    enum search Ncheck(int,int,int );
                    
                    enum search
                    {
                       not_found,found
                    
                    };
                    
                    int main()
                    {
                       int n,R,maxR;
                    enum search Fnumber;
                       printf(&quot;\t\tNumber Search program&quot;);
                       printf(&quot;\n\nEnter range number: &quot;);
                       scanf(&quot;%d%d&quot;,&amp;R,&amp;maxR);
                       
                       printf(&quot;\n\n\nSearch your number: &quot;);
                       
                       scanf(&quot;%d&quot;,&amp;n);
                    
                        Fnumber=Ncheck(n,R,maxR);
                        if(Fnumber==1)
                        {
                            printf(&quot;\nNumber is found: %d&quot;,n);
                        }
                        else
                        {
                            printf(&quot;Number is not found: %d&quot;,n);
                        }
                    }
                    enum search Ncheck(int n,int R, int maxR)
                    {
                        int i;
                        for(i=R;i&lt;=maxR;i++)
                        {
                            if(n==i)
                            {
                    
                                return(found);
                            } 
                        }
                     return(not_found);
                    }
          &lt;/textarea&gt;
            &lt;br /&gt;
          &lt;/form&gt;


          &lt;p&gt;&lt;strong&gt;Output Screen&lt;/strong&gt;&lt;/p&gt;

          &lt;pre class=&quot;list3&quot;&gt;            Enter range number: 12
            99
            
            Search your number: 55
            Number is found: 55
            
            Enter range number: 1
            10

            Search your number: 15
            Number is not found: 15

          &lt;/pre&gt;

          &lt;h3&gt;Program Logic&lt;/h3&gt;

          &lt;p&gt;First of all we are taking two inputs from the user. In the variable &lt;var class=&quot;mycode&quot;&gt;R&lt;/var&gt; and &lt;var class=&quot;mycode&quot;&gt;maxR&lt;/var&gt;&lt;/p&gt;
          &lt;p&gt;So that we know the &lt;i&gt;range &lt;/i&gt;of numbers.&lt;/p&gt;
          &lt;p&gt;After that, those numbers will be input. Which to find in that range.&lt;/p&gt;
          &lt;p&gt;Then we will call the &lt;code class=&quot;mycode&quot;&gt;Ncheck&lt;/code&gt; function. And pass &lt;var class=&quot;mycode&quot;&gt;n&lt;/var&gt;, &lt;var class=&quot;mycode&quot;&gt;R&lt;/var&gt;, &lt;var class=&quot;mycode&quot;&gt;maxR&lt;/var&gt;.&lt;/p&gt;
          &lt;p&gt;Inside the &lt;code class=&quot;mycode&quot;&gt;Ncheck&lt;/code&gt; function we will place a &lt;code class=&quot;mycode&quot;&gt;loop&lt;/code&gt;. Then we will assign &lt;var class=&quot;mycode&quot;&gt;R&lt;/var&gt; inside &lt;var class=&quot;mycode&quot;&gt;i&lt;/var&gt; and &lt;code class=&quot;mycode&quot;&gt;i&amp;lt;=maxR&lt;/code&gt;.&lt;/p&gt;
          &lt;p&gt;Inside the loop, we will check through the &lt;code class=&quot;mycode&quot;&gt;if&lt;/code&gt; condition. If the condition of &lt;code class=&quot;mycode&quot;&gt;n==i&lt;/code&gt; is true, then &lt;code class=&quot;mycode&quot;&gt;return&lt;/code&gt;. &lt;var class=&quot;mycode&quot;&gt;Found&lt;/var&gt; variable&lt;/p&gt;
          &lt;p&gt;If the condition is false. So the loop is complete. And then &lt;code class=&quot;mycode&quot;&gt;return&lt;/code&gt;. &lt;var class=&quot;mycode&quot;&gt;not_found&lt;/var&gt; variable&lt;/p&gt;
          &lt;p&gt;&lt;code class=&quot;mycode&quot;&gt;Ncheck&lt;/code&gt; will return the function value from here. Which will be assigned to a variable named &lt;var class=&quot;mycode&quot;&gt;Fnumber&lt;/var&gt;.&lt;/p&gt;
          &lt;p&gt;Then we will apply the &lt;code class=&quot;mycode&quot;&gt;if-else&lt;/code&gt; condition. And will check. What condition is true if &lt;code class=&quot;mycode&quot;&gt;Fnumber==1&lt;/code&gt;. So we have got the number. The othervice condition is false. Not received&lt;/p&gt;

          &lt;h3&gt;Recomonded Post&lt;/h3&gt;
              &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
          &lt;pre class=&quot;list1&quot;&gt;              &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-for-multiplication-of-two-matrices.html&quot;&gt;c program for multiplication of two matrices&lt;/a&gt;
              &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-fibonacci-series-using-recursion.html&quot;&gt;c program fibonacci series using recursion&lt;/a&gt;
              &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/10/coprime-number-program.html&quot;&gt;coprime number program&lt;/a&gt;
              &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/08/c-program-swap-two-numbers-using-pointers.html&quot;&gt;c program swap two numbers using pointers&lt;/a&gt;
          &lt;/pre&gt;


          &lt;br /&gt;&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p style=&quot;font-size: 20px;&quot;&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/712248570303867634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/10/number-searching-program-through-enum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/712248570303867634'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/712248570303867634'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/10/number-searching-program-through-enum.html' title='Number searching  program through enum in c'/><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/AVvXsEgyO1xajTxfDaSVu7SakHcg33bXxUAwbxyazjKzXPhjvws2RcdnKj2hYb9hQABsPk9tRoWL2FTiWpv5DVIN1YFNyNK8ZBAbmKdo7CWOSYjndyx9bD4zlfpVBCqETeK5EZAtkVjZAf_GmnE/s72-c/enum-in-c.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-7361531514952748964</id><published>2020-10-06T19:15:00.001+05:30</published><updated>2021-01-20T11:44:30.689+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="coprime number program"/><title type='text'>coprime number program</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;style&gt;
       .mycode{
    border: 1px solid rgb(44, 190, 0);
    background-color: rgb(75, 78, 122);
    padding: 0px 8px;
    border-radius: 8px;
    font-style: normal;
    font-family: &quot;Droid Sans Mono&quot;, Inconsolata, Menlo, Consolas, &quot;Bitstream Vera Sans Mono&quot;, Courier, monospace;
    display: inline-block;
    font-size: 14px;
    line-height: 20px;
}
    &lt;/style&gt;




&lt;style&gt;
        .list1 {
            border-left-color: rgb(255 32 32);
            padding: 10px 10px 10px 20px;
            border-radius: 4px;
            border-left: 5px solid rgb(8, 233, 214);
            box-shadow: rgb(85, 216, 62) 1px 3px 10px;
            margin: 30px 0px;

        }
    &lt;/style&gt;

&lt;style&gt;
    .list2 {
        border-left-color: rgb(255 32 32);
        padding: 10px 10px 10px 20px;
        border-radius: 4px;
        border-left: 5px solid rgb(16, 0, 240);
        box-shadow: rgb(16, 0, 240) 1px 3px 10px;
        margin: 30px 0px;

    }
&lt;/style&gt;






&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_pW69jRXP7x-BySjJFSaMx1-IntdJfP68sNtYVuhgMemhGP1ZmtHqVkN_JK7rR7qQ_BB6GZiE0kvf66MbOLsekmho9rpfproDg5wyzkdYw-rclMDOhLThlXtogSOKnEH1ukM8LApFjRE/s0/coprime-number-program.jpg&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;coprime number program&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_pW69jRXP7x-BySjJFSaMx1-IntdJfP68sNtYVuhgMemhGP1ZmtHqVkN_JK7rR7qQ_BB6GZiE0kvf66MbOLsekmho9rpfproDg5wyzkdYw-rclMDOhLThlXtogSOKnEH1ukM8LApFjRE/s16000/coprime-number-program.jpg&quot; title=&quot;coprime number program&quot; /&gt;&lt;/a&gt;&lt;/div&gt;



&lt;p&gt;In this program, we will discuss the program of &lt;b&gt;co-prime numbers&lt;/b&gt;. &lt;i&gt;What are co-prime numbers&lt;/i&gt;? How to make co-prime number program.&lt;/p&gt;

&lt;p&gt;To understand this program, you must have this knowledge:&lt;/p&gt;
&lt;ul class=&quot;list2&quot;&gt;
    &lt;li&gt;&lt;a href=&quot;https://www.geeksforgeeks.org/c-language-set-1-introduction/&quot; target=&quot;_blank&quot;&gt;basic c&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;https://fresh2refresh.com/c-programming/c-decision-control/&quot; target=&quot;_blank&quot;&gt;if-else&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;https://www.javatpoint.com/for-loop-in-c&quot; target=&quot;_blank&quot;&gt;loop&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;what is coprime number?&lt;/h3&gt;
&lt;p&gt;A set of numbers which do not any other &lt;b&gt;common factor&lt;/b&gt; other than 1 are called &lt;i&gt;co-prime numbers&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;This means those numbers whose HCF is 1.&lt;/p&gt;
&lt;p&gt;For example, 7 and 11 no other &lt;b&gt;common factor&lt;/b&gt; other than 1 so they are &lt;b&gt;coprime numbers&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;if more information &lt;/p&gt;
&lt;button&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Coprime_integers#:~:text=In%20number%20theory%2C%20two%20integers,divisor%20(gcd)%20being%201.&quot; rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot;&gt;Click&lt;/a&gt;&lt;/button&gt;
 &lt;br /&gt;
 &lt;p&gt;Now, let us go to the program.&lt;/p&gt;


  
  
&lt;br /&gt;
    &lt;h3&gt;Source code: coprime number program&lt;/h3&gt;&lt;br /&gt;
    &lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
        &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.10899677834127441&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;            
            #include&lt;stdio.h&gt;
                void main()
                {
                    int n,a,i,b,big;
                    printf(&quot;Enter two number: &quot;);
                    scanf(&quot;%d%d&quot;,&amp;a,&amp;b);
                    if(a==b)
                    {
                        printf(&quot;these number are not co prime number: %d %d&quot;,a,b);
                    }
                    else
                    {
                        big=a&gt;b?a:b;
                        for(i=2;i&lt;big;i++)
                        {
                            if(a%i==0&amp;&amp;b%i==0)
                            {
                                break;
                            }
                            
                        }
                        if(i==big)
                        {
                            printf(&quot;%d and %d are coprime number&quot;,a,b);
                        }
                        else
                        {
                            printf(&quot;these number are not coprime number:%d %d&quot;,a,b);
                        }
                    }
                    
                    
                }
            &lt;/textarea&gt;
            &lt;br /&gt;
        &lt;/form&gt;
        
        &lt;p&gt;&lt;strong&gt;Output Screen&lt;/strong&gt;&lt;/p&gt;
        
        &lt;pre class=&quot;list1&quot;&gt; 
            Enter two number: 8
            6
            8,6 are not coprimes
            Enter two number:7
            11
            7,11 are coprimes
        &lt;/pre&gt;

    &lt;h3&gt;Program logic&lt;/h3&gt; 
    &lt;p&gt;First of all, we will take two inputs from the user. Then we will assign it to the variables named&lt;var class=&quot;mycode&quot;&gt;a&lt;/var&gt;and &lt;var class=&quot;mycode&quot;&gt;b&lt;/var&gt;.&lt;/p&gt;

    &lt;p&gt;After that, we will apply the &lt;code class=&quot;mycode&quot;&gt;if-else&lt;/code&gt; condition. And will put the expression in the &lt;code class=&quot;mycode&quot;&gt;if&lt;/code&gt; condition or if the condition of &lt;var class=&quot;mycode&quot;&gt;a==b&lt;/var&gt; is true. So both these numbers are not &lt;b&gt;coprime&lt;/b&gt;. If false. Then you will move on the &lt;code class=&quot;mycode&quot;&gt;else&lt;/code&gt; block.&lt;/p&gt;

&lt;p&gt;In the body of &lt;code class=&quot;mycode&quot;&gt;else&lt;/code&gt;, we will use the &lt;b&gt;conditional operator&lt;/b&gt;. Will check both of these. Which is the bigger number? Which is bigger. It will be assigned to a variable named &lt;var class=&quot;mycode&quot;&gt;big&lt;/var&gt;.&lt;/p&gt;
&lt;p&gt;Then we will apply a loop. In which &lt;var class=&quot;mycode&quot;&gt;i&lt;/var&gt; will start the value from 2. And from &lt;code class=&quot;mycode&quot;&gt;i&amp;lt;big&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Inside the loop, we will apply the &lt;code class=&quot;mycode&quot;&gt;if&lt;/code&gt; condition. If that condition is true. So the &lt;code class=&quot;mycode&quot;&gt;break&lt;/code&gt; keyword goes. And move out of the cursor loop. And move to the next line. If the condition is not true. So the loop is complete. And then the next line has come.&lt;/p&gt;
&lt;p&gt;Once again we will apply the &lt;code class=&quot;mycode&quot;&gt;if-else&lt;/code&gt; condition. And will check &lt;var class=&quot;mycode&quot;&gt;i==big&lt;/var&gt;. If there is. So &lt;var class=&quot;mycode&quot;&gt;a&lt;/var&gt; and &lt;var class=&quot;mycode&quot;&gt;b&lt;/var&gt; are &lt;b&gt;coprime numbers&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;If the value of &lt;var class=&quot;mycode&quot;&gt;i&lt;/var&gt; is not equal to &lt;var class=&quot;mycode&quot;&gt;big&lt;/var&gt;. So both &lt;i&gt;numbers are not coprime&lt;/i&gt;.&lt;/p&gt;

        &lt;h3&gt;Recomonded Post&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
        &lt;div class=&quot;list2&quot;&gt;
        &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/function-overloading-sphere-and-cuboid%20.html&quot;&gt;function overloading sphere and cuboid&lt;/a&gt;&lt;br /&gt;
        &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/program-find-next-prime-number.html&quot;&gt;Program find next prime number&lt;/a&gt;&lt;br /&gt;
        &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/explain-function-overloading-with.html&quot;&gt;function overloading in c++&lt;/a&gt;&lt;br /&gt;
        &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/make-hcf-program-with-help-of-default.html&quot;&gt;HCF program default arguments in cpp&lt;/a&gt;&lt;br /&gt;
        &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/04/this-pointer-in-cpp.html&quot;&gt;This pointer in cpp&lt;/a&gt;
    &lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;
    &lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p style=&quot;font-size: 20px;&quot;&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/7361531514952748964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/10/coprime-number-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/7361531514952748964'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/7361531514952748964'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/10/coprime-number-program.html' title='coprime number program'/><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_pW69jRXP7x-BySjJFSaMx1-IntdJfP68sNtYVuhgMemhGP1ZmtHqVkN_JK7rR7qQ_BB6GZiE0kvf66MbOLsekmho9rpfproDg5wyzkdYw-rclMDOhLThlXtogSOKnEH1ukM8LApFjRE/s72-c/coprime-number-program.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-9003852345135108467</id><published>2020-09-29T22:15:00.346+05:30</published><updated>2021-01-20T11:44:04.314+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="function overloading in c++"/><title type='text'>The Ultimate Secret Of function overloading in c++</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;div&gt;
  &lt;style&gt;
       .mycode,var {
    border: 1px solid rgb(44, 190, 0);
    background-color: rgb(75, 78, 122);
    padding: 0px 8px;
    border-radius: 8px;
    font-style: normal;
    font-family: &quot;Droid Sans Mono&quot;, Inconsolata, Menlo, Consolas, &quot;Bitstream Vera Sans Mono&quot;, Courier, monospace;
    display: inline-block;
    font-size: 14px;
    line-height: 20px;
}
    &lt;/style&gt;
  &lt;style&gt;
        .list1 {
            border-left-color: rgb(255 32 32);
            padding: 10px 10px 10px 20px;
            border-radius: 4px;
            border-left: 5px solid rgb(6, 160, 147);
            box-shadow: rgb(48 163 27) 1px 3px 10px;
            margin: 30px 0px;

        }
    &lt;/style&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img alt=&quot;function overloading c++, compile-time polymorphism, function overloading flow&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAa-xr0o3hVNqu4bMkshmwwdQqq8OkqYOOqjyVJRstdn7DouqQ295GPmoeSzZX3hKuLysPalgH2u0lYY8sL1la42Mhmc6bpPCXjIjYmI6ll1bDphDT_jIPQiFb5dTeGr2Sofbuv-WDXyw/s16000/explain-function-overloading-with-example.jpg&quot; title=&quot;function overloading c++, compile-time polymorphism, function overloading flow&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;How to write &lt;b&gt;function overloading program in c++&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Explain &lt;b&gt;function overloading in c++&lt;/b&gt; with an example so that we can understand the &lt;b&gt;function overloading program&lt;/b&gt;.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;It is a &lt;b&gt;function overloading program&lt;/b&gt;. In this, we have told this. how to get lcm, If inputs are received from the user two or three. In this program, you will understand How to program &lt;i&gt;function overloading&lt;/i&gt;.&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;

  &lt;p&gt;To understand this program, you must have this knowledge:&lt;/p&gt;
    &lt;ul class=&quot;list1&quot; typle=&quot;circle &quot;&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/cpp-programming/variables-literals&quot; target=&quot;_blank&quot;&gt;basic c++&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/cpp-programming/for-loop&quot; target=&quot;_blank&quot;&gt;loop&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_conditional_operator.htm&quot; target=&quot;_blank&quot;&gt;conditional operator&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_decision_making.htm&quot; target=&quot;_blank&quot;&gt;if&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_switch_statement.htm#:~:text=Advertisements,is%20checked%20for%20each%20case.&quot; target=&quot;_blank&quot;&gt;switch case&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_functions.htm&quot; target=&quot;_blank&quot;&gt;function&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;h3&gt;What is function overloading?&lt;/h3&gt;
    &lt;p&gt;In c++ is a feature of function overloading. &lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/explain-function-overloading-with.html&quot;&gt;function overloading&lt;/a&gt; is an example of &lt;i&gt;compile-time polymorphism&lt;/i&gt;.&lt;/p&gt;
    &lt;p&gt;where two or more functions can have the same name but parameters are different.&lt;/p&gt;
    &lt;h3&gt;the polymorphism implements three categories:&lt;/h3&gt;
    &lt;h4&gt;compile-time polymorphism&lt;/h4&gt;
    &lt;li&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/explain-function-overloading-with.html&quot; target=&quot;&quot;&gt;function overloading&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;https://www.programiz.com/cpp-programming/operator-overloading&quot; target=&quot;_blank&quot;&gt;operator overloading&lt;/a&gt;&lt;/li&gt;
    &lt;h4&gt;runtime polymorphism&lt;/h4&gt;
    &lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/cpp/cpp/virtual-functions?view=vs-2019&quot; target=&quot;_blank&quot;&gt;virtual function&lt;/a&gt;&lt;/li&gt;

    &lt;h3&gt;How can I resolve function overloading?&lt;/h3&gt;
    &lt;p&gt;these simple ways,&lt;/p&gt;
    &lt;ol&gt;
        &lt;li&gt;first, c++ tries to find an exact match. this is the case where the actual argument exactly matches the
            parameter type of one of the &lt;b&gt;overloaded functions&lt;/b&gt;.&lt;/li&gt;&lt;br /&gt;
        &lt;li&gt;if no exact match is found, c++ tries to find a match through the promotion&lt;/li&gt;
        &lt;ul&gt;&lt;br /&gt;
            &lt;li&gt;&lt;code class=&quot;mycode&quot;&gt;char&lt;/code&gt;, &lt;code class=&quot;mycode&quot;&gt;unsigned char&lt;/code&gt;, and &lt;code class=&quot;mycode&quot;&gt;short&lt;/code&gt; is promoted to an &lt;code class=&quot;mycode&quot;&gt;int&lt;/code&gt;.&lt;/li&gt;&lt;br /&gt;
            &lt;li&gt;&lt;code class=&quot;mycode&quot;&gt;float&lt;/code&gt; is promoted to &lt;code class=&quot;mycode&quot;&gt;double&lt;/code&gt;&lt;/li&gt;
        &lt;/ul&gt;&lt;br /&gt;
        &lt;li&gt;if no promotion is found, c++ tries to find a match through standard conversion.&lt;/li&gt;
    &lt;/ol&gt;
    &lt;br /&gt;
    	&lt;p&gt;Now, let us go to the program.&lt;/p&gt;
        &lt;br /&gt;
        &lt;p&gt;First of all, you can imagine the output screen then build your logic.&lt;/p&gt;
        &lt;pre class=&quot;list1&quot;&gt;        Enter two number:6
        16
        LCM is 48

        Enter three number:12
        6
        7
        LCM is 84
        &lt;/pre&gt;
    &lt;/div&gt;
    &lt;strong&gt;Recommended Post&lt;/strong&gt;
    &lt;p&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/function-overloading-sphere-and-cuboid%20.html&quot; target=&quot;_blank&quot;&gt;function overloading sphere and cuboid&lt;/a&gt;&lt;/p&gt;
    
    &lt;h3&gt;Example: function overloading in c++&lt;/h3&gt;
    
&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.5591669702917839&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
  
#include &lt;iostream&gt;
#include &lt;conio.h&gt;
using namespace std;
int lowestM(int, int);
int lowestM(int, int, int);
int main()
{
    while (1)
    {
        int ch;
        cout &lt;&lt; &quot;\t\tLCM Program&quot; &lt;&lt; endl
             &lt;&lt; endl
             &lt;&lt; endl;
        cout &lt;&lt; &quot;1. LCM of two number&quot; &lt;&lt; endl;
        cout &lt;&lt; &quot;2. LCM of three number&quot; &lt;&lt; endl
             &lt;&lt; endl
             &lt;&lt; endl;
        cout &lt;&lt; &quot;Enter your choice : &quot;;
        cin &gt;&gt; ch;
        switch (ch)
        {
        case 1:
            int num1, num2;
            cout &lt;&lt; &quot;Enter two number:&quot;;
            cin &gt;&gt; num1 &gt;&gt; num2;

            cout &lt;&lt; &quot;LCM is &quot; &lt;&lt; lowestM(num1, num2);
            break;
        case 2:
            int num3, a, b;
            cout &lt;&lt; &quot;Enter three number:&quot;;
            cin &gt;&gt; b &gt;&gt; a &gt;&gt; num3;
            cout &lt;&lt; &quot;LCM is &quot; &lt;&lt; lowestM(a, b, num3);
            break;

        case 3:
            exit(0);
            break;
        default:
            cout &lt;&lt; &quot;Try again: Invalid Input&quot;;
        }
        getch();
        system(&quot;Cls&quot;);
    }
}
int lowestM(int num1, int num2)
{
    int L, Y;
    L = num1 &gt; num2 ? num1 : num2;
    Y = L;
    for (L; L &lt;= num1 * num2; L = L + Y)
    {

        if (L % num1 == 0 &amp;&amp; L % num2 == 0)
        {
            break;
        }
    }
    return (L);
}
int lowestM(int num1, int num2, int num3)
{

    int L, Y;
    L = num1 &gt; num2 ? num1 &gt; num3 ? num1 : num3 : num2 &gt; num3 ? num2 : num3;
    Y = L;
    for (L; L &lt;= num1 * num2 * num3; L = L + Y)
    {
        if (L % num1 == 0 &amp;&amp; L % num2 == 0 &amp;&amp; L % num3 == 0)
        {
            break;
        }
    }
    return (L);
}
&lt;/textarea&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Output Screen&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/form&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img alt=&quot;function overloading c++, compile-time polymorphism, function overloading flow&quot; border=&quot;0&quot; data-original-height=&quot;635&quot; data-original-width=&quot;1525&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2_FiiDwRulXjsGpUobCEU3j9RbQsnDY4ebwswxyZw3WkYdjSCWefmNpUB4RNQHpFNTPGwjjlzcqdRYbzWc-3pIJI4uqHLV_1KshOtmCxxytGr5MV1l_EneODUTH8GLuU3rOhEyaXZqo0/s16000/explain-function-overloading-with-example.jpg&quot; title=&quot;function overloading c++, compile-time polymorphism, function overloading flow&quot; /&gt;&lt;img alt=&quot;function overloading c++, compile-time polymorphism, function overloading flow&quot; border=&quot;0&quot; data-original-height=&quot;189&quot; data-original-width=&quot;1522&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2vn3EpjX1uC73Cd5_5yJK_JhfG8_NqUfE7Se9_TWTgFzqI0leTb6ETpFeh8hjKPJnPYgOqIGavYQhYI3-BWZ9BjZQWOJsoHNdnWc1msfkjO72eh4sL6Xt0qY0Dlpj9OkEFIf7zVV_JZA/s16000/function+overloading+in+c%252B%252B.jpg&quot; title=&quot;function overloading c++, compile-time polymorphism, function overloading flow&quot; /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program Logic&lt;/h3&gt;&lt;br /&gt;
&lt;p&gt;This is a program of &lt;abbr title=&quot;Least common multiple&quot;&gt;lcm&lt;/abbr&gt;. We have made a program to check &lt;abbr title=&quot;Least common multiple&quot;&gt;lcm&lt;/abbr&gt; of numbers two and three.&lt;/p&gt;
&lt;p&gt;First, we put a &lt;code class=&quot;mycode&quot;&gt;while&lt;/code&gt; loop inside the &lt;code class=&quot;mycode&quot;&gt;main&lt;/code&gt; function. Which will run the infinite. Then inside it took input from the user and stored it in a variable named &lt;var class=&quot;mycode&quot;&gt;ch&lt;/var&gt;.&lt;/p&gt;
&lt;p&gt;Within this &lt;code class=&quot;mycode&quot;&gt;while&lt;/code&gt; loop, we created a &lt;code class=&quot;mycode&quot;&gt;switch-case&lt;/code&gt; and passed the &lt;var class=&quot;mycode&quot;&gt;ch&lt;/var&gt; variable to the parentheses of the &lt;code class=&quot;mycode&quot;&gt;switch&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now the number will be input by the user. The same &lt;code class=&quot;mycode&quot;&gt;case&lt;/code&gt; will work.&lt;/p&gt;
&lt;p&gt;Inside the first case, we took input in &lt;var class=&quot;mycode&quot;&gt;num1&lt;/var&gt; and &lt;var class=&quot;mycode&quot;&gt;num2&lt;/var&gt;. Then passed to the &lt;code class=&quot;mycode&quot;&gt;lowestM&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;Similarly, we did the same in the second case. But taking three inputs.&lt;/p&gt;
&lt;p&gt;case three, we created the &lt;code class=&quot;mycode&quot;&gt;exit&lt;/code&gt; function. To end the program. And for the &lt;code class=&quot;mycode&quot;&gt;default&lt;/code&gt; simple message.&lt;/p&gt;
&lt;p&gt;After that, we created two functions with the same name but there is a difference in argument. Which is an example of &lt;b&gt;function overloading.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;In both functions, we used the &lt;b&gt;conditional operator&lt;/b&gt;. Which shows which number is bigger.&lt;/p&gt;
&lt;p&gt;We will store that big number in &lt;var class=&quot;mycode&quot;&gt;L&lt;/var&gt; variable.&lt;/p&gt;
&lt;p&gt;Here we will take a new variable named &lt;var class=&quot;mycode&quot;&gt;Y&lt;/var&gt; and assign the value of &lt;var class=&quot;mycode&quot;&gt;L&lt;/var&gt; to it.&lt;/p&gt;

&lt;p&gt;Then we will apply a &lt;code class=&quot;mycode&quot;&gt;loop&lt;/code&gt;. In which &lt;var class=&quot;mycode&quot;&gt;L&lt;/var&gt; is less than or equal of &lt;var class=&quot;mycode&quot;&gt;num1 * num2&lt;/var&gt; And add to &lt;var class=&quot;mycode&quot;&gt;L&lt;/var&gt; the value of &lt;var class=&quot;mycode&quot;&gt;Y&lt;/var&gt;. Then assign &lt;var class=&quot;mycode&quot;&gt;L&lt;/var&gt;&lt;/p&gt;

&lt;p&gt;Put an &lt;code class=&quot;mycode&quot;&gt;if&lt;/code&gt; condition in the body of the loop. In which &lt;var class=&quot;mycode&quot;&gt;num1&lt;/var&gt; and &lt;var class=&quot;mycode&quot;&gt;num2&lt;/var&gt; will divide to &lt;var class=&quot;mycode&quot;&gt;L&lt;/var&gt;.&lt;/p&gt;

If the condition is true. Then the &lt;code class=&quot;mycode&quot;&gt;break&lt;/code&gt; keyword in the body of it will run. And the value of &lt;var class=&quot;mycode&quot;&gt;L&lt;/var&gt; will be the &lt;code class=&quot;mycode&quot;&gt;return&lt;/code&gt;.
&lt;p&gt;Our result is the return value. And we will get &lt;abbr title=&quot;Least common multiple&quot;&gt;lcm&lt;/abbr&gt; of two number.&lt;/p&gt;
&lt;p&gt;Similarly, we will also get &lt;abbr title=&quot;Least common multiple&quot;&gt;lcm&lt;/abbr&gt; of number three.&lt;/p&gt;
&lt;div&gt;&lt;br /&gt;
    

    
    
    &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Recently Post&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/04/this-pointer-in-cpp.html&quot;&gt;This pointer in cpp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/05/Default-argument-in-cpp.html&quot;&gt;Default argument in cpp | C++ language Default argument Concept&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/make-hcf-program-with-help-of-default.html&quot;&gt;HCF program default arguments in cpp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/prime-number.html&quot; target=&quot;_blank&quot;&gt;C++ Program to Check Whether a Number is Prime or Not&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
    
  &lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;
  
    
    
    &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/9003852345135108467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/explain-function-overloading-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/9003852345135108467'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/9003852345135108467'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/explain-function-overloading-with.html' title='The Ultimate Secret Of function overloading in c++'/><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/AVvXsEiAa-xr0o3hVNqu4bMkshmwwdQqq8OkqYOOqjyVJRstdn7DouqQ295GPmoeSzZX3hKuLysPalgH2u0lYY8sL1la42Mhmc6bpPCXjIjYmI6ll1bDphDT_jIPQiFb5dTeGr2Sofbuv-WDXyw/s72-c/explain-function-overloading-with-example.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-3651413297635052957</id><published>2020-09-25T23:30:00.004+05:30</published><updated>2021-01-20T11:43:49.620+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Program find next prime number"/><title type='text'>Program find next prime number </title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEhj7J70WITTy-cJ3AAcGDPAMvdJSfaidh6nQg9bTAwkresuIfAA-ILpiII2WcBrQ9ushyphenhyphenwEC9BoQVCp8V8OangHIVK4Xg4c4nMhfZeW27EwGXpqjkC0_ebXPEJc-yUmztrIxF5gCjk5f4k/s2048/Program-find-next-prime-number+.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;prime number, odd prime number&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj7J70WITTy-cJ3AAcGDPAMvdJSfaidh6nQg9bTAwkresuIfAA-ILpiII2WcBrQ9ushyphenhyphenwEC9BoQVCp8V8OangHIVK4Xg4c4nMhfZeW27EwGXpqjkC0_ebXPEJc-yUmztrIxF5gCjk5f4k/s16000/Program-find-next-prime-number+.jpg&quot; title=&quot;prime number, odd prime number&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In this post, we will tell about the &lt;b&gt;next prime number program&lt;/b&gt;. So please read this post carefully so that you can understand the program of &lt;b&gt;next prime number&lt;/b&gt;.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;First of all, you can imagine the output screen&lt;/h3&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;div&gt;Enter any number: 17&lt;/div&gt;&lt;div&gt;19 Next prime number:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Enter any number: 16&lt;/div&gt;&lt;div&gt;17 Next prime number:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Enter any number: 36&lt;/div&gt;&lt;div&gt;37 Next prime number:&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;you must have this knowledge&lt;/h3&gt;&lt;div&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_basic_syntax.htm&quot; target=&quot;_blank&quot;&gt;basic cpp&lt;/a&gt;, &lt;a href=&quot;https://codeforwin.org/2017/08/for-loop-in-c-programming.html&quot; target=&quot;_blank&quot;&gt;loop&lt;/a&gt;, &lt;a href=&quot;https://www.w3schools.com/cpp/cpp_conditions.asp#:~:text=C%2B%2B%20has%20the%20following%20conditional,the%20first%20condition%20is%20false&quot; target=&quot;_blank&quot;&gt;if-else&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;

Source Code&amp;nbsp;&lt;b&gt;next prime number&amp;nbsp;&lt;/b&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.5466615533436068&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
  #include&lt;iostream&gt;
using namespace std;
int main()
{
    int n,i;
    cout&lt;&lt;&quot;Enter any number: &quot;;
    cin&gt;&gt;n;
    n=n+1;
    for(i=2;i&lt;n;i++)
    {
        if(n%i==0)
            n=n+1;
        
    }
    cout&lt;&lt;n&lt;&lt;&quot; Next prime number: &quot;;
}
&lt;/textarea&gt;
  &lt;br /&gt;&lt;br /&gt;Output Screen&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbhqwjzNZl4cAuPe0C4s3g2fQzchUV5F3RZuWYT80zKSLCtiPi5N5iqSuQb3FiB9fqL56qKC78KzMJwylCV2X6khFa1lJ3aVCP8vYaiCPo9mBu4RYO3EqIzXPWbb6OClNPdJo3cCAAoac/s1920/Program-find-next-prime-number.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;prime number, odd prime number&quot; border=&quot;0&quot; data-original-height=&quot;1031&quot; data-original-width=&quot;1920&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbhqwjzNZl4cAuPe0C4s3g2fQzchUV5F3RZuWYT80zKSLCtiPi5N5iqSuQb3FiB9fqL56qKC78KzMJwylCV2X6khFa1lJ3aVCP8vYaiCPo9mBu4RYO3EqIzXPWbb6OClNPdJo3cCAAoac/s16000/Program-find-next-prime-number.png&quot; title=&quot;prime number, odd prime number&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Recommended Post&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/04/this-pointer-in-cpp.html&quot; rel=&quot;&quot; target=&quot;&quot;&gt;Concept of |this| pointer in c++&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/05/Default-argument-in-cpp.html&quot; rel=&quot;&quot; target=&quot;_blank&quot;&gt;Default Argument | C++ language Default argument Concept&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/06/write-a-program-to-calculate-simple-interest.html&quot;&gt;Simple Intrest&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/average-program-in-cpp.html&quot;&gt;average program in cpp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/make-hcf-program-with-help-of-default.html&quot;&gt;HCF program default arguments in cpp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/prime-number.html&quot;&gt;prime number check program&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/factorial-program-in-cpp-using-function.html&quot;&gt;factorial program in cpp using function&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/function-overloading-sphere-and-cuboid%20.html&quot;&gt;function overloading sphere and cuboid&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;/form&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;




&lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;






&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/3651413297635052957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/program-find-next-prime-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3651413297635052957'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3651413297635052957'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/program-find-next-prime-number.html' title='Program find next prime 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/AVvXsEhj7J70WITTy-cJ3AAcGDPAMvdJSfaidh6nQg9bTAwkresuIfAA-ILpiII2WcBrQ9ushyphenhyphenwEC9BoQVCp8V8OangHIVK4Xg4c4nMhfZeW27EwGXpqjkC0_ebXPEJc-yUmztrIxF5gCjk5f4k/s72-c/Program-find-next-prime-number+.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-5697796037383827368</id><published>2020-09-23T22:48:00.001+05:30</published><updated>2021-01-20T11:43:32.118+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="function overloading sphere and cuboid"/><title type='text'>function overloading sphere and cuboid </title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEgChdqLJ3AwFkvE4r7wfBisRx5qrvCAAuoZOvs9snhphV9rrkwaIs679Z6ny6-aEvSSMlZD9EoFUnfDoMFmUqqMBtWPMxD0-6aksLenms44j1WUmiD-ISPoCWQRtH9uTatXslDS9V0npoM/s1792/function-overloading-sphere-and-cuboid.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;function overloading&quot; border=&quot;0&quot; data-original-height=&quot;1008&quot; data-original-width=&quot;1792&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgChdqLJ3AwFkvE4r7wfBisRx5qrvCAAuoZOvs9snhphV9rrkwaIs679Z6ny6-aEvSSMlZD9EoFUnfDoMFmUqqMBtWPMxD0-6aksLenms44j1WUmiD-ISPoCWQRtH9uTatXslDS9V0npoM/s16000/function-overloading-sphere-and-cuboid.jpg&quot; title=&quot;function overloading&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Define two overloaded versions of function calculating &lt;b&gt;volume&lt;/b&gt; of &lt;b&gt;sphere&lt;/b&gt; and &lt;b&gt;cuboid&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Source code &lt;b&gt;function overloading&lt;/b&gt; &lt;b&gt;sphere&lt;/b&gt; and &lt;b&gt;cuboid&lt;/b&gt;&amp;nbsp;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.07435245830521553&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
 
#include &lt;iostream&gt;
using namespace std;

float volume(float);
int volume(int,int,int);
int main()
{
    int sp;
    cout &lt;&lt; &quot;Enter sphere value: &quot;;
    cin &gt;&gt; sp;
    cout &lt;&lt; endl;
    cout &lt;&lt; &quot;The sphere volume is: &quot; &lt;&lt; volume(sp);

    int l, w, h;
    cout &lt;&lt; endl;

    cout &lt;&lt; &quot;Enter cuboid lenth breath and hight: &quot;;
    cin &gt;&gt; l &gt;&gt; w &gt;&gt; h;
    cout &lt;&lt; endl;
    cout &lt;&lt; &quot;volume of cuboid is: &quot; &lt;&lt; volume(l, w, h);
}
 float volume(float num1)
{
    return ((4  * 3.14* num1 * num1 * num1)/3);
}

int volume(int l, int b, int h)
{
    return (l * b * h);
}
&lt;/textarea&gt;&lt;br /&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Output Screen&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;/form&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/AVvXsEiPjUQafPss6xvl6nZ1zuLBjANjaxJjYrrhGRErWxrvM8LKWREOjeFIaj3HUpEhGajLAouGSssIyyXFZ4pDQm9o_7Al4exgglBSXHW6pwK2D9cVwp5nKnaDRX5qAdkBb4mHCT5VJhPU5eI/s1457/function-overloading.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;function overloading&quot; border=&quot;0&quot; data-original-height=&quot;607&quot; data-original-width=&quot;1457&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPjUQafPss6xvl6nZ1zuLBjANjaxJjYrrhGRErWxrvM8LKWREOjeFIaj3HUpEhGajLAouGSssIyyXFZ4pDQm9o_7Al4exgglBSXHW6pwK2D9cVwp5nKnaDRX5qAdkBb4mHCT5VJhPU5eI/s16000/function-overloading.png&quot; title=&quot;function overloading&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
 

 






&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Recommended Post&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/04/this-pointer-in-cpp.html&quot; rel=&quot;&quot; target=&quot;&quot;&gt;Concept of |this| pointer in c++&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/05/Default-argument-in-cpp.html&quot; rel=&quot;&quot; target=&quot;_blank&quot;&gt;Default Argument | C++ language Default argument Concept&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/06/write-a-program-to-calculate-simple-interest.html&quot;&gt;Simple Intrest&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/average-program-in-cpp.html&quot;&gt;average program in cpp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/make-hcf-program-with-help-of-default.html&quot;&gt;HCF program default arguments in cpp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/prime-number.html&quot;&gt;prime number check program&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/factorial-program-in-cpp-using-function.html&quot;&gt;factorial program in cpp using function&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
  
  
  
  &lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;
  
  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/5697796037383827368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/function-overloading-sphere-and-cuboid .html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/5697796037383827368'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/5697796037383827368'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/function-overloading-sphere-and-cuboid .html' title='function overloading sphere and cuboid '/><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/AVvXsEgChdqLJ3AwFkvE4r7wfBisRx5qrvCAAuoZOvs9snhphV9rrkwaIs679Z6ny6-aEvSSMlZD9EoFUnfDoMFmUqqMBtWPMxD0-6aksLenms44j1WUmiD-ISPoCWQRtH9uTatXslDS9V0npoM/s72-c/function-overloading-sphere-and-cuboid.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-4332832185672118361</id><published>2020-09-23T20:33:00.003+05:30</published><updated>2021-01-20T11:43:17.429+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="factorial program in cpp using function"/><title type='text'>factorial program in cpp using function</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEgAzZph2HIbqTUperZkjq0b1hcBQYANcN6mJlVYt6rBH9MZ6CyTF9EW5ijHQapzbM4n2eOchsyCHRJxY90AtH27O3pO4VXxlLt4oRdvBdXSHedjFEJ4w5Ys2ebQDyU8xnTrcXh4vhOb3KA/s2048/factorial-program-in-c%252B%252B.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;factorial program in cpp using function, factorial program&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAzZph2HIbqTUperZkjq0b1hcBQYANcN6mJlVYt6rBH9MZ6CyTF9EW5ijHQapzbM4n2eOchsyCHRJxY90AtH27O3pO4VXxlLt4oRdvBdXSHedjFEJ4w5Ys2ebQDyU8xnTrcXh4vhOb3KA/s16000/factorial-program-in-c%252B%252B.jpg&quot; title=&quot;factorial program in cpp using function, factorial program&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In this example, we will explain to you write a factorial program in c++. To understand this topic it is necessary to have knowledge of &lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_basic_syntax.htm&quot; target=&quot;_blank&quot;&gt;basic CPP&lt;/a&gt;, &lt;a href=&quot;https://www.w3schools.com/cpp/cpp_functions.asp#:~:text=A%20function%20is%20a%20block,and%20use%20it%20many%20times.&quot; target=&quot;_blank&quot;&gt;function&lt;/a&gt;, and &lt;a href=&quot;https://www.w3schools.com/cpp/cpp_for_loop.asp&quot; target=&quot;_blank&quot;&gt;loop&lt;/a&gt;. Please read this article carefully so that you can understand the factorial program in c++.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;First of all, you can imagine the output screen then build your logic.&lt;/h3&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;Enter N number : 5&lt;/div&gt;&lt;div&gt;factorial of 5 is 120&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;You must have this knowledge&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_basic_syntax.htm&quot; target=&quot;_blank&quot;&gt;basic CPP&lt;/a&gt;, &lt;a href=&quot;https://www.w3schools.com/cpp/cpp_functions.asp#:~:text=A%20function%20is%20a%20block,and%20use%20it%20many%20times.&quot; target=&quot;_blank&quot;&gt;function&lt;/a&gt;, &lt;a href=&quot;https://www.w3schools.com/cpp/cpp_for_loop.asp&quot; target=&quot;_blank&quot;&gt;loop&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program logic&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Create a variable named n of int type. Then take input into it.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;After taking the input call the function named pro. And pass n variable to it.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Create a fact name variable inside the pro function and assign 1 to it.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Then put a loop. And i = 1 in the condition of the loop. And run up to i&amp;lt;= n. And when the condition of the loop is true. So multiply the fact with i variable inside the loop. result Assign to the fact.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;This way the loop will continue. Until 1 is equal to n.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;After the loop is over, the return statement will run. then The cursor will move on from where the function call was made. After this, the result will be printed.&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Source code &lt;b&gt;factorial program in cpp using function&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;

&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.19982644085895052&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  

#include &lt;iostream&gt;
using namespace std;
int pro(int);
int main()
{
    int n;
    cout &lt;&lt; &quot;Enter N number : &quot;;
    cin &gt;&gt; n;
    cout &lt;&lt; &quot;factorial of &quot; &lt;&lt; n &lt;&lt; &quot; is &quot; &lt;&lt; pro(n);
    return 0;
}
int pro(int n)
{
    int pro = 1;
    for (int i = 1; i &lt;= n; i++)
    {
        pro = pro * i;
    }
    return (pro);
}
&lt;/textarea&gt;
  &lt;br /&gt;
&lt;/form&gt;Output Screen&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh01A6ATfjUX8QlF_sWmhOxUBolfHXOk89zt3BOSZUtmcH7iBncCfFEN_xN1aWfDrNbo0ERv-uSR9dgz0Ewn7HsU_kvv5ZMdO4kLmedGNvLN-iKJsnI8_zwWL5xkKgzhB0yxgFhs3Mgv3A/s1527/factorial-program-in-c%252B%252B.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;factorial program in cpp using function, factorial program&quot; border=&quot;0&quot; data-original-height=&quot;454&quot; data-original-width=&quot;1527&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh01A6ATfjUX8QlF_sWmhOxUBolfHXOk89zt3BOSZUtmcH7iBncCfFEN_xN1aWfDrNbo0ERv-uSR9dgz0Ewn7HsU_kvv5ZMdO4kLmedGNvLN-iKJsnI8_zwWL5xkKgzhB0yxgFhs3Mgv3A/s16000/factorial-program-in-c%252B%252B.png&quot; title=&quot;factorial program in cpp using function, factorial program&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Recommended Post&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/prime-number.html&quot;&gt;prime number programming in c&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/make-hcf-program-with-help-of-default.html&quot;&gt;HCF program default arguments in cpp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/average-program-in-cpp.html&quot;&gt;average program in cpp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/04/this-pointer-in-cpp.html&quot;&gt;average program in cpp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
  
  
  
  &lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;
  
  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/4332832185672118361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/factorial-program-in-cpp-using-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/4332832185672118361'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/4332832185672118361'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/factorial-program-in-cpp-using-function.html' title='factorial program in cpp using function'/><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/AVvXsEgAzZph2HIbqTUperZkjq0b1hcBQYANcN6mJlVYt6rBH9MZ6CyTF9EW5ijHQapzbM4n2eOchsyCHRJxY90AtH27O3pO4VXxlLt4oRdvBdXSHedjFEJ4w5Ys2ebQDyU8xnTrcXh4vhOb3KA/s72-c/factorial-program-in-c%252B%252B.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-5428262208831537840</id><published>2020-09-22T12:53:00.065+05:30</published><updated>2021-01-20T11:43:02.427+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="program default arguments in cpp"/><title type='text'>HCF program default arguments in cpp</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img alt=&quot;HCF program default arguments in cpp, default argument&quot; border=&quot;0&quot; data-original-height=&quot;360&quot; data-original-width=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3c15fTI-SCylQ6TOoZ7BZA2Jx40z1xq8Zl6BpZNMD554cVxsGkgINBDkxtKgMkYFAwfj0emSoahaVJOpsOMYXStISSEDpuve4mMOzW93ECLS687OHGbKTlLbMnYlAAxK_gMTHZXS7C0c/s16000/Defalult-argument-in-c%252B%252B.png&quot; title=&quot;HCF program default arguments in cpp, default argument&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;write a c++ program to find HCF of two numbers and three numbers with help of the default argument.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You must have this knowledge&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_basic_syntax.htm&quot; target=&quot;_blank&quot;&gt;basic CPP&lt;/a&gt;, &lt;a href=&quot;https://www.programiz.com/c-programming/c-pointers&quot; target=&quot;_blank&quot;&gt;pointer&lt;/a&gt;, &lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_conditional_operator.htm&quot; target=&quot;_blank&quot;&gt;conditional operator&lt;/a&gt;, &lt;a href=&quot;https://www.programiz.com/c-programming/c-for-loop&quot; target=&quot;_blank&quot;&gt;loop&lt;/a&gt;, &lt;a href=&quot;https://www.w3schools.com/cpp/cpp_conditions.asp#:~:text=C%2B%2B%20has%20the%20following%20conditional,the%20first%20condition%20is%20false&quot; target=&quot;_blank&quot;&gt;if-else&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;HCF program default arguments in cpp&lt;br /&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.21481780189292699&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
  
// default argument example 
//this program run two times for HCF of two numbers and three number.
#include &lt;iostream&gt;
using namespace std;

int number1, number2;//global declartion varible

int *c = &amp;number2;//global pointer

int HCF(int &amp;, int &amp;, int = *c); //*c contain address number2 varible

int main()
{

    cout &lt;&lt; &quot;\t\t\t HCF PROGRAM&quot; &lt;&lt; endl
         &lt;&lt; endl
         &lt;&lt; endl;

    cout &lt;&lt; &quot;Enter two number : &quot;;
    cin &gt;&gt; number1 &gt;&gt; number2;
    cout &lt;&lt; &quot;HCF of two number is: &quot; &lt;&lt; HCF(number1, number2);
    cout &lt;&lt; endl;
    int number3;
    cout &lt;&lt; &quot;Enter three number : &quot;;
    cin &gt;&gt; number1 &gt;&gt; number2 &gt;&gt; number3;
    cout &lt;&lt; &quot;HCF of Three number is:&quot; &lt;&lt; HCF(number1, number2, number3);
}

int HCF(int &amp;num1, int &amp;num2, int num3)
{

    int small;
    small = num1 &lt; num2 ? num1 &lt; num3 ? num1 : num3 : num2 &lt; num3 ? num2 : num3;
    while (small)
    {
        if (num1 % small == 0 &amp;&amp; num2 % small == 0 &amp;&amp; num3 % small == 0)
            break;
        small--;
    }
    return (small);
}
    
    
&lt;/textarea&gt;
  &lt;br /&gt;
&lt;/form&gt;Output Screen&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEiaulHKapdZu7eoitAVi7HJLbWftlI9S1MgE4peTHnAzEya1nV0nZPQYRDblt7w26Sx6j4R5eodeDNhQtEYfV55f5xaQjFFl_zotLIXhgLYOA2WVzu9xwA6bFPzyXBvuUMaeg53zk5fPNk/s1529/default-arguments-in-cpp.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;HCF program default arguments in cpp, default argument&quot; border=&quot;0&quot; data-original-height=&quot;1028&quot; data-original-width=&quot;1529&quot; height=&quot;430&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaulHKapdZu7eoitAVi7HJLbWftlI9S1MgE4peTHnAzEya1nV0nZPQYRDblt7w26Sx6j4R5eodeDNhQtEYfV55f5xaQjFFl_zotLIXhgLYOA2WVzu9xwA6bFPzyXBvuUMaeg53zk5fPNk/w640-h430/default-arguments-in-cpp.png&quot; title=&quot;HCF program default arguments in cpp, default argument&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Recommended post&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/search/label/average%20program%20in%20cpp&quot;&gt;average program in cpp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/search/label/write%20a%20program%20to%20calculate%20simple%20interest&quot; target=&quot;_blank&quot;&gt;write a program to calculate simple interest&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/search/label/c%20program%20swap%20two%20numbers%20using%20pointers&quot; target=&quot;_blank&quot;&gt;c program swap two numbers using pointers&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/search/label/c%20program%20fibonacci%20series%20using%20recursion&quot;&gt;c program fibonacci series using recursion&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div ne=&quot;0.1773355075705667&quot; style=&quot;background-color: #1f1f1f; box-sizing: border-box; font-family: &amp;quot;open sans&amp;quot;; font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
  

&lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;

  
  
  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/5428262208831537840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/make-hcf-program-with-help-of-default.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/5428262208831537840'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/5428262208831537840'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/make-hcf-program-with-help-of-default.html' title='HCF program default arguments in cpp'/><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/AVvXsEj3c15fTI-SCylQ6TOoZ7BZA2Jx40z1xq8Zl6BpZNMD554cVxsGkgINBDkxtKgMkYFAwfj0emSoahaVJOpsOMYXStISSEDpuve4mMOzW93ECLS687OHGbKTlLbMnYlAAxK_gMTHZXS7C0c/s72-c/Defalult-argument-in-c%252B%252B.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-3125140243725574736</id><published>2020-09-22T11:46:00.057+05:30</published><updated>2021-01-20T11:42:48.103+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="prime number"/><title type='text'>C++ Program to Check Whether a Number is Prime or Not</title><content type='html'>  &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;style&gt;
        .list1 {
            border-left-color: rgb(255 32 32);
            padding: 10px 10px 10px 20px;
            border-radius: 4px;
            border-left: 5px solid rgb(6, 160, 147);
            box-shadow: rgb(48 163 27) 1px 3px 10px;
            margin: 30px 0px;

        }
    &lt;/style&gt;
    &lt;style&gt;
        .list2 {
            border-left-color: rgb(255 32 32);
            padding: 10px 10px 10px 20px;
            border-radius: 4px;
            border-left: 5px solid rgb(14, 94, 223);
            box-shadow: rgb(14 94 223) 1px 3px 10px;
            margin: 30px 0px;

        }
    &lt;/style&gt;
    &lt;style&gt;
        .list3 {
            border-left-color: rgb(255 32 32);
            padding: 10px 10px 10px 20px;
            border-radius: 4px;
            border-left: 5px solid rgb(20, 160, 148);
            box-shadow: rgb(57, 91, 153) 1px 3px 10px;
            margin: 30px 0px;

        }
    &lt;/style&gt;






&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEi4e_83ykvoPTbc3P8ET64fa6tjj9POkLsgtl2QTX6qsA1fc7otE4upZajiErQJYlR6M7vPkRCmuJmjGzRRCZWF1lWGJ5vyX9At57SH-EyvsSqyUaP9tiE2xRfocj0juC8c1B7D_gEuC64/s2048/prime-number.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;prime number, prime numbers, how to find prime numbers&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4e_83ykvoPTbc3P8ET64fa6tjj9POkLsgtl2QTX6qsA1fc7otE4upZajiErQJYlR6M7vPkRCmuJmjGzRRCZWF1lWGJ5vyX9At57SH-EyvsSqyUaP9tiE2xRfocj0juC8c1B7D_gEuC64/s16000/prime-number.jpg&quot; title=&quot;prime number, prime numbers, how to find prime numbers&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN&quot;&gt;how to write a CPP program to check the &lt;b&gt;prime number&lt;/b&gt;. and how can we solve this &lt;b&gt;prime number&lt;/b&gt; program? In this post, we explain how to check the &lt;i&gt;prime number&lt;/i&gt; program. Knowledge of CPP is necessary to understand this program.&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;line-height: 115%; margin-bottom: 10pt; text-align: left;&quot;&gt;&lt;span lang=&quot;EN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;line-height: 115%; margin-bottom: 10pt; text-align: left;&quot;&gt;&lt;span lang=&quot;EN&quot;&gt;what is a &lt;u&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Prime_number&quot; target=&quot;_blank&quot;&gt;prime number&lt;/a&gt;&lt;/u&gt;?&lt;/span&gt;&lt;/h3&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN&quot;&gt;The prime number is that. Which is divisible by 1 and is divisible by itself and apart from that, is not divisible by anyone else. We are only talking about positive integer here.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 115%; margin-bottom: 10pt; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN&quot;&gt;Click on this &lt;a href=&quot;https://en.wikipedia.org/wiki/Prime_number&quot; target=&quot;_blank&quot;&gt;prime number&lt;/a&gt; for more details.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;now,&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;solving approach is that.&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;First of all, you can imagine the output screen then build your logic.&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;blockquote class=&quot;list3&quot;&gt;&lt;div&gt;&lt;div&gt;Enter a number: 17&lt;/div&gt;&lt;div&gt;17 is a &lt;a href=&quot;https://www.blogger.com/blog/post/edit/preview/6309287525669005415/3125140243725574736&quot;&gt;prime number&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Enter a number: 6&lt;/div&gt;&lt;div&gt;6 is not a prime number&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;You must have this knowledge&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_basic_syntax.htm&quot; target=&quot;_blank&quot;&gt;Basic CPP&lt;/a&gt;, &lt;a href=&quot;https://codeforwin.org/2017/08/for-loop-in-c-programming.html&quot; target=&quot;_blank&quot;&gt;loop&lt;/a&gt;, &lt;a href=&quot;https://www.w3schools.com/cpp/cpp_conditions.asp#:~:text=C%2B%2B%20has%20the%20following%20conditional,the%20first%20condition%20is%20false&quot; target=&quot;_blank&quot;&gt;if-else&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program Logic&lt;/h3&gt;&lt;div&gt;
  &lt;p&gt;You have to declare three variables.
        &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;int&lt;/var&gt; type
        &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;i&lt;/var&gt;,
        &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;fresh=0&lt;/var&gt;,
        &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;prime&lt;/var&gt;
    &lt;/p&gt;
    &lt;p&gt;Now take the input in the step named &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;prime&lt;/var&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;Apply the loop condition, initialize &lt;var ne=&quot;0.6754064398359756&quot; style=&quot;border-radius: 4px; color: #9b9be4;&quot;&gt;i=2&lt;/var&gt;
        in the loop condition Then you should continue the loop. Until &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;i&lt;/var&gt;
        is equal to &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;prime&lt;/var&gt;.&lt;/p&gt;

    &lt;p&gt;We will put an if condition inside the body of the loop. And this time the value of fresh is 1. if condition is true. So it means that not a &lt;u&gt;prime number&lt;/u&gt;. If not true. So the if condition
        will not work. And will reach the endpoint of the loop.
        Then the value of &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;i&lt;/var&gt;
        will be incremented. And the loop will run again.&lt;/p&gt;

    &lt;p&gt;the loop will run repeatedly. Until the value of &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;i&lt;/var&gt; is equal to
        the &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;prime&lt;/var&gt;
        variable. And then when the value of &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;i&lt;/var&gt; is equal to
        the &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;prime&lt;/var&gt;
        variable. then the condition of the loop will be false.&lt;/p&gt;

    &lt;p&gt;now, cursor move on the next statement.&lt;/p&gt;

    &lt;p&gt;Now the if condition outside the loop will be checked.&lt;/p&gt;

    After this, if the &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;prime&lt;/var&gt; variable is
    equal to &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;i-1&lt;/var&gt;.
    Still not that prime number. And if not equal &lt;var style=&quot;background-color: #4a4a4a; border-radius: 4px; color: #9b9be4;&quot;&gt;i-1&lt;/var&gt;. So that
    number is a &lt;a href=&quot;https://www.blogger.com/blog/post/edit/preview/6309287525669005415/3125140243725574736&quot;&gt;prime number&lt;/a&gt;.
  
  
  
  
  &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div ne=&quot;0.6471445950080943&quot; style=&quot;background-color: #1f1f1f; line-height: 19px;&quot;&gt;&lt;div ne=&quot;0.029792163313193676&quot; style=&quot;background-color: #1f1f1f; line-height: 19px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: consolas, courier new, monospace; font-size: medium;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;Source code &lt;b&gt;prime number programming in c&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.4261810344127228&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
 #include &lt;iostream&gt;
using namespace std;
int main()
{
    int prime,fresh=0,i;
        cout&lt;&lt;&quot;Enter a number: &quot;;
        cin&gt;&gt;prime;

        for(i=2;i&lt;prime;i++)
        {
            
            
            if(prime%i==0)
            {
                cout&lt;&lt;prime&lt;&lt;&quot; is not a prime number&quot;;
                fresh=1;
                break;
            }
        }
    
    if(prime==i-1)
        cout&lt;&lt;prime&lt;&lt;&quot; is not a prime number&quot;;
    else if(fresh==0)
    {
       cout&lt;&lt;prime&lt;&lt;&quot; is a prime number&quot;;
    }
    return 0;
}

&lt;/textarea&gt;
  &lt;br /&gt;
&lt;/form&gt;
    
 &lt;br /&gt;
    
    
    &lt;p style=&quot;text-align: left;&quot;&gt;This is another method. To check the &lt;b&gt;prime number programming in c&lt;/b&gt;.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #d4d4d4; font-family: consolas, &amp;quot;courier new&amp;quot;, monospace; font-size: medium; white-space: pre;&quot;&gt;source code prime number programming in c&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.8653707568155591&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
  #include &lt;iostream&gt;
using namespace std;
int main()
{
    int prime,i;
        cout&lt;&lt;&quot;Enter a number: &quot;;
        cin&gt;&gt;prime;

        for(i=2;i&lt;prime;i++)
        { 
            if(prime%i==0)
            {
                break;
            }
        }
    
    if(i==prime)
        cout&lt;&lt;prime&lt;&lt;&quot; is a prime number&quot;;
    else
       cout&lt;&lt;prime&lt;&lt;&quot; is not a prime number&quot;;


    return 0;
}
&lt;/textarea&gt;
  &lt;br /&gt;
&lt;/form&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output Screen&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEign9hPc9119cbqEHV4h4Bi8n6xjRmiVy0etYB4jqJxMv_MDFHs3vSDVSYLCv5GnwQV_uYJ92qrMNClPzWN0_hK_QinGhC_HJOq9_wBUKXo-ftpR1SPfWaUqs2wRdCeoGdW2H47PI2f1Hs/s1499/prime-number.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;prime number,number primes, prime number programming in c&quot; border=&quot;0&quot; data-original-height=&quot;606&quot; data-original-width=&quot;1499&quot; height=&quot;258&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEign9hPc9119cbqEHV4h4Bi8n6xjRmiVy0etYB4jqJxMv_MDFHs3vSDVSYLCv5GnwQV_uYJ92qrMNClPzWN0_hK_QinGhC_HJOq9_wBUKXo-ftpR1SPfWaUqs2wRdCeoGdW2H47PI2f1Hs/w640-h258/prime-number.png&quot; title=&quot;prime number,number primes, prime number programming in c&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;strong&gt;Recommended Post&lt;/strong&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;
    
&lt;blockquote class=&quot;list2&quot;&gt;
&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-fibonacci-series-using-recursion.html&quot;&gt;c program fibonacci series using recursion&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-for-multiplication-of-two-matrices.html&quot;&gt;c program for multiplication of two matrices&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/find-greater-number-between-three.html&quot;&gt;find greater number between three&lt;/a&gt;&lt;/blockquote&gt;&lt;br /&gt;
    
    
&lt;div&gt;&lt;br /&gt;
  
  
  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
  

&lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;
  &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/3125140243725574736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/prime-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3125140243725574736'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3125140243725574736'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/prime-number.html' title='C++ Program to Check Whether a Number is Prime 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/AVvXsEi4e_83ykvoPTbc3P8ET64fa6tjj9POkLsgtl2QTX6qsA1fc7otE4upZajiErQJYlR6M7vPkRCmuJmjGzRRCZWF1lWGJ5vyX9At57SH-EyvsSqyUaP9tiE2xRfocj0juC8c1B7D_gEuC64/s72-c/prime-number.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-2665287539209130601</id><published>2020-09-15T14:12:00.003+05:30</published><updated>2021-01-20T11:42:25.783+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="c program pattern 4"/><title type='text'>c program pattern 4</title><content type='html'>
 &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEgfOGn9uAYA1AicdaK3aZYQCq8gCujut3iGDjjyJbct4I38SwX8ZYzNULONFpMT6cRsMpkE6BmHTQaLS7dLQgndVnp9voag891j0OJ98WPgOfilC0Itr9s4d3n3dBZSvr67UKZs-Uw8uzA/s2048/c-program-pattern-4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c program pattern 4&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfOGn9uAYA1AicdaK3aZYQCq8gCujut3iGDjjyJbct4I38SwX8ZYzNULONFpMT6cRsMpkE6BmHTQaLS7dLQgndVnp9voag891j0OJ98WPgOfilC0Itr9s4d3n3dBZSvr67UKZs-Uw8uzA/s16000/c-program-pattern-4.png&quot; title=&quot;c program pattern 4&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In this program we will write &lt;b&gt;c program pattern&lt;/b&gt; 4, we will understand how a &lt;a href=&quot;https://ancientcode1.blogspot.com/p/c-patterns.html&quot;&gt;pattern&lt;/a&gt; is made To understand this pattern, you must have &lt;a href=&quot;https://www.geeksforgeeks.org/c-language-set-1-introduction/&quot; target=&quot;_blank&quot;&gt;basic C&lt;/a&gt; knowledge and &lt;a href=&quot;https://www.tutorialspoint.com/cprogramming/c_loops.htm&quot; target=&quot;_blank&quot;&gt;loop&lt;/a&gt; information so that you can understand well.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;First of all, you can imagine the output screen then build your logic.&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;^^^^^&lt;/div&gt;&lt;div&gt;^^^^&lt;/div&gt;&lt;div&gt;^^^&lt;/div&gt;&lt;div&gt;^^&lt;/div&gt;&lt;div&gt;^&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;You must have this knowledge&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.geeksforgeeks.org/c-language-set-1-introduction/&quot; target=&quot;_blank&quot;&gt;basic c&lt;/a&gt;,&amp;nbsp; &lt;a href=&quot;https://codeforwin.org/2017/09/nested-loops-in-c-programming.html&quot; target=&quot;_blank&quot;&gt;nested loop&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program Logic&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;first of all, declare i and j&lt;/li&gt;&lt;li&gt;applying nested loop&lt;/li&gt;&lt;li&gt;i and j variables decide which position is print.&lt;/li&gt;&lt;li&gt;check this condition j&amp;lt;=6-i&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;c program pattern&amp;nbsp;&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;




&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.9889972959164572&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
  #include&lt;stdio.h&gt;
int main()
{
    int i,j;
    for(i=1;i&lt;=5;i++)
    {
        for(j=1;j&lt;=6-i;j++)
        {

                printf(&quot;^&quot;);

        }
        printf(&quot;\n&quot;);
    }
    return 0;
}
&lt;/textarea&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;/form&gt;&lt;p&gt;&lt;/p&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot; style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;This is the second approach program&lt;/span&gt;&lt;/form&gt;&lt;p&gt;&lt;/p&gt;&lt;h3&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot; style=&quot;text-align: left;&quot;&gt;c program logical ^ pattern&amp;nbsp;&lt;/form&gt;&lt;/h3&gt;

&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.9069912046284627&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
  
#include&lt;stdio.h&gt;
int main()
{
    int i,j;
    for(i=1;i&lt;=5;i++)
    {
        for(j=i;j&lt;=5;j++)
        {
            printf(&quot;^&quot;);
        }
        printf(&quot;\n&quot;);
    }
    return 0;
}
&lt;/textarea&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Output Screen&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOkSCERQkc3v6GJJD3CEdGnwFPEVhDlZr-LZX_u3D_VrB67-EJxPYFP-gpdRs8_foPSXNBOX_qSswoJUIF6nwKqHENJ6AfP9MeJ3N7wMCH-oEBtBFIymHr3viNwbkeQlM1IR4XU0Sc6eI/s1920/c-program-pattern-4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;c program pattern 4&quot; border=&quot;0&quot; data-original-height=&quot;1031&quot; data-original-width=&quot;1920&quot; height=&quot;336&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOkSCERQkc3v6GJJD3CEdGnwFPEVhDlZr-LZX_u3D_VrB67-EJxPYFP-gpdRs8_foPSXNBOX_qSswoJUIF6nwKqHENJ6AfP9MeJ3N7wMCH-oEBtBFIymHr3viNwbkeQlM1IR4XU0Sc6eI/w625-h336/c-program-pattern-4.png&quot; title=&quot;c program pattern 4&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Recommended link
&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/pattern-program-in-c.html&quot;&gt;pattern program in c | pyramid&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/c-program-triangle-pattern.html&quot;&gt;c program triangle pattern&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/average-program-in-cpp.html&quot;&gt;average program in cpp&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/find-greater-number-between-three.html&quot;&gt;find greater number between three&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-fibonacci-series-using-recursion.html&quot;&gt;c program fibonacci series using recursion&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/form&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;


  
  
  
  
  


&lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;







&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/2665287539209130601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/c-program-pattern-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/2665287539209130601'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/2665287539209130601'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/c-program-pattern-4.html' title='c program pattern 4'/><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/AVvXsEgfOGn9uAYA1AicdaK3aZYQCq8gCujut3iGDjjyJbct4I38SwX8ZYzNULONFpMT6cRsMpkE6BmHTQaLS7dLQgndVnp9voag891j0OJ98WPgOfilC0Itr9s4d3n3dBZSvr67UKZs-Uw8uzA/s72-c/c-program-pattern-4.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-3945379558482598236</id><published>2020-09-11T17:23:00.009+05:30</published><updated>2021-01-20T11:42:03.440+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="find greater number between three"/><title type='text'>find greater number between three </title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEhUbE4gQ9iLyChJjjni77PEiJrln2wyLxgk1pMj4OLb9MLACbOS89Si8O_jzH2LPPH1bLCizsCItt3fhPTqZCBVW4b0bHcf7XzIlgMv98jIx0223XNGnFmQ-LMYLrIyGYctx7umSslsojo/s2048/find-greater-number-between-three.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;find greater number between three&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUbE4gQ9iLyChJjjni77PEiJrln2wyLxgk1pMj4OLb9MLACbOS89Si8O_jzH2LPPH1bLCizsCItt3fhPTqZCBVW4b0bHcf7XzIlgMv98jIx0223XNGnFmQ-LMYLrIyGYctx7umSslsojo/s16000/find-greater-number-between-three.png&quot; title=&quot;find greater number between three&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In this example, we will explain to you write a CPP program to find&lt;b&gt;&amp;nbsp;&lt;/b&gt;a&lt;b&gt; greater number between three&lt;/b&gt; numbers. To understand this topic it is necessary to have knowledge of the basic CPP. Please read this article carefully so that you can understand the program to find a &lt;i&gt;greater number between three&lt;/i&gt; numbers.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;First of all, you can imagine the output screen then build your logic.&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;div&gt;Enter three number:45&lt;/div&gt;&lt;div&gt;75&lt;/div&gt;&lt;div&gt;89&lt;/div&gt;&lt;div&gt;89 is the Greatest number&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;You must have this knowledge&lt;/h3&gt;&lt;div&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_basic_syntax.htm&quot; target=&quot;_blank&quot;&gt;basic CPP&lt;/a&gt;, &lt;a href=&quot;https://www.w3schools.com/cpp/cpp_conditions.asp#:~:text=C%2B%2B%20has%20the%20following%20conditional,the%20first%20condition%20is%20false&quot; target=&quot;_blank&quot;&gt;if-else&lt;/a&gt;, &lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_conditional_operator.htm&quot; target=&quot;_blank&quot;&gt;conditional operator&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program Logic&lt;/h3&gt;&lt;div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;We have to input three numbers from the user.&lt;/li&gt;&lt;li&gt;With the help of conditional operators, we will examine the first two numbers. Which will be a larger number. We will assign it to a new variable.&lt;/li&gt;&lt;li&gt;Will then apply a condition. And then we will examine the new variable with the third variable. Which will be bigger than both. That is our big number.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;find greater number between three&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.8306079559715023&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
  #include&lt;iostream&gt;
using namespace std;
int main()
{
    int a,b,c;
   cout&lt;&lt;&quot;Enter three number:&quot;;
   cin&gt;&gt;a&gt;&gt;b&gt;&gt;c;
   int great=a&gt;b?a:b; 
   if(great&gt;c)
        cout&lt;&lt;great&lt;&lt;&quot; is a Greatest number&quot;;
        else
        {
            cout&lt;&lt;c&lt;&lt;&quot; is a Greatest number&quot;;
      }       
   return 0;
}
&lt;/textarea&gt;
  &lt;br /&gt;
&lt;/form&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Output Screen&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEinhxDKxBHYmhB1_oEmVA131nMGmp7ty-4vuOv8hgLR05I7oNyo4Uue1EHpt2WruIKqJiNRDeYoXO5rHvbRPvTjhJt0EQ-Ao5AoVzdzEW_P7RKEPDa1udo_IuYg_nQ3ffSdFNgWw2Jfd7s/s1522/find-greater-number-between-three.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;find greater number between three&quot; border=&quot;0&quot; data-original-height=&quot;1028&quot; data-original-width=&quot;1522&quot; height=&quot;338&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinhxDKxBHYmhB1_oEmVA131nMGmp7ty-4vuOv8hgLR05I7oNyo4Uue1EHpt2WruIKqJiNRDeYoXO5rHvbRPvTjhJt0EQ-Ao5AoVzdzEW_P7RKEPDa1udo_IuYg_nQ3ffSdFNgWw2Jfd7s/w500-h338/find-greater-number-between-three.png&quot; title=&quot;find greater number between three&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Recommended
  
  
  
  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/09/average-program-in-cpp.html&quot;&gt;average program in cpp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/06/write-a-program-to-calculate-simple-interest.html&quot;&gt;write a program to calculate simple interest&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/08/c-program-swap-two-numbers-using-pointers.html&quot;&gt;c program swap two numbers using pointers&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-fibonacci-series-using-recursion.html&quot;&gt;c program fibonacci series using recursion&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
  &lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;
  
  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/3945379558482598236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/find-greater-number-between-three.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3945379558482598236'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/3945379558482598236'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/find-greater-number-between-three.html' title='find greater number between three '/><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/AVvXsEhUbE4gQ9iLyChJjjni77PEiJrln2wyLxgk1pMj4OLb9MLACbOS89Si8O_jzH2LPPH1bLCizsCItt3fhPTqZCBVW4b0bHcf7XzIlgMv98jIx0223XNGnFmQ-LMYLrIyGYctx7umSslsojo/s72-c/find-greater-number-between-three.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-1380876006786102667</id><published>2020-09-11T09:58:00.008+05:30</published><updated>2021-01-20T11:41:46.959+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="average program in cpp"/><title type='text'>average program in cpp</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEiyqc2_w7w88HjePPF0nt7J4P3YnYXkKhu8mo14ItcudMGVqQNgwL6lB87A_2HsNKvuMD584cNQjrwtlHDDadwzyI40XnBUMXbbItcrY-fWcb11fLsZ_jeJeJcIIY45rea56jULpx8u3e4/s2048/average-program-+in-cpp.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;average program in cpp&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyqc2_w7w88HjePPF0nt7J4P3YnYXkKhu8mo14ItcudMGVqQNgwL6lB87A_2HsNKvuMD584cNQjrwtlHDDadwzyI40XnBUMXbbItcrY-fWcb11fLsZ_jeJeJcIIY45rea56jULpx8u3e4/s16000/average-program-+in-cpp.png&quot; title=&quot;average program in cpp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In this example, we will explain to you write a cpp program to calculate the &lt;b&gt;average of three numbers&lt;/b&gt;. To understand this topic it is necessary to have knowledge of average. Please read this article carefully so that you can understand the program to calculate the &lt;b&gt;average program in cpp&lt;/b&gt;.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;First of all, you can imagine the output screen then build your logic.&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enter three number:10&lt;/div&gt;&lt;div&gt;15&lt;/div&gt;&lt;div&gt;20&lt;/div&gt;&lt;div&gt;The average of numbers is:15&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;You must have this knowledge&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_basic_syntax.htm&quot; target=&quot;_blank&quot;&gt;Basic cpp&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program Logic&lt;/h3&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span&gt;Average formula&lt;/span&gt;&lt;/h4&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/AVvXsEhoNxcfGJmibEjeHkViLaLunsUIstpXNH3tNtLPmgBCaqHqAx9MYqkZJfhZB6recnojHhZCFfiiigNQfDhgeEId6rEPzX2y9C45pe_mhWcwLns3BjDYbgEaml64Ysl9Wjtb_NCyNwUTkSo/s414/Untitled.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;average program in cpp&quot; border=&quot;0&quot; data-original-height=&quot;194&quot; data-original-width=&quot;414&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoNxcfGJmibEjeHkViLaLunsUIstpXNH3tNtLPmgBCaqHqAx9MYqkZJfhZB6recnojHhZCFfiiigNQfDhgeEId6rEPzX2y9C45pe_mhWcwLns3BjDYbgEaml64Ysl9Wjtb_NCyNwUTkSo/w320-h150/Untitled.jpg&quot; title=&quot;average program in cpp&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;First of all, the user has to input three numbers.&lt;/li&gt;&lt;li&gt;Then apply the formula of average&lt;/li&gt;&lt;li&gt;After that, the result will be print.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;average program in cpp&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea autocomplete=&quot;off&quot; cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.6284927885719185&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
  #include&lt;iostream&gt;
using namespace std;
int main()
{
    int num1,num2,num3;
    cout&lt;&lt;&quot;Enter three number:&quot;;
    cin&gt;&gt;num1&gt;&gt;num2&gt;&gt;num3;
    int avg=(num1+num2+num3)/3;
    cout&lt;&lt;&quot;The average of numbers is:&quot;&lt;&lt;avg;
    return 0;

}
&lt;/textarea&gt;
  &lt;br /&gt;
&lt;/form&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Output Screen&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;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/AVvXsEizVq_L8r66N5R-QNu-KJDwjzKqrvCQ_lyiKUFTH6V7SKARSQBVEEtcZiq-d5NTi_K_J8Cdl5NlOajA2ZkM_VGRrne2tWAlZyxeLOkbdoObab1AynKD3dWcKhAZgWO_4x5_HVoxaqI9E68/s1543/average-program-in-cpp.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;average program in cpp&quot; border=&quot;0&quot; data-original-height=&quot;1019&quot; data-original-width=&quot;1543&quot; height=&quot;413&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizVq_L8r66N5R-QNu-KJDwjzKqrvCQ_lyiKUFTH6V7SKARSQBVEEtcZiq-d5NTi_K_J8Cdl5NlOajA2ZkM_VGRrne2tWAlZyxeLOkbdoObab1AynKD3dWcKhAZgWO_4x5_HVoxaqI9E68/w625-h413/average-program-in-cpp.png&quot; title=&quot;average program in cpp&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Recommended&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/06/write-a-program-to-calculate-simple-interest.html&quot; rel=&quot;&quot; target=&quot;_blank&quot;&gt;write a program to calculate simple interest&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/08/c-program-swap-two-numbers-using-pointers.html&quot; rel=&quot;&quot; target=&quot;_blank&quot;&gt;c program swap two numbers using pointers&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-fibonacci-series-using-recursion.html&quot; rel=&quot;&quot; target=&quot;_blank&quot;&gt;c program fibonacci series using recursion&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;a href=&quot;https://ancientcode1.blogspot.com/2020/07/c-program-for-multiplication-of-two-matrices.html&quot; rel=&quot;&quot; target=&quot;_blank&quot;&gt;c program for multiplication of two matrices&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
  
  
  
&lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;
  
  
  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/1380876006786102667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/average-program-in-cpp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/1380876006786102667'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/1380876006786102667'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/average-program-in-cpp.html' title='average program in cpp'/><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/AVvXsEiyqc2_w7w88HjePPF0nt7J4P3YnYXkKhu8mo14ItcudMGVqQNgwL6lB87A_2HsNKvuMD584cNQjrwtlHDDadwzyI40XnBUMXbbItcrY-fWcb11fLsZ_jeJeJcIIY45rea56jULpx8u3e4/s72-c/average-program-+in-cpp.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-6852926998462982281</id><published>2020-09-09T22:45:00.025+05:30</published><updated>2021-01-20T11:40:55.976+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="pattern program in c | pyramid"/><title type='text'>pattern program in c | pyramid</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEjkFr6NOIGe-5KNbo4plT-U3m2TAk39hNLgkBASJYiOWU4vojD9an7Y3qac7wN8dIbzoHE2vln6RuVC-sQdxBdqKHcib-CurmfSi3k1aU3DNEv0bQ7sFU8xrXDNaqQjRkxCP5ySKMsuZdc/s2048/pattern-program+in-c.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;pattern program in c&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkFr6NOIGe-5KNbo4plT-U3m2TAk39hNLgkBASJYiOWU4vojD9an7Y3qac7wN8dIbzoHE2vln6RuVC-sQdxBdqKHcib-CurmfSi3k1aU3DNEv0bQ7sFU8xrXDNaqQjRkxCP5ySKMsuZdc/s16000/pattern-program+in-c.png&quot; title=&quot;pattern program in c&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In this program, we will understand how to write a &lt;b&gt;pattern program in c&lt;/b&gt;. C knowledge is required to understand this program. We will try to understand the simple way the &lt;b&gt;pattern program in c&lt;/b&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;First of all, you can imagine the output screen then build your logic.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ^^^&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&amp;nbsp; &amp;nbsp; ^^^^^&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&amp;nbsp; ^^^^^^^&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;^^^^^^^^^&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;You must have this knowledge&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/c-programming&quot; target=&quot;_blank&quot;&gt;basic c&lt;/a&gt;, &lt;a href=&quot;https://www.tutorialspoint.com/cprogramming/c_nested_loops.htm&quot; target=&quot;_blank&quot;&gt;nested loop&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;Program logic&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;initialize i and j&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;create nested loop&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;inside nested loop declare if-else condition.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;if the condition is true so run if block otherwise else block run&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: open sans;&quot;&gt;&lt;span style=&quot;font-size: 15px; letter-spacing: 0.3px;&quot;&gt;This is&amp;nbsp;&lt;b&gt;a c patterns &lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.4140855780303141&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
  #include&lt;stdio.h&gt;
int main()
{
    int i,j;
    for(i=1;i&lt;=5;i++)
    {
        for(j=1;j&lt;=9;j++)
        {
            if(j&gt;=6-i&amp;&amp;j&lt;=4+i)
            {
                printf(&quot;^&quot;);
            }
            else
            {
                printf(&quot; &quot;);
            }
            
        }
        printf(&quot;\n&quot;);
    }
}
    
&lt;/textarea&gt;
  &lt;br /&gt;
&lt;/form&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Output Screen&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEjDrU5DBsMQeIz-9Q7GiL4Q1klp8D71VE329D5XilPyN46RFgMz2KrVAATOhHlRm2qqSkfNcKip9DdGs7jd9F_WXvH81OGIFckKC65bgEXk6LOdzVe3y7cE_t5pdkomNvZDKmrkLa5NiF8/s1532/pattern-program-in-c.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;pattern program in c&quot; border=&quot;0&quot; data-original-height=&quot;1028&quot; data-original-width=&quot;1532&quot; height=&quot;420&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDrU5DBsMQeIz-9Q7GiL4Q1klp8D71VE329D5XilPyN46RFgMz2KrVAATOhHlRm2qqSkfNcKip9DdGs7jd9F_WXvH81OGIFckKC65bgEXk6LOdzVe3y7cE_t5pdkomNvZDKmrkLa5NiF8/w625-h420/pattern-program-in-c.png&quot; title=&quot;pattern program in c&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;recommended&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/blog/post/preview/6309287525669005415/8584165737297891904&quot; style=&quot;box-sizing: border-box; color: #b1cdbc; font-family: &amp;quot;open sans&amp;quot;; font-size: 15px; letter-spacing: 0.3px; outline: none; transition: all 0s ease 0s;&quot;&gt;C program triangle pattern first&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;https://www.blogger.com/blog/post/preview/6309287525669005415/8584165737297891904&quot; style=&quot;background-color: #1f1f1f; box-sizing: border-box; color: #b1cdbc; font-family: &amp;quot;open sans&amp;quot;; font-size: 15px; letter-spacing: 0.3px; outline: none; transition: all 0s ease 0s;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;
  


  

  
  
    &lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;
  
  
  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/6852926998462982281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/pattern-program-in-c.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/6852926998462982281'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/6852926998462982281'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/pattern-program-in-c.html' title='pattern program in c | pyramid'/><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/AVvXsEjkFr6NOIGe-5KNbo4plT-U3m2TAk39hNLgkBASJYiOWU4vojD9an7Y3qac7wN8dIbzoHE2vln6RuVC-sQdxBdqKHcib-CurmfSi3k1aU3DNEv0bQ7sFU8xrXDNaqQjRkxCP5ySKMsuZdc/s72-c/pattern-program+in-c.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-8584165737297891904</id><published>2020-09-08T01:45:00.006+05:30</published><updated>2021-01-20T11:40:39.340+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="c program triangle pattern"/><title type='text'>c program triangle pattern</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEgNtaWew_cEmFl3WWTR30LBbvNez2UuerwBkavsNdxx_64YUCvmwyRFzVRe8FnweJn9rNWHO5WB3jGcRKTp_y-06MiQME5A7MGyI8fAELVsXJh9r8ZfAHvGj_B6RSkd8h49oCHrDUd5KtQ/s2048/c+program+triangle+pattern.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c program triangle pattern&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNtaWew_cEmFl3WWTR30LBbvNez2UuerwBkavsNdxx_64YUCvmwyRFzVRe8FnweJn9rNWHO5WB3jGcRKTp_y-06MiQME5A7MGyI8fAELVsXJh9r8ZfAHvGj_B6RSkd8h49oCHrDUd5KtQ/s16000/c+program+triangle+pattern.png&quot; title=&quot;c program triangle pattern&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In this program, we will understand how to write a &lt;b&gt;C program triangle pattern&lt;/b&gt; first. C knowledge is required to understand this program. We will try to understand the simple way the&amp;nbsp;&lt;i&gt;C program triangle pattern&lt;/i&gt; first.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;First of all, you can imagine the output screen then build your logic.&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;Enter number:5&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;^&lt;/div&gt;&lt;div&gt;^^&lt;/div&gt;&lt;div&gt;^^^&lt;/div&gt;&lt;div&gt;^^^^&lt;/div&gt;&lt;div&gt;^^^^^&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;You must have this knowledge&lt;/h3&gt;&lt;div&gt;&lt;a href=&quot;https://www.programiz.com/c-programming&quot; target=&quot;_blank&quot;&gt;basic c&lt;/a&gt;, &lt;a href=&quot;https://www.programiz.com/c-programming/c-for-loop&quot; target=&quot;_blank&quot;&gt;loop&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program logic&lt;/h3&gt;&lt;div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;first of all, we take input.&lt;/li&gt;&lt;li&gt;after that, we apply the nested loop.&lt;/li&gt;&lt;li&gt;i&amp;gt;=j decide which position print star.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;c program triangle pattern&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;

 



&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.6034272916254764&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;  
  #include&lt;stdio.h&gt;

int main()
{
    int i,j,num1;
    printf(&quot;Enter value: &quot;);
    scanf(&quot;%d&quot;,&amp;num1);

    for(i=1;i&lt;=num1;i++)
    {
        for(j=1;i&gt;=j;j++)
        {
            printf(&quot;^&quot;);
        }
        printf(&quot;\n&quot;);
    }
    return 0;
}
&lt;/textarea&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/form&gt;&lt;p&gt;&lt;/p&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot; style=&quot;text-align: left;&quot;&gt;Output Screen&lt;/form&gt;&lt;p&gt;&lt;/p&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;&lt;br /&gt;
&lt;/form&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/AVvXsEgIlB_aZx6QadFiDCY_w7w2uVBAjogyQ-H6p7URdXSZ210yT_Jm_UbaQ0sohTXyx7BcEQgcN5GnZ_UU5k-nH43zYuwi_G-38tDBY0xQzNCvKBkI6O7kA241jEZGBgl5sF1ZrZJmhrWMYKI/s1522/c-program-triangle-pattern.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c program triangle pattern&quot; border=&quot;0&quot; data-original-height=&quot;1025&quot; data-original-width=&quot;1522&quot; height=&quot;423&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIlB_aZx6QadFiDCY_w7w2uVBAjogyQ-H6p7URdXSZ210yT_Jm_UbaQ0sohTXyx7BcEQgcN5GnZ_UU5k-nH43zYuwi_G-38tDBY0xQzNCvKBkI6O7kA241jEZGBgl5sF1ZrZJmhrWMYKI/w625-h423/c-program-triangle-pattern.png&quot; title=&quot;c program triangle pattern&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;



&lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;


&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/8584165737297891904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/c-program-triangle-pattern.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/8584165737297891904'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/8584165737297891904'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/09/c-program-triangle-pattern.html' title='c program triangle pattern'/><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/AVvXsEgNtaWew_cEmFl3WWTR30LBbvNez2UuerwBkavsNdxx_64YUCvmwyRFzVRe8FnweJn9rNWHO5WB3jGcRKTp_y-06MiQME5A7MGyI8fAELVsXJh9r8ZfAHvGj_B6RSkd8h49oCHrDUd5KtQ/s72-c/c+program+triangle+pattern.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-5296351361881992946</id><published>2020-08-24T19:24:00.006+05:30</published><updated>2021-01-20T11:40:22.946+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="c program swap two numbers using pointers"/><title type='text'>c program swap two numbers using pointers</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEglR57pNM64ngnFSf0h0tMwwDTkr0S-JxU-fk7vdRe1VRcgFFBhpmu53k0c8YUPPeOkikhRxElzCRGsHCS9Uj_HNG_qRUvf5aYT6sz7rFoZNAQiWdJmQuHY9KScNLlOctDXt-aDBtOQ0L0/s2048/c+program+swap+two+numbers+using+pointers.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c program swap two numbers using pointers&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglR57pNM64ngnFSf0h0tMwwDTkr0S-JxU-fk7vdRe1VRcgFFBhpmu53k0c8YUPPeOkikhRxElzCRGsHCS9Uj_HNG_qRUvf5aYT6sz7rFoZNAQiWdJmQuHY9KScNLlOctDXt-aDBtOQ0L0/s16000/c+program+swap+two+numbers+using+pointers.png&quot; title=&quot;c program swap two numbers using pointers&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&amp;nbsp;In this program, we will understand how to write a &lt;/span&gt;C program to swap two numbers using pointers&lt;span style=&quot;font-weight: 400;&quot;&gt; and functions. How to swap two numbers using a call by reference. Logic to &lt;/span&gt;&lt;span&gt;swap two numbers using pointers in a C program&lt;/span&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span&gt;First of all, imagine the output screen.&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;OUTPUT&lt;/b&gt;&lt;/div&gt;&lt;blockquote&gt;Enter two number for swapping: 5&amp;nbsp;&lt;br /&gt;8&lt;br /&gt;a=5 and b=8&lt;br /&gt;after swapping&lt;br /&gt;a=8 and b=5&lt;br /&gt;You must have this knowledge.&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;basic c, function, pointer&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;You must have this knowledge&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.geeksforgeeks.org/c-language-set-1-introduction/&quot; target=&quot;_blank&quot;&gt;basic c&lt;/a&gt;, &lt;a href=&quot;https://www.programiz.com/c-programming/c-functions&quot; target=&quot;_blank&quot;&gt;function&lt;/a&gt;, &lt;a href=&quot;https://www.programiz.com/c-programming/c-pointers&quot; target=&quot;_blank&quot;&gt;pointer&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program logic&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;This is a call by reference program. In which we will be swapping with the help of the pointer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Declare two variables int type then store the data in it.&lt;/div&gt;&lt;div&gt;call Xchange function and passing address num1 and num2&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;after that xchange function arguments receive the address.&lt;/div&gt;&lt;div&gt;declare temporarily variable in a xchange function.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;temporarily variable assign *ptr1 value after that *ptr1 value asign *ptr2&amp;nbsp; value and then&amp;nbsp;&lt;/div&gt;&lt;div&gt;*ptr2 assign temporarily variable&lt;/div&gt;&lt;div&gt;now print your result.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;c program swap two numbers using pointers call by reference&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;


&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
&lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.09251015971502019&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot;&gt;#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
void xchange(int*,int*);
int main()
{
    int num$1,num$2;
    printf(&quot;Enter two number for swaping:&quot;);
    scanf(&quot;%d %d&quot;,&amp;num$1,&amp;num$2);
    printf(&quot;a= %d  b= %d&quot;,num$1,num$2);
        printf(&quot;\nAfter swaping:\n&quot;);
        xchange(&amp;num$1,&amp;num$2);
    printf(&quot;a= %d b= %d&quot;,num$1,num$2);
    return 0;
}
void xchange(int *ptr1, int *ptr2)
{
    int temp;
    temp=*ptr1;
    *ptr1=*ptr2;
    *ptr2=temp;
}
  
  
  
  
  
  
&lt;/textarea&gt;
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;/form&gt;

 &lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;

&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/5296351361881992946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/08/c-program-swap-two-numbers-using-pointers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/5296351361881992946'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/5296351361881992946'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/08/c-program-swap-two-numbers-using-pointers.html' title='c program swap two numbers using pointers'/><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/AVvXsEglR57pNM64ngnFSf0h0tMwwDTkr0S-JxU-fk7vdRe1VRcgFFBhpmu53k0c8YUPPeOkikhRxElzCRGsHCS9Uj_HNG_qRUvf5aYT6sz7rFoZNAQiWdJmQuHY9KScNLlOctDXt-aDBtOQ0L0/s72-c/c+program+swap+two+numbers+using+pointers.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-4326254434648580301</id><published>2020-08-23T23:17:00.010+05:30</published><updated>2021-01-20T11:40:01.560+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="program to calculate simple interest"/><title type='text'>program to calculate simple interest: Do You Really Need It?</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;

&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
c/c++ program solver,c++ program, new program, program code ,programing question&lt;br /&gt;
&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEife0PgMEeQpdbnXC5wHo855nV_ebB_B4Tr7zVmQOhdY0cUXxOnrnAYu1_OMavNT1P1yVNReENB1PfyofNpQ_NwdPmaHkpzCpFK45SDucuTax383ll_t_CMZC8Uoe9PQ3LgGkm5Ivi5ass/s2048/this+pointer+in+c%252B%252B.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;write a program to calculate simple interest in c++&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEife0PgMEeQpdbnXC5wHo855nV_ebB_B4Tr7zVmQOhdY0cUXxOnrnAYu1_OMavNT1P1yVNReENB1PfyofNpQ_NwdPmaHkpzCpFK45SDucuTax383ll_t_CMZC8Uoe9PQ3LgGkm5Ivi5ass/s16000/this+pointer+in+c%252B%252B.png&quot; title=&quot;write a program to calculate simple interest in c++&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;In this example, we will explain to you &lt;/span&gt;&lt;span&gt;write a &lt;b&gt;program to calculate simple interest&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; in c++. To&amp;nbsp;understand this topic it is necessary to have knowledge of simple interest. Please read this article carefully so that you can understand the &lt;i&gt;program to calculate simple interest.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;First of all, you can imagine the output screen then build your logic.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;Enter principle amount: 5000&lt;br /&gt;Enter the rate of interest: 5&lt;br /&gt;Enter the time in year:1&lt;br /&gt;Your interest is:1500.00&lt;br /&gt;your simple interest is: 51500.00&lt;/blockquote&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;You must have this knowledge&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.tutorialspoint.com/cplusplus/cpp_basic_syntax.htm&quot; target=&quot;_blank&quot;&gt;Basic cpp&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program Logic&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;This is a simple program. first of all, identify simple interest formula.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&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/AVvXsEjfldtccAmFHzc91TsFfZZtR0ROUAsyyrRmGbUnL9oAStz44aHYXjRnMFERMEI7RydpcgWe6-iZtwnaN3QYM_GJM-6cdibatXKbpCCxastptPwIycWBZfotKxQQmKEaL8dZpbuY0IbZ4xM/s437/simple+intrest+formula.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;write a program to calculate simple interest&quot; border=&quot;0&quot; data-original-height=&quot;198&quot; data-original-width=&quot;437&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfldtccAmFHzc91TsFfZZtR0ROUAsyyrRmGbUnL9oAStz44aHYXjRnMFERMEI7RydpcgWe6-iZtwnaN3QYM_GJM-6cdibatXKbpCCxastptPwIycWBZfotKxQQmKEaL8dZpbuY0IbZ4xM/d/simple+intrest+formula.jpg&quot; title=&quot;write a program to calculate simple interest&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Algorithm&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Start&lt;/li&gt;&lt;li&gt;Declare three variable float type.&lt;/li&gt;&lt;li&gt;Input user values pri_amount, rate, and time&lt;/li&gt;&lt;li&gt;apply simple interest formula.&lt;/li&gt;&lt;li&gt;print result&lt;/li&gt;&lt;li&gt;Stop&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Simple Interest program&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;

&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; data-darkreader-inline-color=&quot;&quot; name=&quot;myTextBox&quot; ne=&quot;0.8702810578105875&quot; rows=&quot;32&quot; style=&quot;--darkreader-inline-color: #8fe38f; color: #99e699;&quot;&gt;#include&lt;iostream&gt;
 using namespace std;
int main()
{
    float pri,time,rate;
    cout&lt;&lt;&quot;\t\t\tSimple Interest Program&quot;;
    cout&lt;&lt;&quot;\n\nEnter principle amount: &quot;;
    cin&gt;&gt;pri;
    cout&lt;&lt;&quot;\nEnter rate of Interest: &quot;;
    cin&gt;&gt;rate;
    cout&lt;&lt;&quot;\nEnter the time in year: &quot;;
    cin&gt;&gt;time;

    float intrest=(pri*rate*time)/100;
    float si=pri+intrest;
    cout&lt;&lt;&quot;\nCalculte interest is:&quot;&lt;&lt;intrest;
    cout&lt;&lt;&quot;\n\nsimple Interest is:&quot;&lt;&lt;si;
    return 0;
}
  
  
&lt;/textarea&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;/form&gt;




 &lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;

&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/4326254434648580301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/08/program-to-calculate-simple-interest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/4326254434648580301'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/4326254434648580301'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/08/program-to-calculate-simple-interest.html' title='program to calculate simple interest: Do You Really Need It?'/><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/AVvXsEife0PgMEeQpdbnXC5wHo855nV_ebB_B4Tr7zVmQOhdY0cUXxOnrnAYu1_OMavNT1P1yVNReENB1PfyofNpQ_NwdPmaHkpzCpFK45SDucuTax383ll_t_CMZC8Uoe9PQ3LgGkm5Ivi5ass/s72-c/this+pointer+in+c%252B%252B.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-5611838992926710477</id><published>2020-07-28T15:02:00.162+05:30</published><updated>2021-01-20T11:39:43.993+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="c program fibonacci series using recursion"/><title type='text'>How To Teach c program fibonacci series using recursion Like A beginner</title><content type='html'>
 &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEYshaHw7n2WZnEQG_srk2xb5pLXKu9TkATNyDGLPVTdipv_Q8t6poYnUsjb2Cj0iNYVN4c2vHJBhN4dtxs-qd2AnU955HI-J80ntptREUU1NJR2pdOUVJWrA1_lDeEdXj2sA6PFlDQKc/s2048/this+pointer+in+c%252B%252B+%25282%2529.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEYshaHw7n2WZnEQG_srk2xb5pLXKu9TkATNyDGLPVTdipv_Q8t6poYnUsjb2Cj0iNYVN4c2vHJBhN4dtxs-qd2AnU955HI-J80ntptREUU1NJR2pdOUVJWrA1_lDeEdXj2sA6PFlDQKc/s640/this+pointer+in+c%252B%252B+%25282%2529.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;In this program, we will understand how to write a &lt;b&gt;c program Fibonacci series using recursion&lt;/b&gt;. Basic knowledge is required to understand this program. We will try to understand the simple way &lt;b&gt;c program Fibonacci series using recursion&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;What is the&amp;nbsp;&lt;/b&gt;&lt;b&gt;Fibonacci series?&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;A Fibonacci number is a series of numbers in which each Fibonacci number is obtained by adding two preceding numbers.&amp;nbsp;&lt;/li&gt;&lt;li&gt;This means that the next number in the series is the sum of the two previous numbers.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The first two numbers in the series are taken as 0 and 1. By adding 0 and 1, we get the third number. Then by adding the second and third numbers (ie) 1 and 1 we get the fourth number. As 2, and so on, the process moves forward.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Thus, we get the Fibonacci series as 0, 1, 1, 2, 3, 5, 8, …….N Therefore, the obtained series is called the Fibonacci number series.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;First of all, you can imagine the output screen then build your logic.&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;Output&lt;/div&gt;&lt;div&gt;Enter First N number 5&lt;/div&gt;&lt;div&gt;1 1 2 3 5&amp;nbsp;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;You must have this knowledge&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://users.cs.cf.ac.uk/Dave.Marshall/C/node4.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;basic c&lt;/a&gt;, &lt;a href=&quot;https://www.google.com/search?sxsrf=ALeKk035Zf3axYpbCDIpZXwqJqP0yU20LA%3A1598431008790&amp;amp;source=hp&amp;amp;ei=IB9GX-WULsjf9QPF_ryQBA&amp;amp;q=what+is+c+function&amp;amp;oq=what+is+c+funct&amp;amp;gs_lcp=CgZwc3ktYWIQAxgAMgIIADICCAAyBggAEBYQHjIGCAAQFhAeMgYIABAWEB4yBggAEBYQHjIGCAAQFhAeMgYIABAWEB4yBggAEBYQHjIGCAAQFhAeOgQIIxAnOgUIABCRAjoICAAQsQMQgwE6BQguELEDOgUIABCxAzoHCCMQ6gIQJzoHCC4Q6gIQJzoLCC4QsQMQxwEQowI6AgguOggIABCxAxCRAjoECAAQClDMElizU2C9XGgDcAB4AIAB4wGIAdEWkgEGMC4xNi4ymAEAoAEBqgEHZ3dzLXdperABCg&amp;amp;sclient=psy-ab&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;function&lt;/a&gt;, &lt;a href=&quot;https://www.google.com/search?sxsrf=ALeKk00-a5vTGDSDOnp-hESASrakggXv5A%3A1598431021185&amp;amp;ei=LR9GX9b_CtTyrAHcyquQDg&amp;amp;q=what+is+recursive+function+in+c&amp;amp;oq=what+is+c++recfunction&amp;amp;gs_lcp=CgZwc3ktYWIQAxgAMggIABAIEAcQHjIICAAQCBAHEB4yCAgAEAgQBxAeMggIABAIEAcQHjIICAAQCBAHEB4yCAgAEAgQBxAeMggIABAIEAcQHjIICAAQCBAHEB4yCAgAEAgQBxAeMggIABAIEAcQHjoECAAQRzoECCMQJzoCCAA6BggAEAcQHjoHCCMQsAIQJzoECAAQDVCqlgVY0qAFYMm6BWgAcAJ4AIABvwGIAZoFkgEDMC40mAEAoAEBqgEHZ3dzLXdpesABAQ&amp;amp;sclient=psy-ab&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;recursion&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEgFel0nGIFAoGBqrhd7qTgthKQ3yCemvecof9OVV_AeESj7ikFhdN4vPLoclaLpnN_wqibu9uwN0j46TMlUUjblUVypD9ofcg1iD19dQkiGpPqiK5NoORjycCfiwP9V0yvvRsuwm_2doGc/s608/Fibonacci+series+formula+-+Word+%2528Product+Activation+Failed%2529+9_3_2020+5_10_42+PM+%25284%2529.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c program fibonacci series using recursion&quot; border=&quot;0&quot; data-original-height=&quot;217&quot; data-original-width=&quot;608&quot; height=&quot;114&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFel0nGIFAoGBqrhd7qTgthKQ3yCemvecof9OVV_AeESj7ikFhdN4vPLoclaLpnN_wqibu9uwN0j46TMlUUjblUVypD9ofcg1iD19dQkiGpPqiK5NoORjycCfiwP9V0yvvRsuwm_2doGc/w320-h114/Fibonacci+series+formula+-+Word+%2528Product+Activation+Failed%2529+9_3_2020+5_10_42+PM+%25284%2529.png&quot; title=&quot;c program fibonacci series using recursion&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program logic&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;First of all, we have to take input from the user so that we know how many terms we have to print. After that, we will call a function by putting a loop and running that loop as many times as the term user has inputted. Then when we call the function, we will pass the actual argument into it. So that the function receives the formal argument of the definition.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Within the function definition, we will apply the condition if the condition is true then 1 and 2 are returned if the condition is not true then the next statement of the function will run.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the next statement, we will call the same function twice inside the return statement by adding it together so that the function will call itself again and again until the return value 1 or 2 is found.&lt;/div&gt;&lt;div&gt;By doing this, the function will return one value each, which will start printing the Fibonacci series.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program print Fibonacci series with recursion&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;

&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; data-darkreader-inline-color=&quot;&quot; name=&quot;myTextBox&quot; ne=&quot;0.9337279435584043&quot; rows=&quot;32&quot; style=&quot;--darkreader-inline-color: #8fe38f; color: #99e699;&quot;&gt;  
  #include&lt;stdio.h&gt;

int fibon(int);

int main()
{
    //program print Fibonacci series with recursion
 int n,num;

         printf(&quot;\t\tFibonacci series with recursion program\n\n\n &quot;);

        printf(&quot;Enter first N numbers for print Fibonacci series:&quot;);
        scanf(&quot;%d&quot;,&amp;num);
    for(n=1;n&lt;=num;n++)
    printf(&quot;%d &quot;,fibon(n));
    return 0;

}
int fibon(int n)
{
    if(n==1||n==2)
        return(1);
    return(fibon(n-1)+fibon(n-2));
}
                       
                       
&lt;/textarea&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/form&gt;&lt;h3&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot; style=&quot;text-align: left;&quot;&gt;Output Screen&lt;/form&gt;&lt;/h3&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkyh4wIx5pmtRfE06o0yDN-jqPE41xy0kiIUvj2dpUxRXFD8Nd104NvOChf-u-VS2wkQWz7B55Z5ND7_8Dfugejj7AJ7B40PB6SqDVJ98J6gKO6J2qUsA2eYlkyIFomsuHTzzqF8z2RnQ/s1096/Screenshot+8_25_2020+8_40_07+PM+%25282%2529.png&quot; style=&quot;clear: left; display: inline; margin-bottom: 1em; margin-left: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;c program fibonacci series using recursion&quot; border=&quot;0&quot; data-original-height=&quot;201&quot; data-original-width=&quot;1096&quot; height=&quot;117&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkyh4wIx5pmtRfE06o0yDN-jqPE41xy0kiIUvj2dpUxRXFD8Nd104NvOChf-u-VS2wkQWz7B55Z5ND7_8Dfugejj7AJ7B40PB6SqDVJ98J6gKO6J2qUsA2eYlkyIFomsuHTzzqF8z2RnQ/w640-h117/Screenshot+8_25_2020+8_40_07+PM+%25282%2529.png&quot; title=&quot;c program fibonacci series using recursion&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/form&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/AVvXsEgkyh4wIx5pmtRfE06o0yDN-jqPE41xy0kiIUvj2dpUxRXFD8Nd104NvOChf-u-VS2wkQWz7B55Z5ND7_8Dfugejj7AJ7B40PB6SqDVJ98J6gKO6J2qUsA2eYlkyIFomsuHTzzqF8z2RnQ/s1096/Screenshot+8_25_2020+8_40_07+PM+%25282%2529.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkyh4wIx5pmtRfE06o0yDN-jqPE41xy0kiIUvj2dpUxRXFD8Nd104NvOChf-u-VS2wkQWz7B55Z5ND7_8Dfugejj7AJ7B40PB6SqDVJ98J6gKO6J2qUsA2eYlkyIFomsuHTzzqF8z2RnQ/s1096/Screenshot+8_25_2020+8_40_07+PM+%25282%2529.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkyh4wIx5pmtRfE06o0yDN-jqPE41xy0kiIUvj2dpUxRXFD8Nd104NvOChf-u-VS2wkQWz7B55Z5ND7_8Dfugejj7AJ7B40PB6SqDVJ98J6gKO6J2qUsA2eYlkyIFomsuHTzzqF8z2RnQ/s1096/Screenshot+8_25_2020+8_40_07+PM+%25282%2529.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkyh4wIx5pmtRfE06o0yDN-jqPE41xy0kiIUvj2dpUxRXFD8Nd104NvOChf-u-VS2wkQWz7B55Z5ND7_8Dfugejj7AJ7B40PB6SqDVJ98J6gKO6J2qUsA2eYlkyIFomsuHTzzqF8z2RnQ/s1096/Screenshot+8_25_2020+8_40_07+PM+%25282%2529.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
    

    
    
    
    
&lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;

&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/5611838992926710477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/07/c-program-fibonacci-series-using-recursion.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/5611838992926710477'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/5611838992926710477'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/07/c-program-fibonacci-series-using-recursion.html' title='How To Teach c program fibonacci series using recursion Like A beginner'/><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/AVvXsEjEYshaHw7n2WZnEQG_srk2xb5pLXKu9TkATNyDGLPVTdipv_Q8t6poYnUsjb2Cj0iNYVN4c2vHJBhN4dtxs-qd2AnU955HI-J80ntptREUU1NJR2pdOUVJWrA1_lDeEdXj2sA6PFlDQKc/s72-c/this+pointer+in+c%252B%252B+%25282%2529.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-1761484832439541559</id><published>2020-07-28T14:25:00.342+05:30</published><updated>2021-04-30T17:52:38.426+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="c program for multiplication of two matrices"/><title type='text'>How To Teach c program for multiplication of two matrices Like A beginner</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}
&lt;/style&gt;
&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
function copyToClipboard(element) {
  var $temp = $(&quot;&lt;input&gt;&quot;);
  $(&quot;body&quot;).append($temp);
  $temp.val($(element).text()).select();
  document.execCommand(&quot;copy&quot;);
  $temp.remove();
}
&lt;/script&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;c/c++ program solver,c++ program, new program, program code ,programing question&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEhRQaUD9mRhQxSAWGnw3tO1pbxNdbA2kvFOBHyujYDuSB3a09_BTpon8193pmnS1do23ZuV9dLcCVCHdMcnFBnsFivyX_FadrqQfE4u_0NCzwbGlgeDmQA_v66Ue4jhtPXkBu5ZG1cOYZU/s2048/c-program-for-multiplication-of-two-matrices.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c program for multiplication of two matrices&quot; border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRQaUD9mRhQxSAWGnw3tO1pbxNdbA2kvFOBHyujYDuSB3a09_BTpon8193pmnS1do23ZuV9dLcCVCHdMcnFBnsFivyX_FadrqQfE4u_0NCzwbGlgeDmQA_v66Ue4jhtPXkBu5ZG1cOYZU/s16000/c-program-for-multiplication-of-two-matrices.png&quot; title=&quot;c program for multiplication of two matrices&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;In this program, we will understand how to write a &lt;b&gt;c program for matrix multiplication&lt;/b&gt;. C knowledge is required to understand this program. We will try to understand the simple way c&lt;i&gt; program for multiplication of two matrices&lt;/i&gt;.&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.google.com/search?sxsrf=ALeKk03HM7Tql2TWxL6LQ14XejN-lUwlqQ%3A1599134673489&amp;amp;ei=0dtQX4q1Hc2CyAP_iaG4Ag&amp;amp;q=What+is+matrix%3F&amp;amp;oq=What+is+matrix%3F&amp;amp;gs_lcp=CgZwc3ktYWIQAzIFCAAQkQIyAggAMgIIADIGCAAQBxAeMgYIABAHEB4yAggAMgYIABAHEB4yAggAMgYIABAHEB4yBggAEAcQHjoECAAQRzoHCCMQsAIQJzoECAAQDVDhhAJYnYoCYIGQAmgAcAF4AIABxAGIAf0FkgEDMC40mAEAoAEBqgEHZ3dzLXdpesABAQ&amp;amp;sclient=psy-ab&amp;amp;ved=0ahUKEwjK4aTx-MzrAhVNAXIKHf9ECCcQ4dUDCA0&amp;amp;uact=5&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;What is the matrix?&lt;/a&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;A matrix is an arrangement of numbers into rows and columns.&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeAOz8Q6OagF04X1fpOvw1l9fcBC1lyDVhQBLo0utRmomd92bt2YJV0u-I8xAB8tr6kmCj3zB3Aca_7sKX14eQkoNIng13BU_j_9wRGRGh1CKi6mgHtyanCRo5iGXOQnLoVIfn6qZ1ZX8/s320/Document1+-+Word+%2528Product+Activation+Failed%2529+9_6_2020+1_51_28+PM+%25283%2529.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;c program for multiplication of two matrices&quot; border=&quot;0&quot; data-original-height=&quot;112&quot; data-original-width=&quot;320&quot; height=&quot;112&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeAOz8Q6OagF04X1fpOvw1l9fcBC1lyDVhQBLo0utRmomd92bt2YJV0u-I8xAB8tr6kmCj3zB3Aca_7sKX14eQkoNIng13BU_j_9wRGRGh1CKi6mgHtyanCRo5iGXOQnLoVIfn6qZ1ZX8/w320-h112/Document1+-+Word+%2528Product+Activation+Failed%2529+9_6_2020+1_51_28+PM+%25283%2529.png&quot; title=&quot;c program for multiplication of two matrices&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Rows: A horizontal series of a number&amp;nbsp;&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/b/R29vZ2xl/AVvXsEjrmxKkZsqWoZYeEYfhzijDparfgyLrIs6t_a0xWEFpAjK2YN5WPlrjlHcBa2vGZGD8TlzeUnxBrxFY57r_7V6lV8aUv1lQPSxEMxmbRukP9UkRb6aCZa6zyJxYD7uU8A35xFxxZDXEW4k/s253/Document1+-+Word+%2528Product+Activation+Failed%2529+9_6_2020+11_09_08+PM+%25282%2529.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c program for multiplication of two matrices&quot; border=&quot;0&quot; data-original-height=&quot;246&quot; data-original-width=&quot;253&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrmxKkZsqWoZYeEYfhzijDparfgyLrIs6t_a0xWEFpAjK2YN5WPlrjlHcBa2vGZGD8TlzeUnxBrxFY57r_7V6lV8aUv1lQPSxEMxmbRukP9UkRb6aCZa6zyJxYD7uU8A35xFxxZDXEW4k/w162-h158/Document1+-+Word+%2528Product+Activation+Failed%2529+9_6_2020+11_09_08+PM+%25282%2529.png&quot; title=&quot;c program for multiplication of two matrices&quot; width=&quot;162&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Columns: A vertical series of a number&lt;/p&gt;&lt;/div&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/AVvXsEgdQnY_NMrFRhL8OQLzUyPRJpmFfMn654zVr_xsJ4UL8dbRp2TdOt2tabHI10K_eJ-53Ncr8ZavONIWGW8HEvLHLePG6q_jOxcKciVt4jn3N-l_eu3e4OaMc4ZF-mSkjS1b6QUCclEQTdM/s243/Document1+-+Word+%2528Product+Activation+Failed%2529+9_6_2020+11_10_06+PM+%25282%2529.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c program for multiplication of two matrices, c matrix program&quot; border=&quot;0&quot; data-original-height=&quot;243&quot; data-original-width=&quot;236&quot; height=&quot;155&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdQnY_NMrFRhL8OQLzUyPRJpmFfMn654zVr_xsJ4UL8dbRp2TdOt2tabHI10K_eJ-53Ncr8ZavONIWGW8HEvLHLePG6q_jOxcKciVt4jn3N-l_eu3e4OaMc4ZF-mSkjS1b6QUCclEQTdM/w151-h155/Document1+-+Word+%2528Product+Activation+Failed%2529+9_6_2020+11_10_06+PM+%25282%2529.png&quot; title=&quot;c program for multiplication of two matrices, c matrix program&quot; width=&quot;151&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.google.com/search?q=What+is+the+matrix+multiplication%3F&amp;amp;sxsrf=ALeKk02Z2uodOhXr47rHC04eaE00xcBgPA:1599134746002&amp;amp;source=lnms&amp;amp;tbm=isch&amp;amp;sa=X&amp;amp;ved=2ahUKEwi50e6T-czrAhVOT30KHVqTBdMQ_AUoAXoECBEQAw&amp;amp;biw=1536&amp;amp;bih=722#imgrc=JJtE6qeCgt9ELM&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;What is the matrix multiplication?&lt;/a&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&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/AVvXsEimamOpSoJF6J-1NSr5lB1gBvl6NnqwYVTBJ_AudkGPQcEevQIehKpaPoI9CPo0ipktgp-AyZP2Vxtm6yU8k-rraPQFefAEoUWCICAvHe6kfUisdFTxnbkQbZ31xU-CoAmUuyHzJVSUxZQ/s850/Document1+-+Word+%2528Product+Activation+Failed%2529+9_6_2020+1_37_54+PM+%25284%2529.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c program for multiplication of two matrices&quot; border=&quot;0&quot; data-original-height=&quot;850&quot; data-original-width=&quot;766&quot; height=&quot;781&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimamOpSoJF6J-1NSr5lB1gBvl6NnqwYVTBJ_AudkGPQcEevQIehKpaPoI9CPo0ipktgp-AyZP2Vxtm6yU8k-rraPQFefAEoUWCICAvHe6kfUisdFTxnbkQbZ31xU-CoAmUuyHzJVSUxZQ/w704-h781/Document1+-+Word+%2528Product+Activation+Failed%2529+9_6_2020+1_37_54+PM+%25284%2529.png&quot; title=&quot;c program for multiplication of two matrices&quot; width=&quot;704&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;First of all, you can imagine the output screen then build your logic.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;Enter first matrix:2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;&lt;div&gt;|2&amp;nbsp; 2&amp;nbsp; 2|&amp;nbsp;&lt;/div&gt;&lt;div&gt;|2&amp;nbsp; 2&amp;nbsp; 2|&lt;/div&gt;&lt;div&gt;|2&amp;nbsp; 2&amp;nbsp; 2|&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enter the second matrix:2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;2&lt;/div&gt;&lt;div&gt;|2&amp;nbsp; 2&amp;nbsp; 2|&amp;nbsp;&lt;/div&gt;&lt;div&gt;|2&amp;nbsp; 2&amp;nbsp; 2|&lt;/div&gt;&lt;div&gt;|2&amp;nbsp; 2&amp;nbsp; 2|&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The product of two matrices is:&lt;/div&gt;&lt;div&gt;|12 12&amp;nbsp; 12|&lt;/div&gt;&lt;div&gt;|12 12&amp;nbsp; 12|&lt;/div&gt;&lt;div&gt;|12 12&amp;nbsp; 12|&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;You must have this knowledge&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/c-programming&quot; target=&quot;_blank&quot;&gt;basic c&lt;/a&gt;, &lt;a href=&quot;https://www.programiz.com/c-programming/c-for-loop&quot; target=&quot;_blank&quot;&gt;loop&lt;/a&gt;, &lt;a href=&quot;https://www.javatpoint.com/nested-loops-in-c#:~:text=Nesting%20of%20loops%20is%20the,of%20statements%20inside%20another%20loop.&amp;amp;text=The%20nesting%20level%20can%20be,inside%20a%20&#39;for&#39;%20loop.&quot; target=&quot;_blank&quot;&gt;nested loop&lt;/a&gt;, &lt;a href=&quot;https://www.javatpoint.com/nested-loops-in-c#:~:text=Nesting%20of%20loops%20is%20the,of%20statements%20inside%20another%20loop.&amp;amp;text=The%20nesting%20level%20can%20be,inside%20a%20&#39;for&#39;%20loop.&quot; target=&quot;_blank&quot;&gt;array&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program logic&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;First, we made two arrays for two dimensional.&lt;/li&gt;&lt;li&gt;Then we took input from the user via a nested loop.&lt;/li&gt;&lt;li&gt;Then apply the nested loop. And multiply the row of the first array in the column of the second array and then sum. And then store it in a variable of the sum name. And then data store into a new array.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;After that, we print the result for the matrix form.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;matrix mulitplication program&lt;/h3&gt;&lt;div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;



&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot;&gt;
  &lt;textarea cols=&quot;70&quot; name=&quot;myTextBox&quot; ne=&quot;0.4549321570217302&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot; id=&quot;p1&quot;&gt;  
 
    #include&lt;stdio.h&gt;
main()
{
    int firstmatrix[3][3],secondmatrix[3][3],mulmatrix[3][3],k,i,j,sum;
    printf(&quot;Enter first matrix:&quot;);
    for(i=0;i&lt;=2;i++)
        for(j=0;j&lt;=2;j++)
        scanf(&quot;%d&quot;,&amp;firstmatrix[i][j]);
    for(i=0;i&lt;=2;i++)
    {
        for(j=0;j&lt;=2;j++)
            printf(&quot;|%d| &quot;,firstmatrix[i][j]);
            printf(&quot;\n&quot;);
    }
    printf(&quot;\n\nEnter second matrix:&quot;);
    for(i=0;i&lt;=2;i++)
        for(j=0;j&lt;=2;j++)
        scanf(&quot;%d&quot;,&amp;secondmatrix[i][j]);
    for(i=0;i&lt;=2;i++)
    {
        for(j=0;j&lt;=2;j++)
            printf(&quot;|%d| &quot;,secondmatrix[i][j]);
            printf(&quot;\n&quot;);
    }
    printf(&quot;\n\n\n\n\n&quot;);
    for(i=0;i&lt;=2;i++)

        for(j=0;j&lt;=2;j++)
        {
            sum=0;
            for(k=0;k&lt;=2;k++)



                sum=sum+firstmatrix[i][k]*secondmatrix[k][j];
                mulmatrix[i][j]=sum;

        }
printf(&quot;\nProduct of two matrices is:\n&quot;);
    for(i=0;i&lt;=2;i++)
    {
        for(j=0;j&lt;=2;j++)
            printf(&quot;|%d| &quot;,mulmatrix[i][j]);
            printf(&quot;\n&quot;);
    }
       return 0;
}
&lt;/textarea&gt;
    &lt;button onclick=&quot;copyToClipboard(&#39;#p1&#39;)&quot;&gt;Copy&lt;/button&gt;
  &lt;br /&gt;&lt;br /&gt;&lt;/form&gt;&lt;p&gt;&lt;/p&gt;&lt;form action=&quot;//www.html.am/html-codes/textboxes/submitted.cfm&quot; style=&quot;text-align: left;&quot;&gt;Output Screen&lt;/form&gt;&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/b/R29vZ2xl/AVvXsEiYLt1hyphenhyphenVvJsbm93cgkSauKhIWqXSXjWRfu192uA7Gv-RMChaCDR6_fZRYIM5XeNCkID49jqFScbIbFLUBzR3vliWBnwt78RjEUEk7XuDwJZRf_QEKTa75a6mIEF9xNvQEgax1wAlLzi5A/s1504/example.c+-+vs+code+cprogram+-+Visual+Studio+Code+9_3_2020+5_55_54+PM+%25282%2529.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYLt1hyphenhyphenVvJsbm93cgkSauKhIWqXSXjWRfu192uA7Gv-RMChaCDR6_fZRYIM5XeNCkID49jqFScbIbFLUBzR3vliWBnwt78RjEUEk7XuDwJZRf_QEKTa75a6mIEF9xNvQEgax1wAlLzi5A/s1504/example.c+-+vs+code+cprogram+-+Visual+Studio+Code+9_3_2020+5_55_54+PM+%25282%2529.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYLt1hyphenhyphenVvJsbm93cgkSauKhIWqXSXjWRfu192uA7Gv-RMChaCDR6_fZRYIM5XeNCkID49jqFScbIbFLUBzR3vliWBnwt78RjEUEk7XuDwJZRf_QEKTa75a6mIEF9xNvQEgax1wAlLzi5A/s1504/example.c+-+vs+code+cprogram+-+Visual+Studio+Code+9_3_2020+5_55_54+PM+%25282%2529.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYLt1hyphenhyphenVvJsbm93cgkSauKhIWqXSXjWRfu192uA7Gv-RMChaCDR6_fZRYIM5XeNCkID49jqFScbIbFLUBzR3vliWBnwt78RjEUEk7XuDwJZRf_QEKTa75a6mIEF9xNvQEgax1wAlLzi5A/s1504/example.c+-+vs+code+cprogram+-+Visual+Studio+Code+9_3_2020+5_55_54+PM+%25282%2529.png&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img alt=&quot;c language matrix multiplication&quot; border=&quot;0&quot; data-original-height=&quot;1271&quot; data-original-width=&quot;1504&quot; height=&quot;529&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYLt1hyphenhyphenVvJsbm93cgkSauKhIWqXSXjWRfu192uA7Gv-RMChaCDR6_fZRYIM5XeNCkID49jqFScbIbFLUBzR3vliWBnwt78RjEUEk7XuDwJZRf_QEKTa75a6mIEF9xNvQEgax1wAlLzi5A/w625-h529/example.c+-+vs+code+cprogram+-+Visual+Studio+Code+9_3_2020+5_55_54+PM+%25282%2529.png&quot; title=&quot;c language matrix multiplication&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;




&lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;😊&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below.😊&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;

&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/1761484832439541559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/07/c-program-for-multiplication-of-two-matrices.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/1761484832439541559'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/1761484832439541559'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/07/c-program-for-multiplication-of-two-matrices.html' title='How To Teach c program for multiplication of two matrices Like A beginner'/><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/AVvXsEhRQaUD9mRhQxSAWGnw3tO1pbxNdbA2kvFOBHyujYDuSB3a09_BTpon8193pmnS1do23ZuV9dLcCVCHdMcnFBnsFivyX_FadrqQfE4u_0NCzwbGlgeDmQA_v66Ue4jhtPXkBu5ZG1cOYZU/s72-c/c-program-for-multiplication-of-two-matrices.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6309287525669005415.post-246739090453378302</id><published>2020-05-02T17:19:00.144+05:30</published><updated>2021-04-27T14:54:20.885+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="default arguments in c++ program"/><title type='text'>How To Teach Default argument in cpp Like A Pro</title><content type='html'> &lt;style&gt; 
input[type=text], select, textarea {
  width: 50%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

&lt;/style&gt;
&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
function copyToClipboard(element) {
  var $temp = $(&quot;&lt;input&gt;&quot;);
  $(&quot;body&quot;).append($temp);
  $temp.val($(element).text()).select();
  document.execCommand(&quot;copy&quot;);
  $temp.remove();
}
&lt;/script&gt;

&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
c/c++ program solver,c++ program, new program, program code ,programing question&lt;br /&gt;
&lt;br /&gt;&lt;/div&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/AVvXsEgYOPVc_sBKGlFIeWFa2n1GGpjlgXlbLO5LCYYl16oG_jfPzBdqyi2Lp-yQEmjdEt586yoTwmhjW9bGyzpVpJwbSaE9LR0a23zfKB51WlHdp2GZ2whcrwwG22NN6JD8DIqsnTMBqIxVHuA/s2048/default+argument+in+c%252B%252B.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1152&quot; data-original-width=&quot;2048&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYOPVc_sBKGlFIeWFa2n1GGpjlgXlbLO5LCYYl16oG_jfPzBdqyi2Lp-yQEmjdEt586yoTwmhjW9bGyzpVpJwbSaE9LR0a23zfKB51WlHdp2GZ2whcrwwG22NN6JD8DIqsnTMBqIxVHuA/s16000/default+argument+in+c%252B%252B.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;h1 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-large; font-weight: normal;&quot;&gt;In this example, we will explain to you how to use the &lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;Default argument in c++&lt;/span&gt;&lt;span style=&quot;font-size: x-large; font-weight: normal;&quot;&gt;. To understand this topic it is necessary to have basic knowledge of C++. Please read this article carefully so that you can understand the &lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;Default argument in c++.&lt;/span&gt;&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;Default arguments&amp;nbsp;&lt;/b&gt;&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;c++ give new features in functions the name is &lt;i&gt;default argument&lt;/i&gt;. The &lt;b&gt;default argumen&lt;/b&gt;t is a new concept in function. Now you can set argument value in function declarations. but according to your need right to left.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;c++ provides default argument in a function call to add a new concept.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;the primary use of default arguments is to the extended parameter list of existing functions without requiring any change.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;The default argument is listed in the function prototype and transmitted automatically to the called function when the corresponding arguments are omitted from the function call.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: medium;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 400;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;box-sizing: border-box; clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: x-large;&quot;&gt;Look take an example&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;

&lt;form&gt;
&lt;textarea cols=&quot;70&quot; ne=&quot;0.14048331711711248&quot; onclick=&quot;select()&quot; readonly=&quot;&quot; rows=&quot;32&quot; style=&quot;color: #99e699;&quot; id=&quot;p1&quot;&gt; 

#include&lt;iostream&gt;
using namespace std;
  
int mul(int,int,int=1);  
  
int main()
{
    int number1,number2;
    cout&lt;&lt;&quot;\t\tDefault Argument Program &quot;;
    cout&lt;&lt;&quot;\n\nEnter two number: &quot;;
    cin&gt;&gt;number1&gt;&gt;number2;
    cout&lt;&lt;&quot;\n\nProduct of two number: &quot;&lt;&lt;mul(number1,number2);
    int number3;
    cout&lt;&lt;&quot;\n\nEnter Three number: &quot;;
    cin&gt;&gt;number1&gt;&gt;number2&gt;&gt;number3;
    cout&lt;&lt;&quot;Product of three number: &quot;&lt;&lt;mul(number1,number2,number3);
    return 0;
}
int mul(int num1, int num2, int num3)
{
    return(num1*num2*num3);
}

&lt;/textarea&gt;&lt;button onclick=&quot;copyToClipboard(&#39;#p1&#39;)&quot;&gt;Copy&lt;/button&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/form&gt;&lt;h4&gt;&lt;form style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Output Screen&lt;/b&gt;&lt;/form&gt;&lt;/h4&gt;&lt;form&gt;&lt;br /&gt;&lt;br /&gt;&lt;/form&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/AVvXsEg9OcS-GjUu4pPeEDmrbLTx_cc5yfH_kK49v5UuIYKOGXh-WuyzFZ38TblpBfTZSFTw5j5GvZTdD42A56NdwH2mBLNGGsj7sNxOc7NSsQl34GWnxdKRBEZ9tS8DhCikRvRdjRELfiKYLpg/s1107/Screenshot+8_15_2020+6_32_00+PM+%25282%2529.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Default argument in c++&quot; border=&quot;0&quot; data-original-height=&quot;378&quot; data-original-width=&quot;1107&quot; height=&quot;219&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9OcS-GjUu4pPeEDmrbLTx_cc5yfH_kK49v5UuIYKOGXh-WuyzFZ38TblpBfTZSFTw5j5GvZTdD42A56NdwH2mBLNGGsj7sNxOc7NSsQl34GWnxdKRBEZ9tS8DhCikRvRdjRELfiKYLpg/w640-h219/Screenshot+8_15_2020+6_32_00+PM+%25282%2529.png&quot; title=&quot;Default argument in c++&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
 
&lt;html&gt;
&lt;style&gt;
body {
  font-size: 20px;
}
&lt;/style&gt;
&lt;body&gt;

&lt;span style=&quot;font-size: 100px;&quot;&gt;&lt;/span&gt;
&lt;p&gt;Now next you are, write your code in the comment below. &lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;



&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://ancientcode1.blogspot.com/feeds/246739090453378302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://ancientcode1.blogspot.com/2020/05/Default-argument-in-cpp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/246739090453378302'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/6309287525669005415/posts/default/246739090453378302'/><link rel='alternate' type='text/html' href='https://ancientcode1.blogspot.com/2020/05/Default-argument-in-cpp.html' title='How To Teach Default argument in cpp Like A Pro'/><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/AVvXsEgYOPVc_sBKGlFIeWFa2n1GGpjlgXlbLO5LCYYl16oG_jfPzBdqyi2Lp-yQEmjdEt586yoTwmhjW9bGyzpVpJwbSaE9LR0a23zfKB51WlHdp2GZ2whcrwwG22NN6JD8DIqsnTMBqIxVHuA/s72-c/default+argument+in+c%252B%252B.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>