<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="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" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7736522216829773431</atom:id><lastBuildDate>Thu, 19 Dec 2024 03:26:20 +0000</lastBuildDate><category>C Language</category><category>Loops</category><category>functions</category><category>C++ Language</category><category>array</category><category>pointers</category><category>struct</category><category>Lab 04</category><category>assembly language</category><category>Lab 02</category><category>Lab 05</category><category>if else</category><category>File Handling</category><category>Lab 03</category><category>Tutorial</category><category>Lab 01</category><category>Lab 11</category><category>class</category><category>Lab 10</category><category>switch statement</category><category>C Programs</category><category>C++ Programs</category><category>Lab 07</category><category>Lab 08</category><category>Lab 09</category><category>Lab 12</category><category>Dynamic Memory Allocation</category><category>assembly language programs</category><category>macro</category><category>strings</category><category>conditional operator</category><category>lecture 01</category><category>lecture 02</category><category>lecture 03</category><category>lecture 04</category><category>lecture 05</category><category>lecture 06</category><category>lecture 07</category><category>lecture 08</category><category>overload</category><title>C, C++, and Assembly Language Programs &amp;amp; Tutotrials</title><description></description><link>http://islandprogrammers.blogspot.com/</link><managingEditor>noreply@blogger.com (Maaz Ali)</managingEditor><generator>Blogger</generator><openSearch:totalResults>108</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-8691702391600666169</guid><pubDate>Mon, 13 Nov 2017 19:56:00 +0000</pubDate><atom:updated>2018-03-14T00:43:27.246-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C Programs</category><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">C++ Programs</category><category domain="http://www.blogger.com/atom/ns#">functions</category><category domain="http://www.blogger.com/atom/ns#">pointers</category><title>Add/Sum two numbers using pointers in C/C++ Language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h3&gt;
Take two integer inputs from user. Create Sum function which should receive two integers using pointers. Calculate the sum and display the result in main function.&lt;br /&gt;

&lt;h3&gt;
Code&lt;/h3&gt;
#include &quot;stdafx.h&quot;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int sum (int *, int *);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int a,b,c;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout &amp;lt;&amp;lt; &quot;Enter 1st number: &quot;;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cin &amp;gt;&amp;gt; a;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;enter 2nd number: &quot;;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cin &amp;gt;&amp;gt; b;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;c = sum (&amp;amp;a,&amp;amp;b);&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout &amp;lt;&amp;lt; &quot;Sum = &quot;&amp;lt;&amp;lt; c &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Press any key to close.&quot;;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int sum (int *a, int *b)&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int c;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;c = (*a + *b);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return c;&lt;br /&gt;
}&lt;br /&gt;

&lt;h3 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h3&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; text-align: center;&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/AVvXsEh4IQSFAhyabrdS8m9xbD-Xq7B6J8IZTwWaw3kVdSThQbbNoVZqm9C-nG8RHsnfsfr84Oisb382WZEhbwEUVPXNZQlPidWHN9oMLXRlbq_ijCO2WEq7sTiKry3OH0f-oLIbsL-u4QyY9uQ/s1600/sum_pointers.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Add/Sum two numbers using pointers in C/C++ Language&quot; border=&quot;0&quot; data-original-height=&quot;343&quot; data-original-width=&quot;677&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4IQSFAhyabrdS8m9xbD-Xq7B6J8IZTwWaw3kVdSThQbbNoVZqm9C-nG8RHsnfsfr84Oisb382WZEhbwEUVPXNZQlPidWHN9oMLXRlbq_ijCO2WEq7sTiKry3OH0f-oLIbsL-u4QyY9uQ/s640/sum_pointers.png&quot; title=&quot;Add/Sum two numbers using pointers in C/C++ Language&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;Add/Sum two numbers using pointers in C/C++ Language&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2017/11/addsum-two-numbers-using-pointers-in-cc.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4IQSFAhyabrdS8m9xbD-Xq7B6J8IZTwWaw3kVdSThQbbNoVZqm9C-nG8RHsnfsfr84Oisb382WZEhbwEUVPXNZQlPidWHN9oMLXRlbq_ijCO2WEq7sTiKry3OH0f-oLIbsL-u4QyY9uQ/s72-c/sum_pointers.png" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-8194792130437094764</guid><pubDate>Sat, 04 Nov 2017 09:34:00 +0000</pubDate><atom:updated>2018-03-14T01:02:40.540-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">C++ Programs</category><category domain="http://www.blogger.com/atom/ns#">functions</category><category domain="http://www.blogger.com/atom/ns#">pointers</category><title>Calculate Square of 3 input integers using function and pointers</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h3&gt;
Write a program to calculate square of an integer, input by the user. Declare a function with the name of square and should receive 3 integers. The function should then calculate the square of these three integers and return the square. Display the result.&lt;br /&gt;


&lt;h3&gt;
Code&lt;/h3&gt;
#include &quot;stdafx.h&quot;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
void square (int *, int *, int *);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int a,b,c;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout &amp;lt;&amp;lt; &quot;Enter 1st number: &quot;;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cin &amp;gt;&amp;gt; a;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout &amp;lt;&amp;lt; &quot;Enter 2nd number: &quot;;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cin &amp;gt;&amp;gt; b;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout &amp;lt;&amp;lt; &quot;Enter 3rd number: &quot;;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cin &amp;gt;&amp;gt; c;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;square (&amp;amp;a, &amp;amp;b, &amp;amp;c);&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout &amp;lt;&amp;lt; &quot;Square of Ist number = &quot;&amp;lt;&amp;lt; a;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout &amp;lt;&amp;lt; &quot;\nSquare of 2nd number = &quot;&amp;lt;&amp;lt; b;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout &amp;lt;&amp;lt; &quot;\nSquare of 3rd number = &quot;&amp;lt;&amp;lt; c &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Press any key to close.&quot;;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void square (int *a, int *b, int *c)&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;*a = (*a * *a);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;*b = (*b * *b);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;*c = (*c * *c);&lt;br /&gt;
}&lt;br /&gt;



&lt;h3 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h3&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; text-align: center;&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/AVvXsEjteusJplhrI_pXaE7eFB6zLpqg6GiCBG1mRY7CnxOulIdX0IFn1QHBK5QFU_9eEIYRn4BtLqZW20Ks3SzluPs8NqbqvTd28MyQiowMJvaIlv-P26BnNAKw-Fzj7pQfxJp72GBENSeeDqM/s1600/calculate+square+of+integers.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Calculate Square of 3 input integers using function and pointers&quot; border=&quot;0&quot; data-original-height=&quot;343&quot; data-original-width=&quot;677&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjteusJplhrI_pXaE7eFB6zLpqg6GiCBG1mRY7CnxOulIdX0IFn1QHBK5QFU_9eEIYRn4BtLqZW20Ks3SzluPs8NqbqvTd28MyQiowMJvaIlv-P26BnNAKw-Fzj7pQfxJp72GBENSeeDqM/s640/calculate+square+of+integers.png&quot; title=&quot;Calculate Square of 3 input integers using function and pointers&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;Calculate Square of 3 input integers using function and pointers&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2017/11/calculate-square-of-3-input-integers.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjteusJplhrI_pXaE7eFB6zLpqg6GiCBG1mRY7CnxOulIdX0IFn1QHBK5QFU_9eEIYRn4BtLqZW20Ks3SzluPs8NqbqvTd28MyQiowMJvaIlv-P26BnNAKw-Fzj7pQfxJp72GBENSeeDqM/s72-c/calculate+square+of+integers.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-7813387315275624847</guid><pubDate>Sun, 15 Oct 2017 18:33:00 +0000</pubDate><atom:updated>2018-03-14T01:03:04.181-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">functions</category><title>Display Add/Sum of two integers in C Language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h3&gt;
&lt;div&gt;
Write a program in C language which takes two integers as input from user. Write a function to add these two integers and store the sum in another integer. Display the result.&lt;/div&gt;


&lt;h3 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h3&gt;
// lab02..cpp : Defines the entry point for the console application.&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#include &quot;stdafx.h&quot;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int sum (int, int);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int a,b,c;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout &amp;lt;&amp;lt; &quot;Enter 1st number: &quot;;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cin &amp;gt;&amp;gt; a;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;enter 2nd number: &quot;;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cin &amp;gt;&amp;gt; b;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;c = sum (a,b);&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout &amp;lt;&amp;lt; &quot;Sum = &quot;&amp;lt;&amp;lt; c &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Press any key to close.&quot;;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int sum (int a, int b)&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int c;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;c = a+b;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return c;&lt;br /&gt;
}&lt;br /&gt;


&lt;h3 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h3&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; text-align: center;&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/AVvXsEhe85l7xgbebKlSlR5NRnE5OdmayipYcpreL0WqR6RWQ79JSxnYKpvpjw8a2QRyN73aM7tvu56Mo7mx9JFlH5-Tb83Wi8NUQpD9OQ2l6TEDniHl_dAYQx9yZTFsMC46s8pi48r4kOgkvK4/s1600/add_two_int.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Display Add/Sum of two integers in C Language&quot; border=&quot;0&quot; data-original-height=&quot;343&quot; data-original-width=&quot;677&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe85l7xgbebKlSlR5NRnE5OdmayipYcpreL0WqR6RWQ79JSxnYKpvpjw8a2QRyN73aM7tvu56Mo7mx9JFlH5-Tb83Wi8NUQpD9OQ2l6TEDniHl_dAYQx9yZTFsMC46s8pi48r4kOgkvK4/s640/add_two_int.png&quot; title=&quot;Display Add/Sum of two integers in C Language&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;Display Add/Sum of two integers in C Language&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2017/10/display-addsum-of-two-integers-in-c.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe85l7xgbebKlSlR5NRnE5OdmayipYcpreL0WqR6RWQ79JSxnYKpvpjw8a2QRyN73aM7tvu56Mo7mx9JFlH5-Tb83Wi8NUQpD9OQ2l6TEDniHl_dAYQx9yZTFsMC46s8pi48r4kOgkvK4/s72-c/add_two_int.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-188034143644443128</guid><pubDate>Sat, 07 Oct 2017 19:28:00 +0000</pubDate><atom:updated>2018-03-14T01:03:24.517-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C Programs</category><category domain="http://www.blogger.com/atom/ns#">functions</category><category domain="http://www.blogger.com/atom/ns#">struct</category><title>Date Sum Using Structure in C/C++ Language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h3&gt;
Create a struct called data. User should be able to input day, month, and year. Take two date inputs and add them. Display the result.&lt;br /&gt;


&lt;h3 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h3&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include&amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
//struct decleration&lt;br /&gt;
struct data {&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int years;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int months;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int days;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}d1,d2;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
//function protorypes&lt;br /&gt;
void add_data();&lt;br /&gt;
void add_dates();&lt;br /&gt;
void display(int ,int ,int);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //function calls&lt;br /&gt;
&amp;nbsp; &amp;nbsp; add_data();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; add_dates();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\n\nPress any key to exit.&quot;);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//adding record&lt;br /&gt;
void add_data()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;//1st date&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;printf (&quot;Enter 1st date.&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;printf (&quot;\n\nEnter year: &quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;scanf (&quot;%d&quot;,&amp;amp;d1.years);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;printf (&quot;\nEnter month: &quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;scanf (&quot;%d&quot;,&amp;amp;d1.months);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;printf (&quot;\nEnter day: &quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;scanf (&quot;%d&quot;,&amp;amp;d1.days);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;display(d1.days,d1.months,d1.years);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;//printf (&quot;\n\nThe 1st date is %d/%d/%d&quot;,d1.days,d1.months,d1.years);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;//Second time&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;printf (&quot;\n\n\nNow, please type the 2nd date.&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;printf (&quot;\nEnter year: &quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;scanf (&quot;%d&quot;,&amp;amp;d2.years);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;printf (&quot;\nEnter month: &quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;scanf (&quot;%d&quot;,&amp;amp;d2.months);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;printf (&quot;\nEnter day: &quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;scanf (&quot;%d&quot;,&amp;amp;d2.days);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;display(d2.days,d2.months,d2.years);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void display (int a,int b,int c)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;printf(&quot;\nThe date is %d/%d/%d \n\n&quot;, a,b,c);&lt;br /&gt;
}&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
void add_dates()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;int y,m,d;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;y = d1.years + d2.years;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;m = d1.months + d2.months;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;d = d1.days + d2.days;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;printf (&quot;\n\n\nSum of the date&#39;s is %d/%d/%d&quot;,d,m,y);&lt;br /&gt;
}&lt;br /&gt;


&lt;h3 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h3&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; text-align: center;&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/AVvXsEgysx6rV0KBs6bxMislnSz7QOUIc_eH8FrrpZQ0VJR2upW-a9KLb2yo8GvYhWDUKA_P02PzvNRpkTddhagNoke9kU70pXHt84fTEhQZopScRPppqKdf3BkNWs2vumuqAL6znrRrZskvchc/s1600/add+dates.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Date Sum Using Structure in C/C++ Language&quot; border=&quot;0&quot; data-original-height=&quot;343&quot; data-original-width=&quot;677&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgysx6rV0KBs6bxMislnSz7QOUIc_eH8FrrpZQ0VJR2upW-a9KLb2yo8GvYhWDUKA_P02PzvNRpkTddhagNoke9kU70pXHt84fTEhQZopScRPppqKdf3BkNWs2vumuqAL6znrRrZskvchc/s640/add+dates.png&quot; title=&quot;Date Sum Using Structure in C/C++ Language&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;Date Sum Using Structure in C/C++ Language&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2017/10/date-sum-using-structure-in-cc-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgysx6rV0KBs6bxMislnSz7QOUIc_eH8FrrpZQ0VJR2upW-a9KLb2yo8GvYhWDUKA_P02PzvNRpkTddhagNoke9kU70pXHt84fTEhQZopScRPppqKdf3BkNWs2vumuqAL6znrRrZskvchc/s72-c/add+dates.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-6123097187793303949</guid><pubDate>Sun, 01 Oct 2017 09:08:00 +0000</pubDate><atom:updated>2018-03-14T01:03:38.741-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C Programs</category><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">struct</category><title>Time Sum Using Structure in C/C++ Language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h3&gt;
Create a structure called time. Its three members, all type int, should be called hours, minutes,&amp;nbsp;and seconds. Write a program that prompts the user to enter a time value in hours, minutes, and seconds. This can be in 12:59:59 format, or each number can be entered at a separate prompt (“Enter hours:”, and so forth). The program should then store the time in a variable of type struct time, and finally print out the total number of seconds represented by this time value:&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;long totalsecs = t1.hours*3600 + t1.minutes*60 + t1.seconds&lt;/b&gt;&lt;/div&gt;


&lt;h3 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h3&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include&amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
struct time {&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int hours;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int minutes;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int seconds;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;};&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
//function prototype&lt;br /&gt;
void add (int,int,int,int,int,int);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; struct time t1,t2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //1st time&lt;br /&gt;
&amp;nbsp; &amp;nbsp; printf (&quot;Enter 1st time.&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\n\nEnter Hours: &quot;);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf (&quot;%d&quot;,&amp;amp;t1.hours);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\nEnter Minutes: &quot;);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf (&quot;%d&quot;,&amp;amp;t1.minutes);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\nEnter Seconds: &quot;);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf (&quot;%d&quot;,&amp;amp;t1.seconds);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; printf (&quot;\n\nThe Time is %d:%d:%d&quot;,t1.hours,t1.minutes,t1.seconds);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Second time&lt;br /&gt;
&amp;nbsp; &amp;nbsp; printf (&quot;\n\n\nNow, please type the 2nd time.&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; printf (&quot;\n\nEnter Hours: &quot;);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf (&quot;%d&quot;,&amp;amp;t2.hours);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\nEnter Minutes: &quot;);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf (&quot;%d&quot;,&amp;amp;t2.minutes);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\nEnter Seconds: &quot;);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf (&quot;%d&quot;,&amp;amp;t2.seconds);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; printf (&quot;\n\nThe Time is %d:%d:%d&quot;,t2.hours,t2.minutes,t2.seconds);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //function call&lt;br /&gt;
&amp;nbsp; &amp;nbsp; add (t1.hours,t1.minutes,t1.seconds,t2.hours,t2.minutes,t2.seconds);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\n\nPress any key to exit.&quot;);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//function definition&lt;br /&gt;
void add (int x,int y,int z,int a,int b,int c)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;int h,m,s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;h = x + a;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;m = y + b;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;s = z + c;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;printf (&quot;\n\n\nSum of the two time&#39;s is %d:%d:%d&quot;,h,m,s);&lt;br /&gt;
}&lt;br /&gt;


&lt;h3 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h3&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; text-align: center;&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/AVvXsEgZudLBkqJVh5sK6CeEdnvaRk85GZRyoaVH3hp6Z9NIO5_kmsB_hD5NNsSlKrAGCdJLm2NQClSHdxnfMAxtIpl7IZu8Y-GPWL43ZHzcqE8BpNtTmPq98BCd8DIpS6jKJxm7NWpGRiYgds0/s1600/time_sum.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Time Sum Using Structure in C/C++ Language&quot; border=&quot;0&quot; data-original-height=&quot;343&quot; data-original-width=&quot;677&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZudLBkqJVh5sK6CeEdnvaRk85GZRyoaVH3hp6Z9NIO5_kmsB_hD5NNsSlKrAGCdJLm2NQClSHdxnfMAxtIpl7IZu8Y-GPWL43ZHzcqE8BpNtTmPq98BCd8DIpS6jKJxm7NWpGRiYgds0/s640/time_sum.png&quot; title=&quot;Time Sum Using Structure in C/C++ Language&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;Time Sum Using Structure in C/C++ Language&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2017/10/time-sum-using-structure-in-cc-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZudLBkqJVh5sK6CeEdnvaRk85GZRyoaVH3hp6Z9NIO5_kmsB_hD5NNsSlKrAGCdJLm2NQClSHdxnfMAxtIpl7IZu8Y-GPWL43ZHzcqE8BpNtTmPq98BCd8DIpS6jKJxm7NWpGRiYgds0/s72-c/time_sum.png" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-8206498730710044826</guid><pubDate>Sun, 24 Sep 2017 13:00:00 +0000</pubDate><atom:updated>2018-03-14T01:03:55.779-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C Programs</category><category domain="http://www.blogger.com/atom/ns#">functions</category><category domain="http://www.blogger.com/atom/ns#">struct</category><title>Input Length and Breadth. Calculate Area and Perimeter Using Struct in C Language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Problem:&lt;/h3&gt;
Write a program which takes length and breadth as input. Than calculate area and perimeter of the room.&lt;br /&gt;

&lt;h3 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h3&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include&amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
struct distance{&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int length;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int width;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;};&lt;br /&gt;
struct room{&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;struct distance a;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}r;&lt;br /&gt;
&lt;br /&gt;
void myftn();&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;myftn();&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\n\nPress any key to exit.&quot;);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void myftn ()&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int p,s;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;Enter lengtgh: &quot;);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf (&quot;%d&quot;,&amp;amp;r.a.length);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;Enter widtgh: &quot;);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf (&quot;%d&quot;,&amp;amp;r.a.width);&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;p = 2 * (r.a.length * r.a.width);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;s = (r.a.length * r.a.width);&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\n\nArea = %d&quot;,s);&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\nPerimeter = %d&quot;,p);&lt;br /&gt;
}&lt;br /&gt;


&lt;h3&gt;
Output&lt;/h3&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; text-align: center;&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/AVvXsEi7cFX2z9pE6cSr8PED0l98n6DLLtbjnc02hq3FhB1briLwLv418Bb1td5CZp2I6VjhTl4I_t75Zq1f1UDltcJBLZ4RGLmFGzbyy7rOq6rRgirJ9_s7lC48dc-bioWz_lm8D-jnfuPGXEY/s1600/p2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Input Length and Breadth. Calculate Area and Perimeter Using Struct in C Language&quot; border=&quot;0&quot; data-original-height=&quot;343&quot; data-original-width=&quot;677&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7cFX2z9pE6cSr8PED0l98n6DLLtbjnc02hq3FhB1briLwLv418Bb1td5CZp2I6VjhTl4I_t75Zq1f1UDltcJBLZ4RGLmFGzbyy7rOq6rRgirJ9_s7lC48dc-bioWz_lm8D-jnfuPGXEY/s640/p2.png&quot; title=&quot;Input Length and Breadth. Calculate Area and Perimeter Using Struct in C Language&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;Input Length and Breadth. Calculate Area and Perimeter Using Struct in C Language&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2017/09/input-length-and-breadth-calculate-area.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7cFX2z9pE6cSr8PED0l98n6DLLtbjnc02hq3FhB1briLwLv418Bb1td5CZp2I6VjhTl4I_t75Zq1f1UDltcJBLZ4RGLmFGzbyy7rOq6rRgirJ9_s7lC48dc-bioWz_lm8D-jnfuPGXEY/s72-c/p2.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-4567593460926849922</guid><pubDate>Sun, 17 Sep 2017 14:50:00 +0000</pubDate><atom:updated>2018-03-14T01:04:10.478-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C Programs</category><category domain="http://www.blogger.com/atom/ns#">functions</category><title>Convert Fahrenheit to Celsius | Convert Celsius to Fahrenheit</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h2&gt;
Write two functions in a program of C language to convert:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Function 1: Fahrenheit to Celsius&lt;/li&gt;
&lt;li&gt;Function 2: Celsius to Fahrenheit&lt;/li&gt;
&lt;/ul&gt;


&lt;h2 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h2&gt;
&lt;br /&gt;
&lt;div&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
#include&amp;lt;conio.h&amp;gt;&lt;/div&gt;
&lt;div&gt;
#include&amp;lt;stdlib.h&amp;gt;&lt;/div&gt;
&lt;div&gt;
#include&amp;lt;string.h&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
void ftoc();&lt;/div&gt;
&lt;div&gt;
void ctof();&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
int main()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ftoc();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ctof();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\n\nPress any key to exit.&quot;);&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
void ftoc()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;float f,c;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;Enter temperature in Fahrenheit: &quot;);&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf (&quot;%f&quot;,&amp;amp;f);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;c = 5.0 / 9.0 * (f-32.0);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;Temperature in celsius: %f&quot;,c);&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
void ctof()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;float f,c;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot;\n\nEnter temperature in celsius: &quot;);&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf (&quot;%f&quot;,&amp;amp;c);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;f = ((9.0 / 5.0 * c) + 32.0);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf (&quot; Temperature in celsius: %f&quot;,f);&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;


&lt;h2 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h2&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; text-align: center;&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/AVvXsEgzPf85XbwwhjeG2JQT0dxjz_oZdAWemuF0_bcyBnRucgRHv4GCvBDdD4kR2_6yLk9WWPN4z5bQxA4Cjs_UwXEyOFzZr_VkUQQHqw1tO37fyaf3y1MeqOJYzE9p2rmHIS2WwP5zYO2JN8M/s1600/Fahrenheit+to+Celsius.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Convert Fahrenheit to Celsius | Convert Celsius to Fahrenheit&quot; border=&quot;0&quot; data-original-height=&quot;343&quot; data-original-width=&quot;677&quot; height=&quot;323&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzPf85XbwwhjeG2JQT0dxjz_oZdAWemuF0_bcyBnRucgRHv4GCvBDdD4kR2_6yLk9WWPN4z5bQxA4Cjs_UwXEyOFzZr_VkUQQHqw1tO37fyaf3y1MeqOJYzE9p2rmHIS2WwP5zYO2JN8M/s640/Fahrenheit+to+Celsius.png&quot; title=&quot;Convert Fahrenheit to Celsius | Convert Celsius to Fahrenheit&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;Convert Fahrenheit to Celsius | Convert Celsius to Fahrenheit&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2017/09/convert-fahrenheit-to-celsius-convert.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzPf85XbwwhjeG2JQT0dxjz_oZdAWemuF0_bcyBnRucgRHv4GCvBDdD4kR2_6yLk9WWPN4z5bQxA4Cjs_UwXEyOFzZr_VkUQQHqw1tO37fyaf3y1MeqOJYzE9p2rmHIS2WwP5zYO2JN8M/s72-c/Fahrenheit+to+Celsius.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-8159595949324014985</guid><pubDate>Thu, 27 Apr 2017 11:35:00 +0000</pubDate><atom:updated>2018-03-14T01:04:24.101-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">C++ Programs</category><category domain="http://www.blogger.com/atom/ns#">class</category><category domain="http://www.blogger.com/atom/ns#">File Handling</category><title>File Handling: Reading and Writing into a text file using class</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;


&lt;h2 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h2&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;fstream&amp;gt;&lt;br /&gt;
#include&amp;lt;string&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
class marks&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; private:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int oop;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cal;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int dis;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int a;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;marks():oop(0),cal(0),dis(0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter marks of oop: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;oop;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter marks of cal: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;cal;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter marks of dis: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;dis;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;OOP = &quot;&amp;lt;&amp;lt;oop&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Cal = &quot;&amp;lt;&amp;lt;cal&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Dis = &quot;&amp;lt;&amp;lt;dis&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
int main ()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; marks m;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; m.getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //opening the file in binary mode&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ofstream myfile(&quot;Writing_Reading_class.txt&quot;,ios::binary); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//writing in the file&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myfile.write(reinterpret_cast&amp;lt;char *&amp;gt;(&amp;amp;m),sizeof(m));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//closing the file&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myfile.close();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //re-opening the file in binary mode&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ifstream my(&quot;Writing_Reading.txt&quot;,ios::binary);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Reading from the file&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my.read(reinterpret_cast&amp;lt;char *&amp;gt;(&amp;amp;m),sizeof(m));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//display&lt;br /&gt;
&amp;nbsp; &amp;nbsp; m.display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;\n\nPress any key to close.&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; getch ();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;



&lt;h2 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h2&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/AVvXsEinTC5ZnVBOeQu_WzuVfbUrJ2GJvYLWP3tGY-937QLEOtiZEstT-DL1c4ml0yG2hpPG8eq4EBI74jMjXXnosfWzCSXV5NtHdEKFbuQjy6nijkKGLNNeyMIqxMiU-derqw3SMNntCEuhYyk/s1600/program+output+win10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinTC5ZnVBOeQu_WzuVfbUrJ2GJvYLWP3tGY-937QLEOtiZEstT-DL1c4ml0yG2hpPG8eq4EBI74jMjXXnosfWzCSXV5NtHdEKFbuQjy6nijkKGLNNeyMIqxMiU-derqw3SMNntCEuhYyk/s640/program+output+win10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2017/04/file-handling-reading-and-writing-into.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinTC5ZnVBOeQu_WzuVfbUrJ2GJvYLWP3tGY-937QLEOtiZEstT-DL1c4ml0yG2hpPG8eq4EBI74jMjXXnosfWzCSXV5NtHdEKFbuQjy6nijkKGLNNeyMIqxMiU-derqw3SMNntCEuhYyk/s72-c/program+output+win10.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-4606930620780295005</guid><pubDate>Sat, 15 Apr 2017 06:19:00 +0000</pubDate><atom:updated>2018-03-14T01:04:38.649-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">C++ Programs</category><category domain="http://www.blogger.com/atom/ns#">File Handling</category><title>File Handling: Reading and Writing into a binary text file</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

&lt;h2 style=&quot;text-align: left;&quot;&gt;
Code:&lt;/h2&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;fstream&amp;gt;&lt;br /&gt;
#include&amp;lt;string&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int max = 10;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int a[max];&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; ofstream myfile(&quot;Writing_Reading.txt&quot;,ios::binary); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//opening the file in binary mode&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; for(int j=0;j&amp;lt;max;j++) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //assigning values(array)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a[j] = (j + 1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//writing in the file&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myfile.write(reinterpret_cast&amp;lt;char *&amp;gt;(a),sizeof(a));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;File written.&quot;&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; myfile.close(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //closing the file&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; ifstream my(&quot;Writing_Reading.txt&quot;,ios::binary); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//opening the file in binary mode&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Emptying the array&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for(int j=0;j&amp;lt;max;j++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a[j] = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Reading from the file&lt;br /&gt;
&amp;nbsp; &amp;nbsp; my.read(reinterpret_cast&amp;lt;char *&amp;gt;(a),sizeof(a));&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; for(int j=0;j&amp;lt;max;j++) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //display array&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;a[j];&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;&quot;Press any key to exit.&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
}&lt;br /&gt;



&lt;h2 style=&quot;text-align: left;&quot;&gt;
Output:&lt;/h2&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/AVvXsEjdRWl87fzWkgn6tm1-3meml4FPli4_kImBhYCII32ZV9_oE3apdAVhsBTtp0V5PNPv4W8BT_OVzTc4n-Zah6aJmYxtku-GuGbW15RoVw3xGqN9EvE9L1RrVKg1FDSWiwS2__c8Mp_QkDs/s1600/file+handling+input+into+file.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;File Handling: Writing into a binary text file&quot; border=&quot;0&quot; height=&quot;427&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdRWl87fzWkgn6tm1-3meml4FPli4_kImBhYCII32ZV9_oE3apdAVhsBTtp0V5PNPv4W8BT_OVzTc4n-Zah6aJmYxtku-GuGbW15RoVw3xGqN9EvE9L1RrVKg1FDSWiwS2__c8Mp_QkDs/s640/file+handling+input+into+file.png&quot; title=&quot;File Handling: Writing into a binary text file&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2017/04/file-handling-writing-into-binary-text.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdRWl87fzWkgn6tm1-3meml4FPli4_kImBhYCII32ZV9_oE3apdAVhsBTtp0V5PNPv4W8BT_OVzTc4n-Zah6aJmYxtku-GuGbW15RoVw3xGqN9EvE9L1RrVKg1FDSWiwS2__c8Mp_QkDs/s72-c/file+handling+input+into+file.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-1821923436198768738</guid><pubDate>Fri, 10 Mar 2017 14:39:00 +0000</pubDate><atom:updated>2018-03-14T01:08:48.215-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">array</category><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">C++ Programs</category><category domain="http://www.blogger.com/atom/ns#">class</category><category domain="http://www.blogger.com/atom/ns#">functions</category><title>find index number of the largest element using class</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h2&gt;
Start with a program that allows the user to input a number of integers, and then stores them in an int array. Write a function called maxint() that goes through the array, element by element, looking for the largest one. The function should take as arguments the address of the array and the number of elements in it, and return the index number of the largest element. The program should call this function and then display the largest element and its index number.&lt;br /&gt;

&lt;h2 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h2&gt;
// p[4].cpp : Defines the entry point for the console application.&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#include &quot;stdafx.h&quot;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;string.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
class intgrs&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int a[5];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int i,j,z;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;intgrs():j(0),i(0),z(0)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;void maxint()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter Integers: &quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;for(i=0; i&amp;lt;5; i++)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;cin&amp;gt;&amp;gt;a[i];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;for(i=0;i&amp;lt;5;i++)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if(a[i]&amp;gt;j)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;j = a[i];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;z=i;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;\n\nLargest Element = &quot;&amp;lt;&amp;lt;j;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;\n\nIndex Number = &quot;&amp;lt;&amp;lt;(z+1)&amp;lt;&amp;lt;endl;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;};&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;intgrs i;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;i.maxint();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to close.&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;


&lt;h2 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h2&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/AVvXsEg4X9P-Vcr668BpudtYmqQTr72suzqGjimQNq8Rg6IqfzZT4azBzpEGrGwSPIxufXlEh4_Llq4BL91v9NUGjHT3jYur1MfbZREfGpBmM0vdSMdZ6ioLYyiGzAGdFmTYEgkiIM3lQNoE8U8/s1600/max_int.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img alt=&quot;find index number of the largest element using class&quot; border=&quot;0&quot; height=&quot;427&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4X9P-Vcr668BpudtYmqQTr72suzqGjimQNq8Rg6IqfzZT4azBzpEGrGwSPIxufXlEh4_Llq4BL91v9NUGjHT3jYur1MfbZREfGpBmM0vdSMdZ6ioLYyiGzAGdFmTYEgkiIM3lQNoE8U8/s640/max_int.png&quot; title=&quot;find index number of the largest element using class&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2017/03/find-index-number-of-largest-element.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4X9P-Vcr668BpudtYmqQTr72suzqGjimQNq8Rg6IqfzZT4azBzpEGrGwSPIxufXlEh4_Llq4BL91v9NUGjHT3jYur1MfbZREfGpBmM0vdSMdZ6ioLYyiGzAGdFmTYEgkiIM3lQNoE8U8/s72-c/max_int.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-383997763062706708</guid><pubDate>Thu, 09 Mar 2017 15:04:00 +0000</pubDate><atom:updated>2018-03-14T01:05:50.719-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">class</category><title>Input and display employee data of 100 employees using array of objects</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h2&gt;
Create a class called employee that contains a name (an object of class string) and an employee number (type long). Include a member function called getdata() to get data from the user for insertion into the object, and another function called putdata() to display the data. Assume the name has no embedded blanks.&lt;br /&gt;
Write a main() program to exercise this class. It should create an array of type employee, and then invite the user to input data for up to 100 employees. Finally, it should print out the data for all the employees.&lt;br /&gt;



&lt;h2 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h2&gt;
#include &quot;stdafx.h&quot;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;string.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
class employee&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;char name[50];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;long no;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;employee():no(0)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;void getdata()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;fflush(stdin);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;\nEnter Employee Data:\n&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter Name: &quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cin.get(name,50);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;fflush(stdin);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter Number: &quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cin&amp;gt;&amp;gt;no;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;fflush(stdin);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;void putdata()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;\n\nName= &quot;&amp;lt;&amp;lt;name&amp;lt;&amp;lt;&quot;\nE.number = &quot;&amp;lt;&amp;lt;no&amp;lt;&amp;lt;endl;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;};&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int array_length = 3;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;employee e1[array_length];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(int i=0;i&amp;lt;array_length;i++){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;e1[i].getdata();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;fflush(stdin);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(int i=0;i&amp;lt;array_length;i++){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;e1[i].putdata();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to close.&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;


&lt;h2 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h2&gt;
&lt;br /&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/AVvXsEgPucSqzkshfkJrDb3lPczzoBYWhjVTwAD35Bb5MqKqkVJCAR2fRWEgD_HQ4ZrLCr50BpE7drz6NyUIpNPWzTNt55P0i90IGxNebXGQ_KjhivMV8UaLng7yv0azJN7HaclyVzraR6ztjvs/s1600/employee.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Input and display employee data of 100 employees using array of objects&quot; border=&quot;0&quot; height=&quot;427&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPucSqzkshfkJrDb3lPczzoBYWhjVTwAD35Bb5MqKqkVJCAR2fRWEgD_HQ4ZrLCr50BpE7drz6NyUIpNPWzTNt55P0i90IGxNebXGQ_KjhivMV8UaLng7yv0azJN7HaclyVzraR6ztjvs/s640/employee.png&quot; title=&quot;Input and display employee data of 100 employees using array of objects&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2017/03/input-and-display-employee-data-of-100.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPucSqzkshfkJrDb3lPczzoBYWhjVTwAD35Bb5MqKqkVJCAR2fRWEgD_HQ4ZrLCr50BpE7drz6NyUIpNPWzTNt55P0i90IGxNebXGQ_KjhivMV8UaLng7yv0azJN7HaclyVzraR6ztjvs/s72-c/employee.png" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-2688059937945805940</guid><pubDate>Sat, 22 Oct 2016 12:08:00 +0000</pubDate><atom:updated>2018-03-14T01:06:06.641-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><title>Reverse input string in c++</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h2&gt;
Take a string input from user and reverse it using C++ language.&lt;br /&gt;

&lt;h2 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h2&gt;
// P[1].cpp : Defines the entry point for the console application.&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#include &quot;stdafx.h&quot;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;string.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
class rvrstr&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;char str1[80];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;char str2[80];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int i,j,n;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;char ch;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;rvrstr(): i(0),j(0),n(0)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;void setstr()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter string: &quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cin.get(str1,80);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;void reversit()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;n = strlen(str1);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;\n\nReversed String: &quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;for(i=n;i&amp;gt;=0;i--)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;str2[j] = str1[i];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;cout&amp;lt;&amp;lt;str2[j];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;j++;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;};&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;rvrstr r1;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;r1.setstr();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;r1.reversit();&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to close.&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;


&lt;h2 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h2&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/AVvXsEgoxvXwMcnyTtntGSizpUabAEvMMew4JrpWZlSJheAMnJA0RPukKNaKhDALCziIBEaWZVlioB4J9DI1JrltfY4N8ef9YLV36mQS_u4yOUBz8oZYJ7vAMTxMWx177r6MDW8Bvr4LSEj0nHg/s1600/program+output+win10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Reverse input string in c++&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoxvXwMcnyTtntGSizpUabAEvMMew4JrpWZlSJheAMnJA0RPukKNaKhDALCziIBEaWZVlioB4J9DI1JrltfY4N8ef9YLV36mQS_u4yOUBz8oZYJ7vAMTxMWx177r6MDW8Bvr4LSEj0nHg/s1600/program+output+win10.png&quot; title=&quot;Reverse input string in c++&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/reverse-input-string-in-c.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoxvXwMcnyTtntGSizpUabAEvMMew4JrpWZlSJheAMnJA0RPukKNaKhDALCziIBEaWZVlioB4J9DI1JrltfY4N8ef9YLV36mQS_u4yOUBz8oZYJ7vAMTxMWx177r6MDW8Bvr4LSEj0nHg/s72-c/program+output+win10.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-2831742184795732644</guid><pubDate>Thu, 20 Oct 2016 09:01:00 +0000</pubDate><atom:updated>2018-03-14T01:06:32.083-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><title>Electronic Polling System in C++ Language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h2&gt;
Implement  (a part of) electronic Pakistani election Scenario where following political  parties are participating in election: PPP, PML and PTI.&amp;nbsp; Create a class &lt;em&gt;PollingStation &lt;/em&gt;where it stores the vote’s count, against each  party, cast by the Pakistani legal registered voters.&amp;nbsp; Your program must query the voter for its ID  card number before he/she cast the vote and check it against voter list.  (Suppose voter list is already with you). If voter is not found in the voter’s  list, your program throws the exception &lt;em&gt;IllegalVoter&lt;/em&gt;()  and discard that voter. The Application again starts working in normal state  and terminates only when user wants to quit it. At the end of the day (or  whenever user wants) it generates report about the vote count against each  party including header that contains date, day and location.&lt;br /&gt;



&lt;h2 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h2&gt;
// Poling station.cpp : Defines the entry point for the console application.&lt;br /&gt;
//&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //HEADER FILES&lt;br /&gt;
#include &quot;stdafx.h&quot; &amp;nbsp; //ESSENTIAL TO WORK ON VISUAL STUDIO&lt;br /&gt;
#include&amp;lt;fstream&amp;gt; &amp;nbsp; &amp;nbsp; //FOR FILE&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt; &amp;nbsp; &amp;nbsp; //FOR GETCH FUNCTION&lt;br /&gt;
#include&amp;lt;string&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;//fOR STRINGS USAGE&lt;br /&gt;
#include&amp;lt;iostream&amp;gt; &amp;nbsp; &amp;nbsp;//FOR COUT AND CIN&lt;br /&gt;
using namespace std; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //CLASS BEGINS&lt;br /&gt;
class PollingStation&lt;br /&gt;
{&lt;br /&gt;
private: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//VARIABLES DECLARED PRIVATLY, ONLY ACCESSABLE IN THIS CLASS&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int votes_count_ppp;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int votes_count_pml;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int votes_count_pti;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int total_votes,hr,mn,sc,flag,choice,offset;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;string line,day,location;&lt;br /&gt;
&lt;br /&gt;
public: &amp;nbsp; &amp;nbsp;//EXCEPTION CLASS&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;class IllegalVoter&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{ &amp;nbsp; &amp;nbsp; };&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;//CONSTRUCTOR OF POLLING STATION CLASS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PollingStation(): votes_count_ppp(0), votes_count_pml(0), votes_count_pti(0),total_votes(0),&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;hr(0),mn(0),sc(0),flag(0),line(&quot;&quot;),choice(0)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //DESTRUCTOR OF POLLING STATION CLASS&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;~PollingStation()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;polling Station Destructor&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //GETING THE DATA FROM USER(DAY,DTAE &amp;amp; LOCATION)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;void start()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//GET DAY&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Enter Day: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;day;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //GET LOCATION&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\nEnter Location: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;location;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//GET TIME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\nEnter time: &quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Enter Hour: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;hr;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Enter Minutes: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;mn;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //CHECKING WHETHER THE PERSON IS ILLEGIBEL FOR VOTE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void checkdata(string search)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ifstream Myfile; &amp;nbsp; &amp;nbsp;//OPENING THE FILE FOR READING&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Myfile.open (&quot;VOTERS_LIST.txt&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(Myfile.is_open())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //READING UNTIL END OF FILE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while(!Myfile.eof())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getline(Myfile,line); &amp;nbsp; &amp;nbsp; &amp;nbsp; //CHECKIMG&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ((offset = line.find(search)) != string::npos)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; flag = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Myfile.close();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; //IF FILE IS NOT OPENED&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Unable to open this file.&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(flag == 0) &amp;nbsp; &amp;nbsp; //THROWING EXCEPTION&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw IllegalVoter();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //PERSON WILL CAST HIS/HER VOTE&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;void cast_vote()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;CAST YOUR VOTE:&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;1. PPP&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;2. PML&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;3. PTI&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\nEnter Your Choice: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;choice;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//IF USER HAS VOTED FOR PPP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(choice == 1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; votes_count_ppp++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total_votes++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //IF USER HAS VOTED FOR PML&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(choice == 2)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; votes_count_pml++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total_votes++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //IF USER HAS VOTED FOR PTI&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if (choice == 3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; votes_count_pti++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total_votes++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//IF USER HAS ENTERED WRONG CHOICE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Invalid Key.&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Press Any Key To Continue.&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;//DISPLYING RESULTS&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;void display()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\n********************************************************************************&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Time = &quot;&amp;lt;&amp;lt;hr&amp;lt;&amp;lt;&quot; : &quot;&amp;lt;&amp;lt;mn&amp;lt;&amp;lt;&quot;\t\t\tDay = &quot;&amp;lt;&amp;lt;day&amp;lt;&amp;lt;&quot;\t\tLocation = &quot;&amp;lt;&amp;lt;location&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n********************************************************************************&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Total number of votes voted for:&quot;&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\tPPP = &quot;&amp;lt;&amp;lt;votes_count_ppp&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\tPML = &quot;&amp;lt;&amp;lt;votes_count_pml&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\tPTI = &quot;&amp;lt;&amp;lt;votes_count_pti&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\tTotal = &quot;&amp;lt;&amp;lt;total_votes&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PollingStation p; &amp;nbsp; //OBJECT OF POLLING STATION CLASS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; char another; &amp;nbsp; &amp;nbsp; &amp;nbsp; //VARIABLES&lt;br /&gt;
&amp;nbsp; &amp;nbsp; string id; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; p.start(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//CALLING THE FUNTION TO GET DATA&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; do{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //LOOP UNTIL USER WANTS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system(&quot;cls&quot;); &amp;nbsp; //USER WILL ENTER HIS/HER ID CARD NUMBER&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter ID Card Number: &quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;id;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.checkdata(id); &amp;nbsp; &amp;nbsp; //CHECKING&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.cast_vote(); &amp;nbsp; &amp;nbsp; &amp;nbsp; //CASTING VOTE(IF ILLEGIBLE)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch(PollingStation::IllegalVoter) &amp;nbsp;//IF NOT ILLEGIBLE THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;NO ENTRY WITH THIS ID&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Press any key to continue...&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system(&quot;cls&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //ASKING USER WHETHER HE/SHE WANTS TO ENTER DATA&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter another phone number(y/n)? &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; another = getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }while(another == &#39;Y&#39; || another == &#39;y&#39;); //LOOP TERMINATION CONDITION&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ofstream file; &amp;nbsp; //OPENING FILE FOR WRITTING&lt;br /&gt;
&amp;nbsp; &amp;nbsp; file.open(&quot;POLLING_RESULTS.DAT&quot;, ios::binary);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; p.display(); &amp;nbsp; &amp;nbsp; //DISPLYING THE DATA &amp;amp; WRITTING TO THE FILE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; file.write(reinterpret_cast&amp;lt;char*&amp;gt;(&amp;amp;p),sizeof(p)); &amp;nbsp;//SO THAT IT COULD BE DSPLAYED ANYTIME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; file.close(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //USER WANTS &amp;amp; THEN CLOSING THE FILE&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\nFile Written&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Press any key to exit&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;



&lt;h2 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h2&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/AVvXsEiOU7ZQh_RRZM1-j38IixiTNA5_plzRhh1sLPWRruN-W2_bNGMsL4cDeRg7RIN0ysLdA3edOpPGeVhvc-DOwqnZTTsLc0RpOaupgsNJzDjKoUkmCjXaWnqSiSIYiWt6zUzV9VKjJ5cVpuU/s1600/electronic+polling+system.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;electronic polling system in c++ language&quot; border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOU7ZQh_RRZM1-j38IixiTNA5_plzRhh1sLPWRruN-W2_bNGMsL4cDeRg7RIN0ysLdA3edOpPGeVhvc-DOwqnZTTsLc0RpOaupgsNJzDjKoUkmCjXaWnqSiSIYiWt6zUzV9VKjJ5cVpuU/s640/electronic+polling+system.png&quot; title=&quot;Electronic Polling System in C++ Language&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/electronic-polling-system-in-c-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOU7ZQh_RRZM1-j38IixiTNA5_plzRhh1sLPWRruN-W2_bNGMsL4cDeRg7RIN0ysLdA3edOpPGeVhvc-DOwqnZTTsLc0RpOaupgsNJzDjKoUkmCjXaWnqSiSIYiWt6zUzV9VKjJ5cVpuU/s72-c/electronic+polling+system.png" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-5816451691550279696</guid><pubDate>Wed, 19 Oct 2016 14:45:00 +0000</pubDate><atom:updated>2018-03-14T01:06:54.196-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">class</category><title>Polymorphism example in c++ language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h2&gt;
Implement the following given scenario, include two &amp;nbsp;constructors (no argument, with arguments), two functions getvalue(), and &amp;nbsp;displayvalue() for all classes.
&lt;br /&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/AVvXsEiGOY0xnr8Yp_0CokHHoYwyY8Ms2LMGpz8oRoZQFFY2QLOEpe7vucYdv8ywKSbKmMBblCeuJwZ4n8m-q3appDgI52BlIZg9N2SpzpxP42bwXtCMCVwJ_HgbR4SE9A-oX5YkBN6I4NdKvpk/s1600/question.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;polymorphism program in c++&quot; border=&quot;0&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGOY0xnr8Yp_0CokHHoYwyY8Ms2LMGpz8oRoZQFFY2QLOEpe7vucYdv8ywKSbKmMBblCeuJwZ4n8m-q3appDgI52BlIZg9N2SpzpxP42bwXtCMCVwJ_HgbR4SE9A-oX5YkBN6I4NdKvpk/s640/question.png&quot; title=&quot;polymorphism program in c++&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;



&lt;h2 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h2&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;string&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
class Vehicle&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; protected:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vehicle(): i(0), s(&quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vehicle(int a,string ss): i(a), s(ss)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter Vehicle Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fflush(stdin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter vehicle name: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getline(cin, s);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Number: &quot;&amp;lt;&amp;lt;i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Name: &quot;&amp;lt;&amp;lt;s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class land_Vehicle : public Vehicle&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; protected:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int b;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;land_Vehicle(): b(0), s1(&quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;land_Vehicle(int a,string ss, int r, string s0): b(a), s1(ss), Vehicle(r,s0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Vehicle :: getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter Land Vehicle Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;b;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fflush(stdin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter Land vehicle name: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getline(cin, s1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Vehicle :: display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Number: &quot;&amp;lt;&amp;lt;b;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Name: &quot;&amp;lt;&amp;lt;s1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class Boat : public Vehicle&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; protected:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int c;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Boat(): c(0), s2(&quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Boat(int a,string ss, int r, string s0): c(a), s2(ss), Vehicle(r,s0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Vehicle :: getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter Boat Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;c;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fflush(stdin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter Boat name: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getline(cin, s2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Vehicle :: display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Number: &quot;&amp;lt;&amp;lt;c;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Name: &quot;&amp;lt;&amp;lt;s2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class aircraft : public Vehicle&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; protected:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int d;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;aircraft(): d(0), s3(&quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;aircraft(int a,string ss, int r, string s0): d(a), s3(ss), Vehicle(r,s0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Vehicle :: getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter Aircraft Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;d;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fflush(stdin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter Aircarft name: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getline(cin, s3);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Vehicle :: display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Number: &quot;&amp;lt;&amp;lt;d;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Name: &quot;&amp;lt;&amp;lt;s3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class car : public land_Vehicle&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; protected:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int e;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s4;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;car(): e(0), s4(&quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;car(int a,string ss, int q1, string q2,int q3,string q4): e(a), s4(ss),land_Vehicle(q1,q2,q3,q4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; land_Vehicle :: getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter car Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;e;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fflush(stdin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter car name: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getline(cin, s4);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; land_Vehicle :: display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Number: &quot;&amp;lt;&amp;lt;e;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Name: &quot;&amp;lt;&amp;lt;s4;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class truck &amp;nbsp;: public land_Vehicle&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; protected:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int f;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s5;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;truck(): f(0), s5(&quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;truck(int a,string ss, int q, string qq,int q3,string q4): f(a), s5(ss),land_Vehicle(q,qq,q3,q4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; land_Vehicle :: getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter truck Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;f;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fflush(stdin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter truck name: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getline(cin, s5);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; land_Vehicle :: display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Number: &quot;&amp;lt;&amp;lt;f;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Name: &quot;&amp;lt;&amp;lt;s5;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class sports_car &amp;nbsp;: public car&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; protected:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int g;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s6;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sports_car(): g(0), s6(&quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sports_car(int a,string ss, int q, string qq,int q3,string q4,int q5,string q6): g(a), s6(ss),car(q,qq,q3,q4,q5,q6)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; car:: getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter sports car Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;g;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fflush(stdin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter sports car name: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getline(cin, s6);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; car:: display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Number: &quot;&amp;lt;&amp;lt;g;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Name: &quot;&amp;lt;&amp;lt;s6;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class yacht &amp;nbsp;: public Boat&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; protected:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int h;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s7;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yacht(): h(0), s7(&quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yacht(int a,string ss, int q, string qq,int q3,string q4): h(a), s7(ss),Boat(q,qq,q3,q4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Boat::getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter yacht Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;h;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fflush(stdin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter yacht name: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getline(cin, s7);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Boat :: display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Number: &quot;&amp;lt;&amp;lt;h;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Name: &quot;&amp;lt;&amp;lt;s7;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class sail_boat &amp;nbsp;: public Boat&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; protected:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int k;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s8;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sail_boat(): k(0), s8(&quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sail_boat(int a,string ss, int q, string qq,int q3,string q4): k(a), s8(ss),Boat(q,qq,q3,q4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Boat :: getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter sail_boat Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;k;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fflush(stdin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter sail_boat name: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getline(cin, s8);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Boat :: display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Number: &quot;&amp;lt;&amp;lt;k;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Vehicle Name: &quot;&amp;lt;&amp;lt;s8;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class f16 : public aircraft&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;protected:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int j;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s9;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f16(): j(0), s9(&quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f16(int a,string ss, int q, string qq,int q3,string q4): j(a), s9(ss), aircraft(q,qq,q3,q4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aircraft :: getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter f16 Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;j;fflush(stdin);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter f16 model: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getline(cin, s9);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aircraft :: display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;f16 Number: &quot;&amp;lt;&amp;lt;j;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;f16 model: &quot;&amp;lt;&amp;lt;s9;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class helicopter &amp;nbsp;: public aircraft&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; protected:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int l;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s10;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;helicopter(): l(0), s10(&quot;&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;helicopter(int a,string ss, int q, string qq,int q3,string q4): l(a), s10(ss),aircraft(q,qq,q3,q4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void getdata()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aircraft :: getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter helicopter Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;l;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter helicopter model: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getline(cin, s10);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void display()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aircraft :: display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;helicopter Number: &quot;&amp;lt;&amp;lt;l;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;helicopter model: &quot;&amp;lt;&amp;lt;s10;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; aircraft a;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; a.getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; a.display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Boat b;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; b.getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; b.display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; land_Vehicle l;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; l.getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; l.display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; car c;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; c.getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; c.display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; truck t;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; t.getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; t.display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sports_car sp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sp.getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sp.display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; yacht y;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; y.getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; y.display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sail_boat s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; s.getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; s.display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; f16 f;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; f.getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; f.display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; helicopter h;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; h.getdata();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; h.display();&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Press any key exit.&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
}&lt;br /&gt;


&lt;h2 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h2&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/AVvXsEgiJRJsW1MEkWHliWMEXrz6UwlE7REJ02Rlx_E5gv1PdFG3cuysDWs_-fF1RpJjjVOKNnlYW9nQdpcyEbqInNnPePtDyvporOPVGy_Ku5USNTNT6otutTMr0ICFTjtFCBOgjJXQK8RgUPI/s1600/polymorphism.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;polymorphism program in c++&quot; border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiJRJsW1MEkWHliWMEXrz6UwlE7REJ02Rlx_E5gv1PdFG3cuysDWs_-fF1RpJjjVOKNnlYW9nQdpcyEbqInNnPePtDyvporOPVGy_Ku5USNTNT6otutTMr0ICFTjtFCBOgjJXQK8RgUPI/s640/polymorphism.png&quot; title=&quot;polymorphism program in c++&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/polymorphism-example-in-c-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGOY0xnr8Yp_0CokHHoYwyY8Ms2LMGpz8oRoZQFFY2QLOEpe7vucYdv8ywKSbKmMBblCeuJwZ4n8m-q3appDgI52BlIZg9N2SpzpxP42bwXtCMCVwJ_HgbR4SE9A-oX5YkBN6I4NdKvpk/s72-c/question.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-6838421530953077883</guid><pubDate>Fri, 14 Oct 2016 06:07:00 +0000</pubDate><atom:updated>2018-03-14T01:07:18.222-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">class</category><category domain="http://www.blogger.com/atom/ns#">switch statement</category><title>CD player simulator using c++</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2&gt;
Problem&lt;/h2&gt;
Design a  simple CD player simulator. The CD player has the following buttons:  &quot;POWER&quot;, &quot;EJECT&quot;, &quot;PLAY&quot; and &quot;STOP&quot;,  and a tray where a CD is loaded. User can load a CD only if the tray is open.  The tray can be opened only if the power is turned on (regard it as something  like a motor-driven tray installed on a PC). If the power is turned off with  the tray open, the tray will keep open and the power is turned off. &lt;br /&gt;
Implement the following actions of the CD player as methods of class CDPlayer. &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;pushPower() -- simulates pushing       POWER(on/off) button. &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the power is turned off,        turn on the power, and display &quot;Power turned on.&quot; &lt;/li&gt;
&lt;li&gt;if the power is turned on, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if playing, stop it. &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
turn off the  power, and display &quot;Power turned off.&quot; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;pushEject() -- simulates pushing EJECT(tray       open/close) button &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the power is not turned on,        display &quot;Power not turned on.&quot; &lt;/li&gt;
&lt;li&gt;if the power is turned on, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the tray is not open, open         the tray and display &quot;Tray opened.&quot; &lt;/li&gt;
&lt;li&gt;if the tray is open, close         the tray and display &quot;Tray closed.&quot; &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;pushPlay() -- simulates pushing PLAY       button &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the power is turned on, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the media is loaded and         tray is closed, begin to play and display &quot;Now playing...&quot; &lt;/li&gt;
&lt;li&gt;otherwise, display &quot;No         CD loaded or tray is open.&quot; &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;pushStop() -- simulates pushing STOP       button &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the power is turned on, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if it&#39;s playing, stop playing         and display &quot;Playing stopped.&quot; &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;loadUnloadMedia() -- simulates loading/unloading       media to/from the tray (tray must be open when loading/unloading) &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the tray is open, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the media is loaded, unload         the media and display &quot;Media unloaded.&quot; &lt;/li&gt;
&lt;li&gt;if the media is not loaded,         load the media and display &quot;Media loaded.&quot; &lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;if the tray is not open, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;display &quot;Tray is not open.&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;


&lt;h2&gt;
Code&lt;/h2&gt;
&lt;div&gt;
&lt;div&gt;
#include&amp;lt;iostream&amp;gt;&lt;/div&gt;
&lt;div&gt;
#include&amp;lt;conio.h&amp;gt;&lt;/div&gt;
&lt;div&gt;
using namespace std;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
class CDplayer&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; private:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int power;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int eject;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int tray;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int media;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int play;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; CDplayer():power(0),eject(0),tray(0),media(0),play(0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; void pushPower()&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nNOTE: Press one(1) to turn on and zero(0) to turn off.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\nWant to turn on the power? &quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;power;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(power == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Power is ON.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if (power == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Power is OFF.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Invalid key&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to continue.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; void pushEject()&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(power == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(tray == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tray = 1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Tray opened.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if(tray == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tray = 0;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Tray closed.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(power == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Power not turned on.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to continue.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; void pushPlay()&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(power == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(media == 1 &amp;amp;&amp;amp; tray == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; play = 1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Now playing...&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;No CD loaded or tray is open.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(power == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Power not turned on.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to continue.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; void pushStop()&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(power == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(play == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; play = 0;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Playing stopped.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to continue.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; void loadUnloadMedia()&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(tray == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(media == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; media = 0;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Media unloaded.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(media == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; media = 1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Media loaded.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(tray == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Tray is not open.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to continue.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
};&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
int main()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; CDplayer c1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; int s;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; while(1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n\nPlease, Press one of the following buttons: &quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n1. POWER(on/off)&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n2. EJECT(tray open/close)&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n3. PLAY&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n4. STOP&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n5. Load/Unload media to/from the tray(tray will be opened)&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n6. Close CDplayer&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n\nEnter your choice: &quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;s;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch(s)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 1:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1.pushPower();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 2:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1.pushEject();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 3:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1.pushPlay();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 4:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1.pushStop();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 5:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1.loadUnloadMedia();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 6:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exit(0);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; return 0;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
Output&lt;/h2&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; text-align: center;&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/AVvXsEi7c-yJE8YEtl5tr1z_dZfzn-_gsvguz7LGAIB6W93OYj6gbCUhMVLvFa-w0tJcO_2VKK0tY1vCAxGlLxLDRv2DFPoOyEfCC77i0svk4mYVRAm_I57j4SwCJ5Hqcp1p-7_lfnl8djTUFQw/s1600/CD+player+simulator.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;CD player simulator using c++&quot; border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7c-yJE8YEtl5tr1z_dZfzn-_gsvguz7LGAIB6W93OYj6gbCUhMVLvFa-w0tJcO_2VKK0tY1vCAxGlLxLDRv2DFPoOyEfCC77i0svk4mYVRAm_I57j4SwCJ5Hqcp1p-7_lfnl8djTUFQw/s640/CD+player+simulator.png&quot; title=&quot;CD player simulator using c++&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;CD player simulator using c++&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/cd-player-simulator-using-c.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7c-yJE8YEtl5tr1z_dZfzn-_gsvguz7LGAIB6W93OYj6gbCUhMVLvFa-w0tJcO_2VKK0tY1vCAxGlLxLDRv2DFPoOyEfCC77i0svk4mYVRAm_I57j4SwCJ5Hqcp1p-7_lfnl8djTUFQw/s72-c/CD+player+simulator.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-3187263424579567535</guid><pubDate>Thu, 13 Oct 2016 07:33:00 +0000</pubDate><atom:updated>2018-03-14T01:07:36.252-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">class</category><category domain="http://www.blogger.com/atom/ns#">overload</category><title>Overload - and &gt; operator for class Time</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h2&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Overload - and
&amp;gt; operator for class Time, so that this will work:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none; text-indent: .5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;if (Time2 &amp;gt; Time1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-layout-grid-align: none; text-autospace: none; text-indent: .5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Time3 = Time2 - Time1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none; text-indent: .5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; mso-layout-grid-align: none; text-autospace: none; text-indent: .5in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Time3 = Time1 - Time2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;h2&gt;
Code&lt;/h2&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;stdafx.h&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;lt;conio.h&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;lt;iostream&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;lt;string.h&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;namespace&lt;/span&gt; std;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt; time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; hr;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; min;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; sec;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time():hr(0),min(0),sec(0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; getdata()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Enter
Hours: &quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt;hr;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Enter
Minutes: &quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt;min;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Enter
Seconds: &quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt;sec;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;operator&lt;/span&gt; &amp;gt; (time t1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(hr&amp;gt;t1.hr)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(hr == t1.hr)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(min&amp;gt;t1.min)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(min == t1.min)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (sec
&amp;gt; t1.sec)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(sec == t1.sec)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\n\nTimes are EQUAL.&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\n\nPress any key to close.&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getch();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time &lt;span style=&quot;color: blue;&quot;&gt;operator&lt;/span&gt; - (time t1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time temp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp.hr = hr - t1.hr;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp.min = min - t1.min;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp.sec = sec - t1.sec;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(temp.min &amp;lt; 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp.min = (temp.min * (-1));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(temp.sec &amp;lt; 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp.sec = (temp.sec * (-1));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; temp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; display()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;hr&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;:&quot;&lt;/span&gt;&amp;lt;&amp;lt;min&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;:&quot;&lt;/span&gt;&amp;lt;&amp;lt;sec;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt; main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time time1,time2,time3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Enter 1st Time:
\n&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time1.getdata();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\n\nEnter 2nd
Time: \n&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time2.getdata();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(time2&amp;gt;time1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time3 = time2 - time1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\n\n2nd
Time is greater.&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\nTime
after subtracting: &quot;&lt;/span&gt;;time3.display();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time3 = time1 - time2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\n\n1st
Time is greater.&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\nTime
after subtracting: &quot;&lt;/span&gt;;time3.display();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\n\nPress any key
to close.&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;



&lt;h2 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h2&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/AVvXsEgj-3bda5ApKPkdrakKsoRGzIPfWQU06ox00RpnowyS12SeEOrSOF7kQdxXkZNw93SNB46_l3caQ3WUjLEDxHovAUZC6uNmkIk4zmQaHSoDI3n6VPhSF78MesF18myCgmLjGx9Cp2nQeeU/s1600/time+comparison.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Overload - and &amp;gt; operator for class Time&quot; border=&quot;0&quot; height=&quot;427&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj-3bda5ApKPkdrakKsoRGzIPfWQU06ox00RpnowyS12SeEOrSOF7kQdxXkZNw93SNB46_l3caQ3WUjLEDxHovAUZC6uNmkIk4zmQaHSoDI3n6VPhSF78MesF18myCgmLjGx9Cp2nQeeU/s640/time+comparison.png&quot; title=&quot;Overload - and &amp;gt; operator for class Time&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/overload-and-operator-for-class-time.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj-3bda5ApKPkdrakKsoRGzIPfWQU06ox00RpnowyS12SeEOrSOF7kQdxXkZNw93SNB46_l3caQ3WUjLEDxHovAUZC6uNmkIk4zmQaHSoDI3n6VPhSF78MesF18myCgmLjGx9Cp2nQeeU/s72-c/time+comparison.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-8185885201488825912</guid><pubDate>Thu, 13 Oct 2016 07:20:00 +0000</pubDate><atom:updated>2018-03-14T01:09:40.385-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">class</category><title>Class of Employee with static members to count number of employees in the particular department.</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h2&gt;
Create a Class of Employee with static members to count number of employees in the
particular department?&lt;br /&gt;



&lt;h2 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h2&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;stdafx.h&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;lt;conio.h&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;lt;iostream&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;lt;string.h&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;namespace&lt;/span&gt; std;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt; employee&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; cs;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; phy;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; maths;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; eng;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; mtr;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; comp()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cs++;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; PHY()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; phy++;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; MATHS()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maths++;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ENG()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eng++;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; MTR()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mtr++;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; display()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\nNo. of employees in cs department&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&quot;&lt;/span&gt;&amp;lt;&amp;lt;cs;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\nNo. of employees in physics department =&quot;&lt;/span&gt;&amp;lt;&amp;lt;phy;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\nNo. of employees in maths department&amp;nbsp;&amp;nbsp;&amp;nbsp; =&quot;&lt;/span&gt;&amp;lt;&amp;lt;maths;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\nNo. of employees in engineering department=&quot;&lt;/span&gt;&amp;lt;&amp;lt;eng;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\nNo. of employees in metrology department = &quot;&lt;/span&gt;&amp;lt;&amp;lt;mtr;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\n\nTotal no. of employees= &quot;&lt;/span&gt;&amp;lt;&amp;lt;(cs+phy+maths+eng+mtr);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;
employee::cs=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;
employee::phy=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;
employee::maths=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;
employee::eng=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;
employee::mtr=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt; main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; employee c[15],phy[15],mth[15],eng[15],mtr[15],e;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; i,n,j;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Enter number of
employees of cs department: &quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;for&lt;/span&gt;(i=0;i&amp;lt;n;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c[i].comp();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Enter number of
employees of physics department: &quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;for&lt;/span&gt;(i=0;i&amp;lt;n;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; phy[i].PHY();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Enter number of
employees of maths department: &quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;for&lt;/span&gt;(i=0;i&amp;lt;n;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c[i].MATHS();&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Enter number of
employees of engineering department: &quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;for&lt;/span&gt;(i=0;i&amp;lt;n;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c[i].ENG();&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Enter number of
employees of metrology department: &quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cin&amp;gt;&amp;gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;for&lt;/span&gt;(i=0;i&amp;lt;n;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c[i].MTR();&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.display();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\n\nPress any key
to close.&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-no-proof: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; line-height: 115%; mso-no-proof: yes;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
Output&lt;/h2&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/AVvXsEjHzYJfnk5zuRctB8pEhAeo6KgKYQ_Dxs2vhfcQV8huC6KApXyue09p0vQI5dZv33yVrTp0gq3k2DCfh-vmK0wJRGbxQuC95RDVPHgQ3pGf9B6QaMCxLRB4nPJ8aT_rk8PT0xH4A-phj-U/s1600/count+employees.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Class of Employee with static members to count number of employees in the particular department.&quot; border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHzYJfnk5zuRctB8pEhAeo6KgKYQ_Dxs2vhfcQV8huC6KApXyue09p0vQI5dZv33yVrTp0gq3k2DCfh-vmK0wJRGbxQuC95RDVPHgQ3pGf9B6QaMCxLRB4nPJ8aT_rk8PT0xH4A-phj-U/s640/count+employees.png&quot; title=&quot;Class of Employee with static members to count number of employees in the particular department.&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/class-of-employee-with-static-members.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHzYJfnk5zuRctB8pEhAeo6KgKYQ_Dxs2vhfcQV8huC6KApXyue09p0vQI5dZv33yVrTp0gq3k2DCfh-vmK0wJRGbxQuC95RDVPHgQ3pGf9B6QaMCxLRB4nPJ8aT_rk8PT0xH4A-phj-U/s72-c/count+employees.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-1849624702189061003</guid><pubDate>Mon, 10 Oct 2016 07:16:00 +0000</pubDate><atom:updated>2018-03-14T01:10:00.669-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">assembly language programs</category><title>calculate students grade and display using assembly language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2&gt;
Problem&lt;/h2&gt;
Calculate grade of the students by adding subject marks input by the user. Display the grade to the user.&lt;br /&gt;

&lt;h2&gt;
Code&lt;/h2&gt;
&lt;div&gt;
&lt;div&gt;
include irvine32.inc&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
.data&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;array1 sdword &amp;nbsp;10 dup(?)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;array2 sdword &amp;nbsp;10 dup(?)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;array3 sdword 10 dup(?)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;array4 sdword +100,+100,+100,+100,+100&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;array5 sdword +100,+100,+2,+2,+100&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mul_array sdword 32 dup(0)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mine dword ?&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;temp dword 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;temp1 dword 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;temp2 dword 0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;two dword 2&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;student1_msg byte &quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-*-*-*-*-*- &amp;nbsp; &amp;nbsp; Student # 01 &amp;nbsp; &amp;nbsp; -*-*-*-*-*-*-&quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;student2_msg byte &quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-*-*-*-*-*- &amp;nbsp; &amp;nbsp; Student # 02 &amp;nbsp; &amp;nbsp; -*-*-*-*-*-*-&quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;la_marks_msg &amp;nbsp;byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LA &amp;nbsp;= &quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ms_marks_msg &amp;nbsp;byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MS &amp;nbsp;= &quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ds_marks_msg &amp;nbsp; byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DS &amp;nbsp; = &quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;algo_marks_msg &amp;nbsp; byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ALGO &amp;nbsp; = &quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;coal_marks_msg byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;COAL = &quot;,0&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;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_msg&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; byte &quot;Grade = &quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_f_msg &amp;nbsp;byte &quot;F&quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_c_msg &amp;nbsp;byte &quot;C&quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_b_msg &amp;nbsp;byte &quot;B&quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_a_msg &amp;nbsp;byte &quot;A&quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;num1_msg byte &quot;Enter 1st value: &quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;num2_msg byte &quot;Enter 2nd value: &quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;equation_msg byte &quot;Solving the equation: &quot;,0ah,0dh,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;result byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Result = &quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;even1_msg byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;1st number is even.&quot;,0ah,0dh,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;even2_msg byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;2nd number is even.&quot;,0ah,0dh,0ah,0dh,0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pos_msg byte &quot;1st number is positive.&quot;,0ah,0dh,0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pos1_msg byte &quot;2nd number is positive.&quot;,0ah,0dh,0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;odd_msg byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;one number is odd.&quot;,0ah,0dh,0ah,0dh,0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;neg_msg byte &quot;number is negative.&quot;,0ah,0dh,0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ans_msg byte &quot;Answer = &quot;,0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
.code&lt;/div&gt;
&lt;div&gt;
main proc&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;comment !&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov esi, offset array1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edi, offset array2&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ebp, offset array3&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 10&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;main_loop:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset num1_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call readint&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov [esi], eax&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset num1_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call readint&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov [edi], eax&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [esi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cmp eax, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jge positive_value1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp negative_value1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;positive_value1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov edx, offset pos_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov eax, [edi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cmp eax, 0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jge positive_value2&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp negative_value1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;positive_value2:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;call positive&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp jmp_to_loop&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;negative_value1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call negative&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;jmp_to_loop:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add esi, 4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add edi, 4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add ebp, 4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop main_loop&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov esi, offset array4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edi, offset array5&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 5&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ebp, offset array3&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [ebp]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov [esi], eax&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add ebp, 4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add esi,4&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l1&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 5&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l2:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [ebp]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov [edi], eax&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add ebp, 4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add edi, 4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l2&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov esi, offset array4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 5&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l3:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [esi]&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cmp eax, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jl negative_to_positive&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [esi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cmp eax, 100&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ja make_it_100&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp normal_execution&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;negative_to_positive:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov ebx, -1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;imul ebx&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cmp eax, 100&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;ja make_it_100&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp normal_execution&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;make_it_100:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;mov eax, 100&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;mov [esi], eax&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;normal_execution:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add esi, 4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l3&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edi, offset array5&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 5&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l4:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [edi]&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cmp eax, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jl negative_to_positive_1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [edi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cmp eax, 100&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ja make_it_100_1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp normal_execution_1&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;negative_to_positive_1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov ebx, -1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;imul ebx&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cmp eax, 100&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;ja make_it_100&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp normal_execution_1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;make_it_100_1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;mov eax, 100&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;mov [edi], eax&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;normal_execution_1:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add edi, 4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&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;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset student1_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset coal_marks_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, array4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset ms_marks_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [array4+4]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset ds_marks_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [array4+8]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset algo_marks_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [array4+12]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset la_marks_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [array4+16]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset grade_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&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;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov esi, offset array4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 5&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l5:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov ebx, [esi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add eax, ebx&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add esi, 4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l5&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp eax, 399&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ja grade_A&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp eax, 299&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ja grade_B&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp eax, 199&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ja grade_C&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp eax, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ja grade_F&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;jmp grading_L3&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_A:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset grade_a_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp grading_L3&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_B:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset grade_b_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp grading_L3&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_C:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset grade_c_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp grading_L3&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_F:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset grade_f_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grading_L3:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset student2_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&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;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset coal_marks_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, array5&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset ms_marks_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [array5+4]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset ds_marks_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [array5+8]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset algo_marks_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [array5+12]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset la_marks_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [array5+16]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&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;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset grade_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edi, offset array5&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 5&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l6:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov ebx, [edi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add eax, ebx&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add edi,4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l6&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp eax, 399&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ja grade_A_1&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp eax, 299&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ja grade_B_1&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp eax, 199&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ja grade_C_1&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp eax, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ja grade_F_1&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;jmp grading_L4&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_A_1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset grade_a_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp grading_L4&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_B_1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset grade_b_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp grading_L4&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_C_1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset grade_c_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp grading_L4&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grade_F_1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset grade_f_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;grading_L4:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;call equation&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
call crlf&lt;/div&gt;
&lt;div&gt;
call crlf&lt;/div&gt;
&lt;div&gt;
call crlf&lt;/div&gt;
&lt;div&gt;
exit&lt;/div&gt;
&lt;div&gt;
main endp&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
positive proc&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset pos1_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [esi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cdq&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;idiv two&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp edx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;je even_value1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;jmp odd_value1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;even_value1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset even1_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [edi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cdq&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;idiv two&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cmp edx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;je even_value2&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp odd_value1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;even_value2:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov edx, offset even2_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call multiply&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call display&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp jmp_from_even&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;odd_value1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov edx, offset odd_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call divide&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call display&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;jmp_from_even:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ret&lt;/div&gt;
&lt;div&gt;
positive endp&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
negative proc&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset neg_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [esi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cdq&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;idiv two&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp edx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;je even_value3&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pop edx&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;jmp odd_value3&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;even_value3:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset even1_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [edi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cdq&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;idiv two&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cmp edx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;je even_value4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp odd_value3&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;even_value4:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset even2_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call multiply&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call display&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp jmp_from_even&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;odd_value3:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov edx, offset odd_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call divide&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call display&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp_from_even:&lt;/div&gt;
&lt;div&gt;
ret&lt;/div&gt;
&lt;div&gt;
negative endp&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
multiply proc&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;push ecx&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset mul_array&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ebx, [esi]&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov mine, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov temp, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 32&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;shr ebx,1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jc one_jump&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp else_jump&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;one_jump:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov eax, mine&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov temp, eax&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov eax, [edi]&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;l1:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;cmp temp, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;je outside_loop&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;sub temp, 1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;shl eax, 1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp l1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;outside_loop:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov [edx], eax&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;add edx, 4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else_jump:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;add mine, 1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, lengthof mul_array&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset mul_array&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, 0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;add_array:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add eax,[edx]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add edx, 4&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop add_array&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 32&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ebx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset mul_array&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;empty_mul_array:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov [edx],ebx&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add edx, 4&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop empty_mul_array&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pop ecx&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ret&lt;/div&gt;
&lt;div&gt;
multiply endp&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
divide proc&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;push ecx&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [esi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cdq&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, [edi]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;idiv ecx&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pop ecx&lt;/div&gt;
&lt;div&gt;
ret&lt;/div&gt;
&lt;div&gt;
divide endp&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
display proc&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset ans_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov [ebp], eax&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ret&lt;/div&gt;
&lt;div&gt;
display endp&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
equation proc&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [array3+24]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cdq&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;idiv [array3+12]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov temp2, eax&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov esi, offset temp2&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, 0&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, array3&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cdq&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;idiv [array3+4]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov temp1, eax&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edi, offset temp1&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call multiply&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, [array3+16]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;add edx, [array3+20]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;add eax, edx&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov temp1, eax&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov esi, offset temp1&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edi, offset [array3+8]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call multiply&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;add eax, array3[28]&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset equation_msg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset result&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
ret&lt;/div&gt;
&lt;div&gt;
equation endp&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
end main&lt;/div&gt;
&lt;/div&gt;



&lt;h2&gt;
Output&lt;/h2&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/AVvXsEiQECwnBczIFEcFPYsDOipbWfjflsctaPRodWvXIkgUD6VLwVhwS9XD4rG5yOWkTRAN1aaKJmcSGz1NS1sMs3JwGCYt2Ns7ix3W2EMzVyMl07GdhpOCLtUNoO6dZZDGxVE2x5jYR3hsHFc/s1600/taks+2+pic+1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQECwnBczIFEcFPYsDOipbWfjflsctaPRodWvXIkgUD6VLwVhwS9XD4rG5yOWkTRAN1aaKJmcSGz1NS1sMs3JwGCYt2Ns7ix3W2EMzVyMl07GdhpOCLtUNoO6dZZDGxVE2x5jYR3hsHFc/s640/taks+2+pic+1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/calculate-students-grade-and-display.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQECwnBczIFEcFPYsDOipbWfjflsctaPRodWvXIkgUD6VLwVhwS9XD4rG5yOWkTRAN1aaKJmcSGz1NS1sMs3JwGCYt2Ns7ix3W2EMzVyMl07GdhpOCLtUNoO6dZZDGxVE2x5jYR3hsHFc/s72-c/taks+2+pic+1.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-8448972821631616492</guid><pubDate>Mon, 10 Oct 2016 07:06:00 +0000</pubDate><atom:updated>2018-03-14T01:10:15.435-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">assembly language programs</category><title>take input from user and take decision on the basis of these numbers whether to multiply or divide or shift</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2&gt;
Problem:&lt;/h2&gt;
Taking two inputs from  user and taking decision on the basis of these numbers:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;If both numbers are positive and even, than multiply those  using shift command.&lt;/li&gt;
&lt;li&gt;It both numbers are positive but one of them is odd,  than divide those using div or idiv.&lt;/li&gt;
&lt;li&gt;If one is negative and both numbers are even, than  again multiply using shift.&lt;/li&gt;
&lt;li&gt;If one number is negative and one of them is odd than divide using idiv  or div.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h2&gt;
include irvine32.inc&lt;br /&gt;
&lt;br /&gt;
.data&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;array1 sdword &amp;nbsp;10 dup(?)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;array2 sdword &amp;nbsp;10 dup(?)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;array3 sdword 10 dup(?)&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;array4 sdword 5 dup(?)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;array5 sdword 5 dup(?)&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mul_array sdword 32 dup(0)&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mine dword ?&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;temp dword 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;temp1 dword 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;temp2 dword 0&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;two dword 2&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;num1_msg byte &quot;Enter 1st value: &quot;,0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;num2_msg byte &quot;Enter 2nd value: &quot;,0&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;equation_msg byte &quot;Solving the equation: &quot;,0ah,0dh,0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;result byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Result = &quot;,0&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;even1_msg byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;1st number is even.&quot;,0ah,0dh,0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;even2_msg byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;2nd number is even.&quot;,0ah,0dh,0ah,0dh,0&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pos_msg byte &quot;1st number is positive.&quot;,0ah,0dh,0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pos1_msg byte &quot;2nd number is positive.&quot;,0ah,0dh,0&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;odd_msg byte &quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;one number is odd.&quot;,0ah,0dh,0ah,0dh,0&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;neg_msg byte &quot;number is negative.&quot;,0ah,0dh,0&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ans_msg byte &quot;Answer = &quot;,0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.code&lt;br /&gt;
main proc&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov esi, offset array1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edi, offset array2&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ebp, offset array3&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 10&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;main_loop:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset num1_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call readint&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov [esi], eax&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset num1_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call readint&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov [edi], eax&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [esi]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cmp eax, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jge positive_value1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp negative_value1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;positive_value1:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov edx, offset pos_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call writestring&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov eax, [edi]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;cmp eax, 0&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jge positive_value2&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp negative_value1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;positive_value2:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;call positive&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp jmp_to_loop&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;negative_value1:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call negative&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;jmp_to_loop:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add esi, 4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add edi, 4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add ebp, 4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop main_loop&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov esi, offset array4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edi, offset array5&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 5&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ebp, offset array3&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l1:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [ebp]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;;call writeint&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov [esi], eax&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add ebp, 4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add esi,4&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l1&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 5&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l2:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [ebp]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;;call writeint&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov [edi], eax&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add ebp, 4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add edi, 4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l2&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov esi, offset array4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 5&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l3:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [esi]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writeint&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add esi, 4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l3&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edi, offset array5&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 5&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l4:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [edi]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writeint&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add edi, 4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;call equation&lt;br /&gt;
&lt;br /&gt;
call crlf&lt;br /&gt;
call crlf&lt;br /&gt;
call crlf&lt;br /&gt;
exit&lt;br /&gt;
main endp&lt;br /&gt;
&lt;br /&gt;
positive proc&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset pos1_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [esi]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cdq&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;idiv two&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp edx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;je even_value1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;jmp odd_value1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;even_value1:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call crlf&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset even1_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [edi]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cdq&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;idiv two&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cmp edx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;je even_value2&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp odd_value1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;even_value2:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov edx, offset even2_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call multiply&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call display&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp jmp_from_even&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;odd_value1:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov edx, offset odd_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call divide&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call display&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;jmp_from_even:&lt;br /&gt;
&lt;br /&gt;
ret&lt;br /&gt;
positive endp&lt;br /&gt;
&lt;br /&gt;
negative proc&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset neg_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [esi]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cdq&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;idiv two&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cmp edx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;je even_value3&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pop edx&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;jmp odd_value3&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;even_value3:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset even1_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov eax, [edi]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cdq&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;idiv two&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cmp edx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;je even_value4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp odd_value3&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;even_value4:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov edx, offset even2_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call multiply&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;call display&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp jmp_from_even&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;odd_value3:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov edx, offset odd_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call divide&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;call display&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp_from_even:&lt;br /&gt;
ret&lt;br /&gt;
negative endp&lt;br /&gt;
&lt;br /&gt;
multiply proc&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;push ecx&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset mul_array&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ebx, [esi]&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov mine, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov temp, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 32&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;l:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;shr ebx,1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jc one_jump&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;jmp else_jump&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;one_jump:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov eax, mine&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov temp, eax&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov eax, [edi]&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;l1:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;cmp temp, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;je outside_loop&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;sub temp, 1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;shl eax, 1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;jmp l1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;outside_loop:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;mov [edx], eax&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;add edx, 4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else_jump:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;add mine, 1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop l&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, lengthof mul_array&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset mul_array&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, 0&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;add_array:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add eax,[edx]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add edx, 4&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop add_array&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, 32&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ebx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset mul_array&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;empty_mul_array:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mov [edx],ebx&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;add edx, 4&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;loop empty_mul_array&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pop ecx&lt;br /&gt;
&lt;br /&gt;
ret&lt;br /&gt;
multiply endp&lt;br /&gt;
&lt;br /&gt;
divide proc&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;push ecx&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [esi]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cdq&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov ecx, [edi]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;idiv ecx&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pop ecx&lt;br /&gt;
ret&lt;br /&gt;
divide endp&lt;br /&gt;
&lt;br /&gt;
display proc&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset ans_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov [ebp], eax&lt;br /&gt;
&lt;br /&gt;
ret&lt;br /&gt;
display endp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
equation proc&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, [array3+24]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cdq&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;idiv [array3+12]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov temp2, eax&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov esi, offset temp2&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, 0&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov eax, array3&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cdq&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;idiv [array3+4]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov temp1, eax&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edi, offset temp1&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call multiply&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, [array3+16]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;add edx, [array3+20]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;add eax, edx&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov temp1, eax&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov esi, offset temp1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edi, offset [array3+8]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call multiply&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;add eax, array3[28]&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset equation_msg&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call crlf&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mov edx, offset result&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writestring&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;call writeint&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
ret&lt;br /&gt;
equation endp&lt;br /&gt;
&lt;br /&gt;
end main&lt;br /&gt;




&lt;h2 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h2&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/AVvXsEjFQFDNN9oRMiudFl_RrIy9-IEPwNQdK9ZeqgXwPISY5dAP2RP-dgKJxmRu3AazAS7j_2C4OhxIEtc54bwUMmwpTohiDosKPDHyzTR4Ookkjtg1BFGeuY7b9F3IR40xwZMWCsENpRB7pak/s1600/task+1-+pic1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;shift mul div idiv assembly language&quot; border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFQFDNN9oRMiudFl_RrIy9-IEPwNQdK9ZeqgXwPISY5dAP2RP-dgKJxmRu3AazAS7j_2C4OhxIEtc54bwUMmwpTohiDosKPDHyzTR4Ookkjtg1BFGeuY7b9F3IR40xwZMWCsENpRB7pak/s640/task+1-+pic1.png&quot; width=&quot;594&quot; /&gt;&lt;/a&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/AVvXsEi4suC0l2oeVHAq4XuAG263O8kE4rlatHc2UMscSKO5KVTPRg0g7Vu-avaI_60l-Ou8wyDFFUmUQEPza24SCaq8xIMchdy4RPh-qr4SIXngGgfR9C3L31HMIvH5g6D5_8JL2JL8iEF3NjU/s1600/taks+1+pic+2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;shift mul div idiv assembly language&quot; border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4suC0l2oeVHAq4XuAG263O8kE4rlatHc2UMscSKO5KVTPRg0g7Vu-avaI_60l-Ou8wyDFFUmUQEPza24SCaq8xIMchdy4RPh-qr4SIXngGgfR9C3L31HMIvH5g6D5_8JL2JL8iEF3NjU/s640/taks+1+pic+2.png&quot; width=&quot;594&quot; /&gt;&lt;/a&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/AVvXsEi2n2H5Fm-XRnzT8v34x4Gd_bffHUZpgMfa04pmNXf5f9AD-lP3oA1bWzcvnTX4aUgxpL-u_ljEAZzffhyphenhyphen54thZ0QtpqyIDi8ytCLFWzxh0-K5sxDYGSAKoG2gBlOeql7EcnmOhyphenhyphengVymic/s1600/taks+1+pic+3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;shift mul div idiv assembly language&quot; border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2n2H5Fm-XRnzT8v34x4Gd_bffHUZpgMfa04pmNXf5f9AD-lP3oA1bWzcvnTX4aUgxpL-u_ljEAZzffhyphenhyphen54thZ0QtpqyIDi8ytCLFWzxh0-K5sxDYGSAKoG2gBlOeql7EcnmOhyphenhyphengVymic/s640/taks+1+pic+3.png&quot; width=&quot;594&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&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/take-input-from-user-and-take-decision.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFQFDNN9oRMiudFl_RrIy9-IEPwNQdK9ZeqgXwPISY5dAP2RP-dgKJxmRu3AazAS7j_2C4OhxIEtc54bwUMmwpTohiDosKPDHyzTR4Ookkjtg1BFGeuY7b9F3IR40xwZMWCsENpRB7pak/s72-c/task+1-+pic1.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-5149731443307824206</guid><pubDate>Fri, 07 Oct 2016 12:40:00 +0000</pubDate><atom:updated>2016-10-07T05:43:55.024-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><title>Linear Search and Binary Search using C and C++ Language - recursive</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Write programs in C/C++ language to find a specific number from
a user input array elements by following linear search and binary search algorithms.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;h2&gt;
Method – 1: Linear search&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;h3&gt;
Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //declaring variables and array&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int max = 5;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int i,j=0,s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int a[max];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Taking input(Numbers) from user.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for(i=0;i&amp;lt;max;i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter &quot;&amp;lt;&amp;lt;(i+1)&amp;lt;&amp;lt;&quot;th Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;a[i];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Asking user to enter the number he/she wants to search&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\nEnter number to search: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Searching the number&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\nAfter Searching:&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for(i=0;i&amp;lt;max;i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (a[i]==s)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\tThe number (&quot;&amp;lt;&amp;lt;a[i]&amp;lt;&amp;lt;&quot;) is at &quot;&amp;lt;&amp;lt;(i+1)&amp;lt;&amp;lt;&quot;th position.&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;j = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Display Number and its position (after searching)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (j == 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Entered number is not in the list.&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n\nPress any key to exit.&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return 0; &amp;nbsp;&lt;br /&gt;
}&lt;/div&gt;
&lt;h3&gt;
Output&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&gt;
&lt;div class=&quot;MsoNormal&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/AVvXsEh7Ddx_ByCyNfihqDDqrDSO6GOrbsLVLtbaNYlWOOrzfrEpEA9050ZXnKa-W46nLjAn3pzhbnFPFfUTzZkndQol3lOkgvMXzl63h88IY2BG8CoF7WSqCp3xTtGPwGSRGqyp7I40QwCeJpU/s1600/Linear+Search.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; alt=&quot;Linear Search c/c++&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Ddx_ByCyNfihqDDqrDSO6GOrbsLVLtbaNYlWOOrzfrEpEA9050ZXnKa-W46nLjAn3pzhbnFPFfUTzZkndQol3lOkgvMXzl63h88IY2BG8CoF7WSqCp3xTtGPwGSRGqyp7I40QwCeJpU/s640/Linear+Search.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Method – 2: Recursive linear search&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;h3&gt;
Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;conio.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int linearSearch( const int array[], int length, int value);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; const int arraySize = 100;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int a[arraySize];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int element;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for( int i = 0; i &amp;lt; arraySize; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a[i] = 2 * i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; element = linearSearch( a, arraySize, 8);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if( element != -1 )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;Found value in element &quot; &amp;lt;&amp;lt; element &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;Value not found.&quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int linearSearch( const int array[], int length, int value)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if(length==0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return -1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else if(array[length-1]==value)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return length-1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else return linearSearch( array, length-1, value);&lt;br /&gt;
}&lt;/div&gt;
&lt;h3&gt;
Output&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&gt;
&lt;div class=&quot;MsoNormal&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/AVvXsEjz5ZtkX51csR5P23DEYtvssYl3-MvR7hIXQJ36V8KYSpRXvIGTHFzp2JjEidkVuGx4tiYYR58Mkoh3kr9ZW1dbXbwjkFWjmr-PnmKrfXsZSO1DhNXWX2J0sBMhgTFzYciec4MBqvupiic/s1600/Recursive+Linear+Search.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; alt=&quot;Recursive Linear Search c/c++&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5ZtkX51csR5P23DEYtvssYl3-MvR7hIXQJ36V8KYSpRXvIGTHFzp2JjEidkVuGx4tiYYR58Mkoh3kr9ZW1dbXbwjkFWjmr-PnmKrfXsZSO1DhNXWX2J0sBMhgTFzYciec4MBqvupiic/s640/Recursive+Linear+Search.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Method – 3: Binary Search&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;h3&gt;
Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //declaring variables and array&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int max = 10;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int i,j,s,m,location,k;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int a[max];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Taking input(Numbers) from user.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for(i=0;i&amp;lt;max;i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter &quot;&amp;lt;&amp;lt;(i+1)&amp;lt;&amp;lt;&quot;th Number: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;a[i];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Asking user to enter the number he/she wants to search&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\nEnter number to search: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Searching the number&lt;br /&gt;
&amp;nbsp; &amp;nbsp; i = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; j = max;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (i &amp;lt; j)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; m = ((i+j)/2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (s &amp;gt; a[m])&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i = m+1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; j = m;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (s == a[i])&lt;br /&gt;
&amp;nbsp; &amp;nbsp; { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //if searched number is equal to a[i]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nEntered number (&quot;&amp;lt;&amp;lt;s&amp;lt;&amp;lt;&quot;) is at &quot;&amp;lt;&amp;lt;(i+1)&amp;lt;&amp;lt;&quot;th position.&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //if the searched number is not in the list&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n\nEntered number is not in the list.&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n\nPress any key to exit.&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return 0; &amp;nbsp;&lt;br /&gt;
}&lt;/div&gt;
&lt;h3&gt;
Output&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&gt;
&lt;div class=&quot;MsoNormal&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/AVvXsEjz_QEvufQxMow8ezeiq7LPo0VQ-VpSKnVC9ZM11hpB92v_4plLN63XPiAx5BYXv2D-NpXOiX-OAoB76Tbyv-vCCjdOy7HaJNG_QOPE_f_c7N0iS0Vzyl-F-j8fatR5W6URLDCfbBpMtrI/s1600/Binary+Search.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; alt=&quot;Binary Search c/c++&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz_QEvufQxMow8ezeiq7LPo0VQ-VpSKnVC9ZM11hpB92v_4plLN63XPiAx5BYXv2D-NpXOiX-OAoB76Tbyv-vCCjdOy7HaJNG_QOPE_f_c7N0iS0Vzyl-F-j8fatR5W6URLDCfbBpMtrI/s640/Binary+Search.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/linear-search-and-binary-search-using.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Ddx_ByCyNfihqDDqrDSO6GOrbsLVLtbaNYlWOOrzfrEpEA9050ZXnKa-W46nLjAn3pzhbnFPFfUTzZkndQol3lOkgvMXzl63h88IY2BG8CoF7WSqCp3xTtGPwGSRGqyp7I40QwCeJpU/s72-c/Linear+Search.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-3195009417084439668</guid><pubDate>Fri, 07 Oct 2016 07:38:00 +0000</pubDate><atom:updated>2018-03-12T06:53:33.786-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Language</category><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><title>Find the nth Fibonacci number in C/C++ Language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
There are multiple ways to achieve that. Following are the 3
methods to find nth Fibonacci number.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Algorithm: We know that&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
Fib (n) = fib (n-1) +
fib (n-2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Our program will stop if one of the following conditions are met:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
n = 2 || n = 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
To &lt;a href=&quot;https://en.wikipedia.org/wiki/Fibonacci_number&quot;&gt;learn
about Fibonacci numbers and sequence&lt;/a&gt; (click the link).&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;h2&gt;
Method – 1: iteratively using for loop&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;




&lt;p style=&quot;text-align: center&quot;&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- BHT-Bottom --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:468px;height:60px&quot;
     data-ad-client=&quot;ca-pub-7732684647097495&quot;
     data-ad-slot=&quot;9823443502&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;/p&gt;
  


&lt;h3&gt;
Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&gt;
&lt;div&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int fib(int n);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; int n, answer;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;Enter number to find: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cin &amp;gt;&amp;gt; n;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;\n\n&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; answer = fib(n);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; answer &amp;lt;&amp;lt; &quot; is the &quot; &amp;lt;&amp;lt; n &amp;lt;&amp;lt; &quot;th Fibonacci number\n&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int fib(int n)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; int u = 0;&lt;br /&gt;
&amp;nbsp; int v = 1;&lt;br /&gt;
&amp;nbsp; int i, t;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; for(i = 2; i &amp;lt;= n; i++)&lt;br /&gt;
&amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; t = u + v;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; u = v;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; v = t;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; return v;&lt;br /&gt;
}&lt;/div&gt;

&lt;p style=&quot;text-align: center&quot;&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- BHT-Bottom --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:468px;height:60px&quot;
     data-ad-client=&quot;ca-pub-7732684647097495&quot;
     data-ad-slot=&quot;9823443502&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;/p&gt;


&lt;h2&gt;
Output&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&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/AVvXsEhK_XlyX_MFYCIIEdmMygoT_s-gcV1sfy-yZCw2FPLmtwD2CdVd9foftteQdW-GlB0cPhuNVzdaarTD1JIHZy6Ca6BhsYQKwP1whS4ZJnXHVTYQ4t7E-nEERVxvCRARxGTQCdu0TAXjCSU/s1600/iterative.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK_XlyX_MFYCIIEdmMygoT_s-gcV1sfy-yZCw2FPLmtwD2CdVd9foftteQdW-GlB0cPhuNVzdaarTD1JIHZy6Ca6BhsYQKwP1whS4ZJnXHVTYQ4t7E-nEERVxvCRARxGTQCdu0TAXjCSU/s640/iterative.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Method – 2: Using recursion&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;h3&gt;
Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&gt;
&lt;div&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int fib(int n);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; int n, answer;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;Enter number to find: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cin &amp;gt;&amp;gt; n;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;\n\n&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; answer = fib(n);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; answer &amp;lt;&amp;lt; &quot; is the &quot; &amp;lt;&amp;lt; n &amp;lt;&amp;lt; &quot;th Fibonacci number\n&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int fib (int n)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;Processing fib(&quot; &amp;lt;&amp;lt; n &amp;lt;&amp;lt; &quot;)... &quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (n &amp;lt; 3 )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout &amp;lt;&amp;lt; &quot;Return 1!\n&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;Call fib(&quot; &amp;lt;&amp;lt; n-2 &amp;lt;&amp;lt; &quot;) and fib(&quot; &amp;lt;&amp;lt; n-1 &amp;lt;&amp;lt; &quot;).\n&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return( fib(n-2) + fib(n-1));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;/div&gt;
&lt;h3&gt;
Output&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&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/AVvXsEidf8YS09rRa5pIl9-HHgLP1F-u0eqFjTlScoTuO2Tu-vS5xVFNGB_4wyZPAUj-rzyZRpjsPxD7cZ9bEmJ6aswfdIlM8rI8apzcZU32CppA2WdnMc1D9THAa3VoxxFoE1H2Sl9MluzW3aA/s1600/recursive.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidf8YS09rRa5pIl9-HHgLP1F-u0eqFjTlScoTuO2Tu-vS5xVFNGB_4wyZPAUj-rzyZRpjsPxD7cZ9bEmJ6aswfdIlM8rI8apzcZU32CppA2WdnMc1D9THAa3VoxxFoE1H2Sl9MluzW3aA/s640/recursive.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Method – 3: Using recursion&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;h3&gt;
Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int fib(int n);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; int n, answer;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;Enter number to find: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cin &amp;gt;&amp;gt; n;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; &quot;\n\n&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; answer = fib(n);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; cout &amp;lt;&amp;lt; answer &amp;lt;&amp;lt; &quot; is the &quot; &amp;lt;&amp;lt; n &amp;lt;&amp;lt; &quot;th Fibonacci number\n&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
}&lt;br /&gt;
int fib(int n)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; if (n &amp;lt; 2)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return n;&lt;br /&gt;
&amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return fib(n-1) + fib(n-2);&lt;br /&gt;
}&lt;br /&gt;
&lt;h3&gt;
Output&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&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/AVvXsEj8Y9RIOezAI5VCrp7WChNc7lLDl5N1jmBlNpu0iR-TCVc-QFORqSgJCbLtBr71oHXHmxVuXCJDcqkn6ypZByYC9jU5ft0zLgEOKO00mBQhpWRL85aj48iiqY190Om9Z2qeTUwOUAxWmbw/s1600/recursive2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8Y9RIOezAI5VCrp7WChNc7lLDl5N1jmBlNpu0iR-TCVc-QFORqSgJCbLtBr71oHXHmxVuXCJDcqkn6ypZByYC9jU5ft0zLgEOKO00mBQhpWRL85aj48iiqY190Om9Z2qeTUwOUAxWmbw/s640/recursive2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/find-nth-fibonacci-number-in-cc-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK_XlyX_MFYCIIEdmMygoT_s-gcV1sfy-yZCw2FPLmtwD2CdVd9foftteQdW-GlB0cPhuNVzdaarTD1JIHZy6Ca6BhsYQKwP1whS4ZJnXHVTYQ4t7E-nEERVxvCRARxGTQCdu0TAXjCSU/s72-c/iterative.png" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-1983285091482905128</guid><pubDate>Wed, 05 Oct 2016 09:46:00 +0000</pubDate><atom:updated>2018-03-14T01:14:32.514-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">C Language</category><title>Write a simulator for the assembly language ISA design in C language.</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

  

 

&lt;h2&gt;
Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;stdafx.h&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;lt;conio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//initializing the memory and registers&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; initialization(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; a[]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; i=0;i&amp;lt;16;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a[i]
= (i+1)*10;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//number of instructions&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; input_instructions(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; x;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the number of instructions
you want to perform: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s
(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;x);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; x;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//loading the register from memory&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; load(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; row, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; inst[][3]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inst[row][0]
= 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the number of register
ranging from 1 to 16: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][1]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the number of memory from
which you want to load ranging from 1 to 16: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//adding the two registers&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; add(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; row,&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; inst[][3]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inst[row][0]
= 5;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the destination register
number: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][1]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the source register number:
&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//storing the value to the memory&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; store(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; row,&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; inst[][3]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inst[row][0]
= 3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the register number: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][1]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the memory number: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//display the instruction memory&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; display_pattern(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; no_of_ins,&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; inst[][3]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\********************************************************************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n******************************
Instruction Memory ******************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n********************************************************************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; i=0;i&amp;lt;no_of_ins;i++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\t\t\t\t%d\t%d\t%d\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][0],inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; i=0;i&amp;lt;no_of_ins;i++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 1){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t\t\t\tLoadR\tR%d\tM%d\n\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 3){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t\t\t\tStoreR\tR%d\tM%d\n\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 5){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t\t\t\tAddR\tR%d\tR%d\n\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\nPress any key to
continue...&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//display registers and memorys&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; display_reg_mem(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; reg[],&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; mem[]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\nRegister: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; j=0;j&amp;lt;16;j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&amp;nbsp;&amp;nbsp;
&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,reg[j]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n-----------------------------------------------------------------------------&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\nMemory: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; j=0;j&amp;lt;16;j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&amp;nbsp;
&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,mem[j]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//ISA simulator&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; display_cycles(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; no_of_inst,&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; inst[][3],&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; reg[],&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; mem[]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; i=0;i&amp;lt;no_of_inst;i++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;********************************************************************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n******************************
ISA Simulator ***********************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n********************************************************************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\n*******************************
Instruction # %d ********************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,(i+1));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nFetch Instruction:\t
%d\t%d\t%d\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][0],inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 1){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nDecode Instruction:\t
LoadR\tRegister%d\tMemory%d\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nExecute Instruction:\t
Register updated Succesfully\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg[(inst[i][1]-1)]
= mem[(inst[i][2]-1)];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 5){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nDecode Instruction:\t
AddR\tRegister%d\tRegister%d\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nExecute Instruction:\t
Register updated Succesfully\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg[(inst[i][1]-1)]
= reg[(inst[i][1]-1)] + reg[(inst[i][2]-1)];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 3){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nDecode Instruction:\t
StoreR\tRegister%d\tMemory%d\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nExecute Instruction:\t
Memory updated Succesfully\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mem[(inst[i][2]-1)]
= reg[(inst[i][1]-1)];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\nPress any key to
continue...&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; main(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;color 3f&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; choice,count=0,row=0,lines;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; registers[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; memorys[16];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initialization(memorys);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lines
= input_instructions();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; instructions[100][3];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; i=0;i&amp;lt;lines;i++){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Select one of the following
instruction type from the following:\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t1. Load&amp;nbsp; \n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t2. Add&amp;nbsp;&amp;nbsp; \n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t3. Store \n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t4. Exit&amp;nbsp; \n\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter your choice: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; choice
= _getche();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;switch&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; (choice)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;case&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&#39;1&#39;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//load&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load(row,instructions);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;case&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&#39;2&#39;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//add&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add(row,instructions);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;case&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&#39;3&#39;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//store&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; store(row,instructions);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;case&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&#39;4&#39;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//exit&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\nInvalid input! Press any key to
continue.&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_pattern(lines,instructions);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_cycles(lines,instructions,registers,memorys);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 200%; margin-left: .25in;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt; line-height: 200%;&quot;&gt;}&lt;/span&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 200%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;&lt;br clear=&quot;all&quot; style=&quot;mso-special-character: line-break; page-break-before: always;&quot; /&gt;
&lt;/span&gt;&lt;/u&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;



&lt;h2&gt;
Program Output - Screen Shots&lt;span style=&quot;font-size: 12.0pt; line-height: 107%; mso-bidi-font-size: 13.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 200%;&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shapetype
 id=&quot;_x0000_t75&quot; coordsize=&quot;21600,21600&quot; o:spt=&quot;75&quot; o:preferrelative=&quot;t&quot;
 path=&quot;m@4@5l@4@11@9@11@9@5xe&quot; filled=&quot;f&quot; stroked=&quot;f&quot;&gt;
 &lt;v:stroke joinstyle=&quot;miter&quot;/&gt;
 &lt;v:formulas&gt;
  &lt;v:f eqn=&quot;if lineDrawn pixelLineWidth 0&quot;/&gt;
  &lt;v:f eqn=&quot;sum @0 1 0&quot;/&gt;
  &lt;v:f eqn=&quot;sum 0 0 @1&quot;/&gt;
  &lt;v:f eqn=&quot;prod @2 1 2&quot;/&gt;
  &lt;v:f eqn=&quot;prod @3 21600 pixelWidth&quot;/&gt;
  &lt;v:f eqn=&quot;prod @3 21600 pixelHeight&quot;/&gt;
  &lt;v:f eqn=&quot;sum @0 0 1&quot;/&gt;
  &lt;v:f eqn=&quot;prod @6 1 2&quot;/&gt;
  &lt;v:f eqn=&quot;prod @7 21600 pixelWidth&quot;/&gt;
  &lt;v:f eqn=&quot;sum @8 21600 0&quot;/&gt;
  &lt;v:f eqn=&quot;prod @7 21600 pixelHeight&quot;/&gt;
  &lt;v:f eqn=&quot;sum @10 21600 0&quot;/&gt;
 &lt;/v:formulas&gt;
 &lt;v:path o:extrusionok=&quot;f&quot; gradientshapeok=&quot;t&quot; o:connecttype=&quot;rect&quot;/&gt;
 &lt;o:lock v:ext=&quot;edit&quot; aspectratio=&quot;t&quot;/&gt;
&lt;/v:shapetype&gt;&lt;v:shape id=&quot;Picture_x0020_7&quot; o:spid=&quot;_x0000_i1038&quot; type=&quot;#_x0000_t75&quot;
 style=&#39;width:6in;height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 200%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: 200%; tab-stops: 63.0pt center 3.0in; text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&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/AVvXsEjq49UE1i4_D7BvbR3CEhkrwYV3ZpdeY_JS0epFzZqZbGR1qP7hn7__xxLE67UYTY357O5iXGJnBSNyHz5yIjyguC9IcGxNtx2y8DbqN75Hz5DINmTtRTiQPigZsDEnsgFl9AyaDa6FHmM/s1600/s1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq49UE1i4_D7BvbR3CEhkrwYV3ZpdeY_JS0epFzZqZbGR1qP7hn7__xxLE67UYTY357O5iXGJnBSNyHz5yIjyguC9IcGxNtx2y8DbqN75Hz5DINmTtRTiQPigZsDEnsgFl9AyaDa6FHmM/s640/s1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen 01&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;In
the above screen 01 user must enter the instructions to run the program. For
example we want to run our code for 4 instructions, so we will write 4 and hit
enter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The following screen will
be displayed. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_8&quot; o:spid=&quot;_x0000_i1037&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&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/AVvXsEiWye6gG2ZjT9YvrGX8jSjNBKD0L2TFsNDr6k_aANzYgHVDM9gHVQpUmkS10MPV6ixngrFkHJQIweuHn2Pxup8ZV_nrXW1UBXEuByuyP0ax1dRUIhoeUmeBPpAtG2i5YMCPd0bxCoT0G_E/s1600/s2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWye6gG2ZjT9YvrGX8jSjNBKD0L2TFsNDr6k_aANzYgHVDM9gHVQpUmkS10MPV6ixngrFkHJQIweuHn2Pxup8ZV_nrXW1UBXEuByuyP0ax1dRUIhoeUmeBPpAtG2i5YMCPd0bxCoT0G_E/s640/s2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
02&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;There
are 4 options 1&lt;sup&gt;st&lt;/sup&gt; option is used to load the register from memory, 2&lt;sup&gt;nd&lt;/sup&gt;
option add the two registers, 3&lt;sup&gt;rd&lt;/sup&gt; option stores the value from
register to the memory, and the 4&lt;sup&gt;th&lt;/sup&gt; option is used to quit the
program. For example, we press 1 and hit enter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The following screen will
be displayed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_9&quot; o:spid=&quot;_x0000_i1036&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&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/AVvXsEi71KeDGd__AZyYZQtno5nfuMm0CUCv-_xOGCJ7RG0CmS-HhHzvWDxCLRkPYaH45S1o17QQ_BN-gwOXX6tBtyyQHCLv3N6hzWNZeC7LbglTiqh8epn6tR4puMFPIdwTZmwAkp6ZoSns33c/s1600/s3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi71KeDGd__AZyYZQtno5nfuMm0CUCv-_xOGCJ7RG0CmS-HhHzvWDxCLRkPYaH45S1o17QQ_BN-gwOXX6tBtyyQHCLv3N6hzWNZeC7LbglTiqh8epn6tR4puMFPIdwTZmwAkp6ZoSns33c/s640/s3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
03&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;User
will be asked to enter the register number and the memory number. We will enter
2 for register and 7 for memory.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_10&quot; o:spid=&quot;_x0000_i1035&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&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/AVvXsEhmvLRhXyqpeccUf6ClBeH7PzL7f1gNFX2JjO4B24Xe0fX9oN5ubSLceB47KZD-LrjiHGz935xgRDe_ZQRc9SvKw8y5XAjln4CVdF5SeRaej_OnTCnhqylNn2uWVO98yA3xV0kemkr9fTs/s1600/s4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmvLRhXyqpeccUf6ClBeH7PzL7f1gNFX2JjO4B24Xe0fX9oN5ubSLceB47KZD-LrjiHGz935xgRDe_ZQRc9SvKw8y5XAjln4CVdF5SeRaej_OnTCnhqylNn2uWVO98yA3xV0kemkr9fTs/s640/s4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
04&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;Same procedure will be
followed again i.e. steps for screen 02.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_11&quot; o:spid=&quot;_x0000_i1034&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image008.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoLbxtTqvIirfODvcHzd4mJTDIUdkCTL0WV6uHp9UWk9ST5P9noQKHZgrd2G9CAUMlPQVqZyXYvy6d3_wmVPNkwAvKZ_yzviMXYxGnVhp-m5FS6UTLKA10foYkNQGzuChPIg913lTWhvQ/s1600/s5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoLbxtTqvIirfODvcHzd4mJTDIUdkCTL0WV6uHp9UWk9ST5P9noQKHZgrd2G9CAUMlPQVqZyXYvy6d3_wmVPNkwAvKZ_yzviMXYxGnVhp-m5FS6UTLKA10foYkNQGzuChPIg913lTWhvQ/s640/s5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
05&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;This time we will enter 3
for register and 6 for the memory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;After
you have entered the value in the memory hit enter… the program will show you
the following screen.&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&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/AVvXsEjLZEIszW__6YI0NJX84G38QUD7oJ8XExi8OmKyGfEZF7CSvYW5x3mYUubaR-KOQuYLID-f1UDTyK-gTTbnDFi5UCmiHNm99wYSNSrkVBNrVux7ULCUJiPc5THhF_zkjJm4pfw_02DJSrc/s1600/s6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLZEIszW__6YI0NJX84G38QUD7oJ8XExi8OmKyGfEZF7CSvYW5x3mYUubaR-KOQuYLID-f1UDTyK-gTTbnDFi5UCmiHNm99wYSNSrkVBNrVux7ULCUJiPc5THhF_zkjJm4pfw_02DJSrc/s640/s6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
06&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;This time press 2 and hit
enter.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&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/AVvXsEiwzT3akXGamEAcI4iBDfO5RAWR_s3cvmcbItoihNK3dBvW6yhFd_zGkzGPKJrd3pnxny59nq8DYFi1SyvtP4TJDkc2Tglzr28smLDgPoPA9onZKsnD8zoHCXzkBOVgKjfpgePPOB0heHw/s1600/s7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwzT3akXGamEAcI4iBDfO5RAWR_s3cvmcbItoihNK3dBvW6yhFd_zGkzGPKJrd3pnxny59nq8DYFi1SyvtP4TJDkc2Tglzr28smLDgPoPA9onZKsnD8zoHCXzkBOVgKjfpgePPOB0heHw/s640/s7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;, serif;&quot;&gt;Screen
07&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;It
will ask you to enter two register numbers one by one. The 1&lt;sup&gt;st&lt;/sup&gt;
register is the destination and the 2&lt;sup&gt;nd&lt;/sup&gt; register is the source i.e.
after the value is entered, the value of the destination will be overwritten with
the sum of the two registers in the &lt;a href=&quot;http://islandprogrammers.blogspot.com/2016/09/load-add-and-store-instructions-in.html&quot;&gt;add
instruction&lt;/a&gt;. Here we have entered 2 and 3 register numbers where 2&lt;sup&gt;nd&lt;/sup&gt;
register will be overwritten after the execution with the sum of the register
no 2 and 3.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_14&quot; o:spid=&quot;_x0000_i1031&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image014.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&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/AVvXsEicWXubOi-mQuEPYq_Er29AVll2aV4DOOQH6E_b2rAfcVmLN45xyOQMIEg7BKa17svABUJoFIdsr3b1OnkhUXytwJD1wMRzF9ms_HypPjo_tj2W_yQHnFtJeOW3x-zrSG8hyphenhyphen32A8hEqKS8/s1600/s8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicWXubOi-mQuEPYq_Er29AVll2aV4DOOQH6E_b2rAfcVmLN45xyOQMIEg7BKa17svABUJoFIdsr3b1OnkhUXytwJD1wMRzF9ms_HypPjo_tj2W_yQHnFtJeOW3x-zrSG8hyphenhyphen32A8hEqKS8/s640/s8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;, serif;&quot;&gt;Screen
08&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;After you enter the
register number, the above screen will be displayed again, press 3 this time
and hit enter.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_15&quot; o:spid=&quot;_x0000_i1030&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image016.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&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/AVvXsEidRPzAsA_WIOrqsc_yPu3hCIK4SUTeUzar2t35UFnM5LsP8WJ1RYglXIVgWnk2fmBahIbyNqoV4C0NFbFwzcfzHO3RlAnpfIx6gKbKK0GEC5VKfGOXelNhgEsGjGj8RUQWK3w9QaJuZvI/s1600/s9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidRPzAsA_WIOrqsc_yPu3hCIK4SUTeUzar2t35UFnM5LsP8WJ1RYglXIVgWnk2fmBahIbyNqoV4C0NFbFwzcfzHO3RlAnpfIx6gKbKK0GEC5VKfGOXelNhgEsGjGj8RUQWK3w9QaJuZvI/s640/s9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;, serif;&quot;&gt;Screen
09&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The above screen will be
shown asking the user to enter the register number from which he/she wants to
store data and then the program will ask for the memory number. For instance,
we enter 2 for register and 6 for memory and press enter.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&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/AVvXsEi5MuofA8ZPFtKvnOABUc2PilRZu6c3cY7BCLLZy9YpPuJMoryKRtt9fjuKfJUkGtRUsYvgAnngTrhjrSgaeEx4nYelynnVqWC9bakS7-XiZ_Mm9ghsN3h7RCoCtJmCklVQRZGJ5gPlFv8/s1600/s10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5MuofA8ZPFtKvnOABUc2PilRZu6c3cY7BCLLZy9YpPuJMoryKRtt9fjuKfJUkGtRUsYvgAnngTrhjrSgaeEx4nYelynnVqWC9bakS7-XiZ_Mm9ghsN3h7RCoCtJmCklVQRZGJ5gPlFv8/s640/s10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
10&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;As, we have entered 4
instructions (2 load, 1 add and 1 store). The above screen will be displayed
asking the user to press any key to continue if he/she have viewed the
instructions. After we hit enter the following screen will be displayed.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_17&quot; o:spid=&quot;_x0000_i1028&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:387.75pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image020.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&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/AVvXsEhxuVgaPnJd-13QApzbS9unGNFoTVwd5IxMXhqSNR5uQB7Ws8Uq2KRe6YmnSnixHRqzZmCqXecMWztPNIw4w8JLJAy-tXVhQNQHyNwaq9jADnTdDWP1UlaGhECWDGpol3R0g2tRovGrZFg/s1600/s11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxuVgaPnJd-13QApzbS9unGNFoTVwd5IxMXhqSNR5uQB7Ws8Uq2KRe6YmnSnixHRqzZmCqXecMWztPNIw4w8JLJAy-tXVhQNQHyNwaq9jADnTdDWP1UlaGhECWDGpol3R0g2tRovGrZFg/s640/s11.png&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;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;, serif;&quot;&gt;Screen
11&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The
program will show the user ISA simulator with the 1&lt;sup&gt;st&lt;/sup&gt; instruction.
As, the 1&lt;sup&gt;st&lt;/sup&gt; instruction was to load the register from the memory
i.e. 1 2 7. After the execution the register’s value will be updated and as we
can see in our example it has updated the 2&lt;sup&gt;nd&lt;/sup&gt; register with the
value 70 taken from the memory’s 7&lt;sup&gt;th&lt;/sup&gt; location.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;Let’s
have a closer look at the above screen 11, we can see there are three steps
involved are involved for each cycle (instruction).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
1&lt;sup&gt;st&lt;/sup&gt; step - the fetch instruction&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;It
fetches the instruction from the memory and loads it into the processor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
2&lt;sup&gt;nd&lt;/sup&gt; step - the decode instruction&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;After
the 1&lt;sup&gt;st&lt;/sup&gt; step the 2&lt;sup&gt;nd&lt;/sup&gt; step takes place: It decodes the
instruction after it has been fetched, so that the computer can perform its
specific operation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
3&lt;sup&gt;rd&lt;/sup&gt; step - execute instruction&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;It
executes the instruction and updates the values according to the instruction,
for instance in this instruction it will update the value of the 2&lt;sup&gt;nd&lt;/sup&gt;
register.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_18&quot; o:spid=&quot;_x0000_i1027&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:387.75pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image022.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&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/AVvXsEj6w82Eg4QqDuVFf4g6xJEs19ZoNoLKmVa_WhHuAI9WlKNbC-GQmXLm3p5wKOsuqnQUbnUhpt0Vl_RhF9frlpbJMMmP-9Hu0b8eQvOF_sPDcZzpFJen_3b6iWZjrArZpkc9cB-xbmUBB6A/s1600/s12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6w82Eg4QqDuVFf4g6xJEs19ZoNoLKmVa_WhHuAI9WlKNbC-GQmXLm3p5wKOsuqnQUbnUhpt0Vl_RhF9frlpbJMMmP-9Hu0b8eQvOF_sPDcZzpFJen_3b6iWZjrArZpkc9cB-xbmUBB6A/s640/s12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
12&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;Similarly
2&lt;sup&gt;nd&lt;/sup&gt; instruction will be displayed. It will update the 3&lt;sup&gt;rd&lt;/sup&gt;
register with the value 60.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_19&quot; o:spid=&quot;_x0000_i1026&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:387.75pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image024.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&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/AVvXsEhEPimRxpgH1JWrysz70QAUeoNEIzBPbNDWJhH-qjoYTvgTdib27YZpCUMgGcGJ7xDbeyuC0w_Q5sQjCv2oZNoYO2Kzf0Btd648du2VC_T9CvqWom-ZGr1m4yFEBA0i2E_O9bGKLccex88/s1600/s13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEPimRxpgH1JWrysz70QAUeoNEIzBPbNDWJhH-qjoYTvgTdib27YZpCUMgGcGJ7xDbeyuC0w_Q5sQjCv2oZNoYO2Kzf0Btd648du2VC_T9CvqWom-ZGr1m4yFEBA0i2E_O9bGKLccex88/s640/s13.png&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;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
13&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The
third instruction was to add the 2&lt;sup&gt;nd&lt;/sup&gt; and 3&lt;sup&gt;rd&lt;/sup&gt; register and
answer have to be stored in the 2&lt;sup&gt;nd&lt;/sup&gt; register as it was the
destination register. Hence, we can see the value of the 2&lt;sup&gt;nd&lt;/sup&gt;
register have been updated to 130 from 70.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_21&quot; o:spid=&quot;_x0000_i1025&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:387.75pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image026.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&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/AVvXsEghdkcR4EyuPeRuTYf-TYjqBpcHl5YDAV76GnAY-qGptIhuQcM7wHFTpERdVC3gXlWE4LcYwMYXKnh575QQuquLpQS1EYtXMQ9VreLpovGpuKHCSXEiiAkiQrMGuiQbTcKq3X2oAGhR__k/s1600/s14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghdkcR4EyuPeRuTYf-TYjqBpcHl5YDAV76GnAY-qGptIhuQcM7wHFTpERdVC3gXlWE4LcYwMYXKnh575QQuquLpQS1EYtXMQ9VreLpovGpuKHCSXEiiAkiQrMGuiQbTcKq3X2oAGhR__k/s640/s14.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;, serif;&quot;&gt;Screen
14&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The
last and 4&lt;sup&gt;th&lt;/sup&gt; instruction that we entered was to store the result of add
instruction from the 3&lt;sup&gt;rd&lt;/sup&gt; instruction to the memory. In the above
example we have stored the value of the 2&lt;sup&gt;nd&lt;/sup&gt; register in the 6&lt;sup&gt;th&lt;/sup&gt;
memory location.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The
user will be asked to press any key to continue and the program will be
terminated as there were no more instructions to show.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/write-simulator-for-assembly-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq49UE1i4_D7BvbR3CEhkrwYV3ZpdeY_JS0epFzZqZbGR1qP7hn7__xxLE67UYTY357O5iXGJnBSNyHz5yIjyguC9IcGxNtx2y8DbqN75Hz5DINmTtRTiQPigZsDEnsgFl9AyaDa6FHmM/s72-c/s1.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-1819816094525182732</guid><pubDate>Fri, 30 Sep 2016 07:42:00 +0000</pubDate><atom:updated>2018-03-14T01:14:57.809-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">lecture 08</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><title>Load Add and Store Instructions in Assembly Language | Instruction set Architecture</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
We already  know (from the previous lectures) &lt;a href=&quot;http://islandprogrammers.blogspot.com/2016/09/assembly-language-instructions-with.html&quot;&gt;how  an instruction is formed&lt;/a&gt; and &lt;a href=&quot;http://islandprogrammers.blogspot.com/2016/09/assembly-language-instructions-with.html&quot;&gt;what  the basic structure of an instruction is&lt;/a&gt;. Let’s go through few examples of  it.&lt;br /&gt;
&lt;h2&gt;
Instruction Set&lt;/h2&gt;
An instruction set is composed of two parts:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Opcode&lt;/li&gt;
&lt;li&gt;Operand (s)&lt;/li&gt;
&lt;/ol&gt;
  

 

&lt;h3&gt;
Opcode&lt;/h3&gt;
Opcode defines the number of operation supported by this  instruction format and used for indexing that operation. For example: 0000 is  the opcode for LOADI operation.&lt;br /&gt;
&lt;h3&gt;
Operand (s)&lt;/h3&gt;
Operands can be a register address, memory address, and immediate  value.&lt;br /&gt;
  In our ISA design, the length of instruction is 16 bits.  Such that: 4 bits for opcode, and 12 bits for operand(s).&lt;br /&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;162&quot;&gt;Opcode (4-bits) &lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;450&quot;&gt;Operands (12-bits)&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
     &lt;td width=&quot;162&quot;&gt;0&lt;/td&gt;
  &lt;td width=&quot;450&quot;&gt;3&lt;/td&gt;
        &lt;td&gt;15&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;
Operations&lt;/h2&gt;
For this tutorial we will be focusing on the three basic  operations, i.e. how to load, add, and store data in assembly language.  Following are the few operations along with their opcodes:&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 424px;&quot;&gt;
    &lt;tbody&gt;
&lt;tr&gt;
      &lt;th width=&quot;212&quot;&gt;OPCODE&lt;/th&gt;
      &lt;th width=&quot;212&quot;&gt;Operation&lt;/th&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0000 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;LOADI &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0001 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;&lt;strong&gt;LOADM&lt;/strong&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0010 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;STOREI &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0011 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;&lt;strong&gt;STORER&lt;/strong&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0100 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;ADDI &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0101 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;&lt;strong&gt;ADDR&lt;/strong&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0110 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;SUBI &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;1111 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
In above operations &lt;strong&gt;I&lt;/strong&gt; is for immediate, &lt;strong&gt;M&lt;/strong&gt; is for memory,  and &lt;strong&gt;R&lt;/strong&gt; is for register. Let’s look at  the registers and memory first before proceeding to the operations.&lt;br /&gt;
&lt;h3&gt;
Registers&lt;/h3&gt;
There are 16 registers hence 4 bits are required to address  them. Registers are named as R0 to R15.&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 424px;&quot;&gt;
    &lt;tbody&gt;
&lt;tr&gt;
      &lt;th valign=&quot;middle&quot; width=&quot;212&quot;&gt;Register Address&lt;/th&gt;
      &lt;th valign=&quot;middle&quot; width=&quot;212&quot;&gt;Register&lt;/th&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0000 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R0 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0001 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R1 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0010 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R2 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0011 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R3 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0100 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R4 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0101 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R5 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0110 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R6 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;1111 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R15 &lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;h3&gt;
Memory&lt;/h3&gt;
There are 28 memory locations where data may  reside. Hence 8 bits are required to address them. Memory locations are named  as M0 to M255.&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 448px;&quot;&gt;
    &lt;tbody&gt;
&lt;tr&gt;
      &lt;th valign=&quot;middle&quot; width=&quot;224&quot;&gt;Memory Address&lt;/th&gt;
      &lt;th valign=&quot;middle&quot; width=&quot;224&quot;&gt;Memory&lt;/th&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;224&quot;&gt;00000000&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M0&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000001&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M1&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000010&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M2&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000011&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M3&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000100&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M4&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000101&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M5&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000110&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M6&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;…&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;…&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;…&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;…&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;11111111&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M255&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;h2&gt;
LOADM Instruction&lt;/h2&gt;
&lt;h3&gt;
Definition&lt;/h3&gt;
It loads an operand value from a memory location to a  register.&lt;br /&gt;
&lt;h3&gt;
Bit allocation&lt;/h3&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 581px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;131&quot;&gt;&lt;div align=&quot;center&quot;&gt;
LOADM &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;174&quot;&gt;&lt;div align=&quot;center&quot;&gt;
REGISTER ADDRESS &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;276&quot;&gt;&lt;div align=&quot;center&quot;&gt;
MEMORY ADDRESS &lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 581px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;131&quot;&gt;0&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;174&quot;&gt;3&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;276&quot;&gt;7&lt;/td&gt;
    &lt;td&gt;15&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;4  bits for Opcode&lt;/li&gt;
&lt;li&gt;4  bits for Register address&lt;/li&gt;
&lt;li&gt;8  bits for Memory address&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Working&lt;/h3&gt;
Consider an example: &lt;br /&gt;
  Assembly Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOADM&amp;nbsp;&amp;nbsp; R4&amp;nbsp;&amp;nbsp;&amp;nbsp;  M6&lt;br /&gt;
  Machine Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0001010000000110&lt;br /&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 581px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;131&quot;&gt;&lt;div align=&quot;center&quot;&gt;
LOADM&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;174&quot;&gt;&lt;div align=&quot;center&quot;&gt;
R4 &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;276&quot;&gt;&lt;div align=&quot;center&quot;&gt;
M6 &lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&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/AVvXsEgDpCIwK6ft1EbP7g2-KsELcfxNyn4pYo74vKsfcMnyDH8xxDSIgrqsNcsRL6fige4ObZzBeYmmsciJPVfx2CWRwbFbPaJfEG4ahUyUJu4kJTnF7dxqSghHBLGhmSdKos06krS8NlfjO7c/s1600/clip_image002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;142&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDpCIwK6ft1EbP7g2-KsELcfxNyn4pYo74vKsfcMnyDH8xxDSIgrqsNcsRL6fige4ObZzBeYmmsciJPVfx2CWRwbFbPaJfEG4ahUyUJu4kJTnF7dxqSghHBLGhmSdKos06krS8NlfjO7c/s640/clip_image002.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In the above instruction operand value i.e. 87 from a memory  (M6) copied to a register (R4).&lt;br /&gt;
&lt;h2&gt;
STORER Instruction&lt;/h2&gt;
&lt;h3&gt;
Define:&lt;/h3&gt;
It stores an operand value from a register to a Memory  location.&lt;br /&gt;
&lt;h3&gt;
Bit allocation:&lt;/h3&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 581px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&lt;div align=&quot;center&quot;&gt;
STORER&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;top&quot; width=&quot;222&quot;&gt;&lt;div align=&quot;center&quot;&gt;
REGISTER ADDRESS&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;top&quot; width=&quot;210&quot;&gt;&lt;div align=&quot;center&quot;&gt;
MEMORY ADDRESS&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 581px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;0&lt;/td&gt;
    &lt;td valign=&quot;top&quot; width=&quot;222&quot;&gt;3&lt;/td&gt;
    &lt;td valign=&quot;top&quot; width=&quot;210&quot;&gt;7&lt;/td&gt;
    &lt;td&gt;15&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;4 bits for Opcode&lt;/li&gt;
&lt;li&gt;4 bits for Register address&lt;/li&gt;
&lt;li&gt;8 bits for Memory address&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Working&lt;/h3&gt;
Consider an example: &lt;br /&gt;
  Assembly Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORER&amp;nbsp;&amp;nbsp; R4&amp;nbsp;&amp;nbsp;&amp;nbsp;  M6&lt;br /&gt;
  Machine Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;0011010000000110&lt;br /&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 587px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;149&quot;&gt;&lt;div align=&quot;center&quot;&gt;
STORER&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;156&quot;&gt;&lt;div align=&quot;center&quot;&gt;
R4&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;282&quot;&gt;&lt;div align=&quot;center&quot;&gt;
M6&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 587px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;149&quot;&gt;0&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;156&quot;&gt;3&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;282&quot;&gt;7&lt;/td&gt;
    &lt;td&gt;15&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&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/AVvXsEi55YfMrAXciTV-vOD7qi74ACK4xRKgEaBq-1chwDx-yEtZ8xP7CMZ0hIJFIozXaevb7jSYb4jHCdSsoqojr-Q8iavism8McxTamQtOgnOCrAfQiy5b-BFK9ugrd8gZgpXxReZ1dhdk6do/s1600/clip_image004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;142&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi55YfMrAXciTV-vOD7qi74ACK4xRKgEaBq-1chwDx-yEtZ8xP7CMZ0hIJFIozXaevb7jSYb4jHCdSsoqojr-Q8iavism8McxTamQtOgnOCrAfQiy5b-BFK9ugrd8gZgpXxReZ1dhdk6do/s640/clip_image004.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In the above instruction operand value (67) is stored from a  register (R4) to a Memory (M6) location.&lt;br /&gt;
&lt;h2&gt;
ADDR Instruction&lt;/h2&gt;
&lt;h3&gt;
Define:&lt;/h3&gt;
It adds register values and keeps the result in the  destination register. &lt;br /&gt;
&lt;h3&gt;
Bit allocation:&lt;/h3&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 593px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;125&quot;&gt;&lt;div align=&quot;center&quot;&gt;
ADDR &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;150&quot;&gt;&lt;div align=&quot;center&quot;&gt;
Reg. Address &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;180&quot;&gt;&lt;div align=&quot;center&quot;&gt;
Reg. Address &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;138&quot;&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 593px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;125&quot;&gt;0&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;150&quot;&gt;3&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;180&quot;&gt;7&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;138&quot;&gt;11&lt;/td&gt;
    &lt;td&gt;15&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;4 bits for Opcode&lt;/li&gt;
&lt;li&gt;4 bits for each Register address&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;4 bits for Source&lt;/li&gt;
&lt;li&gt;4 bits for Destination&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;h3&gt;
Working&lt;/h3&gt;
Consider an example: &lt;br /&gt;
  Assembly Code:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ADDR&amp;nbsp;&amp;nbsp; R2 R1&lt;br /&gt;
  Machine Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0101 0010 0001 0000&lt;br /&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 599px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;160&quot;&gt;&lt;div align=&quot;center&quot;&gt;
ADDR&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;97&quot;&gt;&lt;div align=&quot;center&quot;&gt;
R2&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;287&quot;&gt;&lt;div align=&quot;center&quot;&gt;
R1&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;55&quot;&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 599px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;160&quot;&gt;0&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;97&quot;&gt;3&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;287&quot;&gt;7&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;55&quot;&gt;11&lt;/td&gt;
    &lt;td&gt;15&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&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/AVvXsEh9S8fTZ6Tp0de8GSQVzHwVjGpiI8SvIz1hPnmf6qm5OQzGvwCQMN09u1EwbSrDq3EHBvnMkI1htUNN3PUDhyj8qGgVL7rIe54hEIweYnj-Tvm50shD6s7yCEheKpFKm3qIOL4L1c2vHnc/s1600/clip_image006.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9S8fTZ6Tp0de8GSQVzHwVjGpiI8SvIz1hPnmf6qm5OQzGvwCQMN09u1EwbSrDq3EHBvnMkI1htUNN3PUDhyj8qGgVL7rIe54hEIweYnj-Tvm50shD6s7yCEheKpFKm3qIOL4L1c2vHnc/s640/clip_image006.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Register R1 and R2 are added i.e. 23 and 79 and there result  is then stored into R2 register.&lt;br /&gt;
&lt;h2&gt;
Sample Example&lt;/h2&gt;
LOADM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;  load from memory M25 and store the value in register R1&lt;br /&gt;
  LOADM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M69&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;  load from memory M69 and store the value in register R2&lt;br /&gt;
  ADDR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;  add values of register R1 and R2&lt;br /&gt;
  STORER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;  store the value of register R2 to memory M2&lt;br /&gt;

&lt;h2&gt;Execution of a Assembly Language Instruction&lt;/h2&gt;
&lt;p&gt;Our CPU will use three stages for executing a single assembly language instruction. These are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;h3&gt;Fetch:&lt;/h3&gt; &lt;p&gt;CPU fetches the instruction from Instruction memory (Maintained in a 2D Array).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Decode:&lt;/h3&gt; &lt;p&gt;Operation and operands are determined.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Execute:&lt;/h3&gt; &lt;p&gt;Operation is performed on the operands.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To see these steps in practical follow the below &lt;a href=&quot;http://islandprogrammers.blogspot.com/2016/10/write-simulator-for-assembly-language.html&quot;&gt;program written in c language&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Program&lt;/h2&gt;
&lt;p&gt;A simulator for the discussed ISA design is written in C language. Click on the below link:&lt;/p&gt;
&lt;a href=&quot;http://islandprogrammers.blogspot.com/2016/10/write-simulator-for-assembly-language.html&quot;&gt;Write A Simulator For The Assembly Language ISA Design In C Language.&lt;/a&gt;

&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/09/load-add-and-store-instructions-in.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDpCIwK6ft1EbP7g2-KsELcfxNyn4pYo74vKsfcMnyDH8xxDSIgrqsNcsRL6fige4ObZzBeYmmsciJPVfx2CWRwbFbPaJfEG4ahUyUJu4kJTnF7dxqSghHBLGhmSdKos06krS8NlfjO7c/s72-c/clip_image002.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-1224681762014328625</guid><pubDate>Tue, 27 Sep 2016 07:12:00 +0000</pubDate><atom:updated>2016-09-27T00:12:00.003-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">lecture 07</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><title>Debugging Assembly Language | Introduction to</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

&lt;p&gt;If you are interested in writing code on command prompt and  like writing code in command prompt than this tutorial is for you. Debugging  assembly language is easy. Following picture shows an example of it:&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;
 &lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://www.youtube.com/embed/JmAp4KuewN4&quot; style=&quot;width: 100%; height: 350px;&quot;&gt;&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;What is Debugging?&lt;/h2&gt;
&lt;p&gt;Debug is a dos program which allows programmers to see  execution of the program closely in depth. It is used to:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Change and see memory contents&lt;/li&gt;
  &lt;li&gt;Enter and execute programs&lt;/li&gt;
  &lt;li&gt;Hold the program at a specific instruction to  check the data values or change them.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Debugging commands Assembly language&lt;/h2&gt;
&lt;p&gt;Below are the command examples of debugging an assembly  language code:&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;Debug:&lt;/strong&gt;  Enter a program&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;Q:&lt;/strong&gt; Quit the program.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;R:&lt;/strong&gt; See register contents/values.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;R&amp;lt;register&amp;gt;:&lt;/strong&gt; see particular register content/value  also change it.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;Practice Program:&lt;/strong&gt; See AX register contents and change the  value to 2, 34, 543, and GE.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; this command assembles the program. You can enter  assembly instructions into the memory.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;A &amp;lt;starting address&amp;gt;:&lt;/strong&gt; starting address can be an  offset of code segment or you can also specify segment register.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;Example – your turn:&lt;/strong&gt; a 100 or a cs: 100 are the same, type a  100 and debug it.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;U:&lt;/strong&gt; a command that un-assembles the program. You can see  machine code of your program by using this command. You can also specify the  starting and ending addresses of memory section you want to see the code of,  U&amp;lt;starting address&amp;gt; (space) &amp;lt;ending address&amp;gt;.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;G:&lt;/strong&gt; G is a go command that allows the program to run until it  reaches the breakpoint. At the end register contents are displayed to the  programmer.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;F:&lt;/strong&gt; F command is used to fill into the memory. Format of this  command is: F&amp;lt;starting address&amp;gt; &amp;lt;ending address&amp;gt; &amp;lt;data&amp;gt;.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;E:&lt;/strong&gt; E command is used to enter any data or change into the  memory. For example: E 200 &amp;lsquo;HELLO WORLD&amp;rsquo;.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;D:&lt;/strong&gt; D command is used to see the register contents. You can  also use this command to fill segment providing offset. For example: F 10 10F  FF, fills 16bytes with FF.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1sIi4Bu1wjIZ80rcgOgWaPuS0blwJG3NLKX_xpfpge2b7WNjeu_KqQ5kyWvLU_BFBINqMYEQxyfUAQz7UiikAvIEmN2xABebAHij8wO70Ho3jnsu64DwbGFd1hgkzIjOVERS0IOztkRY/s1600/debug_3.jpg&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1sIi4Bu1wjIZ80rcgOgWaPuS0blwJG3NLKX_xpfpge2b7WNjeu_KqQ5kyWvLU_BFBINqMYEQxyfUAQz7UiikAvIEmN2xABebAHij8wO70Ho3jnsu64DwbGFd1hgkzIjOVERS0IOztkRY/s640/debug_3.jpg&quot; width=&quot;640&quot; height=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/09/debugging-assembly-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/JmAp4KuewN4/default.jpg" height="72" width="72"/><thr:total>9</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-4243206852859670453</guid><pubDate>Tue, 20 Sep 2016 07:58:00 +0000</pubDate><atom:updated>2016-09-20T00:58:02.814-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">lecture 06</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><title>Assembly Language Instructions With Examples | Introduction</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Instructions are statements that execute when we assemble  the program. The instructions (written in assembly language) are translated  into machine language bytes, as we have already discussed in the &lt;a href=&quot;https://islandprogrammers.blogspot.com/2016/09/comparison-of-high-level-language.html&quot;&gt;lecture 02&lt;/a&gt;.  These machine language instructions/bytes are then executed by the CPU.&lt;/p&gt;
  &lt;p&gt;Example instruction:       &lt;strong&gt;mov       ax,  bx&lt;/strong&gt;&lt;/p&gt;
  &lt;p&gt;An assembly instruction has 4 basic parts:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Label                     (optional)&lt;/li&gt;
  &lt;li&gt;Mnemonic          (required)&lt;/li&gt;
  &lt;li&gt;Operand              (depends  on the instruction)&lt;/li&gt;
  &lt;li&gt;Comment            (optional)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Syntax of assembly language instruction is as follows:&lt;/p&gt;
  &lt;p style=&quot;text-align:center;&quot;&gt;&lt;em&gt;[label:] mnemonic [operands] [;comment]&lt;/em&gt;&lt;/p&gt;
  &lt;p&gt;Note: We will be using Intel IA-32 for this tutorial and  onwards.&lt;/p&gt;

&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;344&quot; src=&quot;https://www.youtube.com/embed/y83SN0UKqJQ&quot; style=&quot;width:100%;&quot;&gt;&lt;/iframe&gt;


&lt;h2&gt;Labels&lt;/h2&gt;
&lt;p&gt;There are two types of labels:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Data Labels&lt;/li&gt;
  &lt;li&gt;Code Labels&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Data Label&lt;/h3&gt;
&lt;p&gt;Data labels are just like variables in any other language. For  example, C language instruction: &lt;em&gt;int  myVar 10; &lt;/em&gt;we know that myVar is a variable name i.e. data label of int type  containing value 10. Similarly, in assembly language we use data labels as  variables which hold value (s) for us. For example, count is a variable in the  following instruction:&lt;/p&gt;
  &lt;p style=&quot;text-align:center;&quot;&gt;&lt;strong&gt;&lt;em&gt;count&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; DWORD 100&lt;/em&gt;&lt;/p&gt;
  &lt;p&gt;Data labels are  declared in data segment of the code.&lt;/p&gt;
&lt;h3&gt;Code Label&lt;/h3&gt;
&lt;p&gt;Code labels are just the names which are used by other  instructions to jump from particular position to that position where data label  is located. It must end with a semicolon ( : ). Code labels are declared in  code segment. For example:&lt;/p&gt;
  &lt;p style=&quot;padding-left:35px;&quot;&gt;&lt;code&gt;&lt;strong&gt;&lt;em&gt;target:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
  &lt;em&gt;mov       ax, bx&lt;/em&gt;&lt;br&gt;
  &lt;em&gt;...&lt;/em&gt;&lt;br&gt;
  &lt;em&gt;jmp target&lt;/em&gt;&lt;br&gt;&lt;/code&gt;&lt;/p&gt;
  &lt;p&gt;target is the data label, which is called by the jmp  instruction.&lt;/p&gt;
  &lt;p&gt;Use: code labels are used as targets for jumping while using  loops.&lt;/p&gt;
&lt;h2&gt;Mnemonics&lt;/h2&gt;
&lt;p&gt;A small word that acts as an identifier for the instruction.  The mnemonics are written in code segment. In following examples mov, sub, add,  jmp, call, and mul are the mnemonics:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;mov       Move/assign  one value to another (label)&lt;/li&gt;
  &lt;li&gt;sub         Subtract  one value from another&lt;/li&gt;
  &lt;li&gt;add        Adds  two values&lt;/li&gt;
  &lt;li&gt;jmp        Jump  to a specific location&lt;/li&gt;
  &lt;li&gt;call          Call  a procedure/module&lt;/li&gt;
  &lt;li&gt;mul        Multiply  two values&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Operands&lt;/h2&gt;
&lt;p&gt;Operand is the remaining part of the instruction. There can  be 0 to 3 operands. Where each operand is either a memory operand, a register,  an input/output port, or a constant expression.&lt;/p&gt;
  &lt;p&gt;Following are the operand types:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;constant expression&lt;/li&gt;
  &lt;li&gt;constant&lt;/li&gt;
  &lt;li&gt;memory (data label)&lt;/li&gt;
  &lt;li&gt;register&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Examples&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;0 operands&lt;/li&gt;

&lt;li style=&quot;background: none;&quot;&gt;stc                                          ;  set Carry flag&lt;/li&gt;

  &lt;li&gt;1 operand&lt;/li&gt;

&lt;li style=&quot;background: none;&quot;&gt;inc myByte                          ; memory&lt;/li&gt;
  &lt;li style=&quot;background: none;&quot;&gt;inc eax                                  ; register&lt;/li&gt;

  &lt;li&gt;2 operands&lt;/li&gt;

&lt;li style=&quot;background: none;&quot;&gt;sub myByte,25                  ; memory, constant&lt;/li&gt;
  &lt;li style=&quot;background: none;&quot;&gt;add ebx,ecx                       ; register, register&lt;/li&gt;
  &lt;li style=&quot;background: none;&quot;&gt;add eax,36 * 25                 ; register, constant-expression&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Comments&lt;/h2&gt;
&lt;p&gt;You should have used comments in your programs before. As you  know there are two types of comments: 1. Single-line and 2. Multi-line comments.  In assembly single-line comments begin with ; (semicolon) whereas, multi-line  comments begin with a comment directive and symbol/character selected by the  programmer itself and also end with the same symbol/character.&lt;/p&gt;
&lt;h3&gt;Why you should use comments in your programs?&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;explains the program&#39;s purpose &lt;/li&gt;
  &lt;li&gt;tricky coding techniques&lt;/li&gt;
  &lt;li&gt;revision information&lt;/li&gt;
  &lt;li&gt;by whom and when it was written &lt;/li&gt;
  &lt;li&gt;application-specific explanations&lt;/li&gt;
&lt;/ol&gt;


&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGYtcmf7039yzhpnf-VmZYHrQCeq3-BZ0AJRSXOM_uuR6GFJtRhbLqrsRFpuc3uqMcGuqt09BRuGDduaydoInLkz095OhO0JjY3QFCjRvFiO81rlKTblu22IDkcSDHGdEGv9_qZbQthOE/s1600/evolution-ruby-java-3334725-o.jpg&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGYtcmf7039yzhpnf-VmZYHrQCeq3-BZ0AJRSXOM_uuR6GFJtRhbLqrsRFpuc3uqMcGuqt09BRuGDduaydoInLkz095OhO0JjY3QFCjRvFiO81rlKTblu22IDkcSDHGdEGv9_qZbQthOE/s640/evolution-ruby-java-3334725-o.jpg&quot; width=&quot;640&quot; height=&quot;400&quot; alt=&quot;assembly language instructions&quot; /&gt;&lt;/a&gt;

&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/09/assembly-language-instructions-with.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/y83SN0UKqJQ/default.jpg" height="72" width="72"/><thr:total>1</thr:total></item></channel></rss>