<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-201901024372824034</id><updated>2025-06-17T06:31:15.408-07:00</updated><category term="c programing"/><category term="java programing"/><category term="c++ programing"/><category term="data structure"/><category term="unix operating system"/><title type='text'>programing</title><subtitle type='html'>this blog is for the new programmer in programing field...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>56</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-6413193347154869918</id><published>2010-12-16T09:12:00.001-08:00</published><updated>2010-12-16T09:15:20.842-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java programing"/><title type='text'>java program to validate email address</title><content type='html'>&lt;span style=&quot;font-size:180%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;java program to validate email address&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;import java.util.regex.*;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;class test&lt;br /&gt;{&lt;br /&gt;public static void main(String args[])&lt;br /&gt; {&lt;br /&gt; System.out.println(&quot;enter email address to check valid or not :-)\n&quot;);&lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt; DataInputStream ds=new DataInputStream(System.in);&lt;br /&gt; Pattern p = Pattern.compile(&quot;[a-z]+.*[a-z]*@[a-z]*.[[com][co.in]]+&quot;);&lt;br /&gt; Matcher m =p.matcher(ds.readLine());&lt;br /&gt; &lt;br /&gt; if(m.matches())&lt;br /&gt; {&lt;br /&gt; System.out.println(&quot;\nTHIS E-MAIL ADDRESS IS VALID&quot;);&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt; System.out.println(&quot;\nTHIS E-MAIL ADDRESS IS INVALID&quot;);&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; catch(Exception e){}&lt;br /&gt; }&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/6413193347154869918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/java-program-to-validate-email-address.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/6413193347154869918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/6413193347154869918'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/java-program-to-validate-email-address.html' title='java program to validate email address'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-5161563700816939077</id><published>2010-12-16T03:38:00.000-08:00</published><updated>2010-12-16T03:41:33.162-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="unix operating system"/><title type='text'>gtu operating system practicle</title><content type='html'>&lt;span style=&quot;font-size:180%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;gtu operating system practical&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;meta equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;meta name=&quot;ProgId&quot; content=&quot;Word.Document&quot;&gt;&lt;meta name=&quot;Generator&quot; content=&quot;Microsoft Word 10&quot;&gt;&lt;meta name=&quot;Originator&quot; content=&quot;Microsoft Word 10&quot;&gt;&lt;link rel=&quot;File-List&quot; href=&quot;file:///C:%5CDOCUME%7E1%5Cadmin%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C02%5Cclip_filelist.xml&quot;&gt;&lt;o:smarttagtype namespaceuri=&quot;urn:schemas-microsoft-com:office:smarttags&quot; name=&quot;time&quot;&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri=&quot;urn:schemas-microsoft-com:office:smarttags&quot; name=&quot;date&quot;&gt;&lt;/o:smarttagtype&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if !mso]&gt;&lt;object classid=&quot;clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D&quot; id=&quot;ieooui&quot;&gt;&lt;/object&gt; &lt;style&gt; st1\:*{behavior:url(#ieooui) } &lt;/style&gt; &lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Times-Roman; 	panose-1:0 0 0 0 0 0 0 0 0 0; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-format:other; 	mso-font-pitch:auto; 	mso-font-signature:3 0 0 0 1 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:&quot;&quot;; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-fareast-font-family:&quot;Times New Roman&quot;;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:&quot;Times New Roman&quot;;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;A ) Accept numbers and perform addition, subtraction, division and multiplication.&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat f5.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;a=10&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter The Value of A: &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read a&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;b=10&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter The Value of B: &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read b&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;c=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;c=`expr $a + $b`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Addition &quot; $c&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;c=`expr $a - $b`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Subtraction &quot; $c&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;c=`expr $a / $b`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Division &quot; $c&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;c=`expr $a \* $b`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Multiplication &quot; $c&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh f5.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter The Value of A:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;20&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter The Value of B:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;10&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Addition&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;30&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Subtraction&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;10&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Division&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;2&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Multiplication&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;200&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;B ) Accept the string and checks whether the string is palindrome or not.&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;[mca09113@ALS ~]$ cat f6.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;l=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;cnt=1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;tag=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter a String?&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read str&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;l=`echo $str |wc -c`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;l=`expr $l - 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;lh=`expr $l / 2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;while [ $cnt -le $lh ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;c1=`echo $str|cut -c$cnt`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;c2=`echo $str|cut -c$l`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if [ $c1 != $c2 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;tag=1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;cnt=`expr $cnt + 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;l=`expr $l - 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if [ $tag -eq 0 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;String is Palindrome&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;String is not Palindrome&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh f6.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter a String?&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hemant&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;String is not Palindrome&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh f6.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter a String?&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;ava&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;String is Palindrome&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;span style=&quot;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;span style=&quot;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;C&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;) .Accept number and check the number is even or odd, finds the length of the number, sum of the&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;digit in the number.&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS: &lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat f7.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter number:&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read no&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;c=`expr $no % 2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if [ $c -eq 0 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;No is even &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;No is odd&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;cnt=`echo $no | wc -c`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;cnt=`expr $cnt - 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;word count =&quot; $cnt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;i=1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;while [ $i -le $cnt ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;j=`echo $no | cut -c $i`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;k=`expr $k + $j`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;i=`expr $i + 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;total =&quot; $k&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh f7.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter number:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;123&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;No is odd&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;word count = 3&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;total = 6&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;d ). Accept strings and replace a string by another string.&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter any string:&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read str&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Your string is :&quot; $str&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter word that your what replace with other word&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read oldstr&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter new string&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read newstr&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;str1=`echo $str | sed s/$oldstr/$newstr/g`&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;str2=`echo $str | replace $oldstr $newstr`&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;after replacing &quot; $str1&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;after replacing &quot; $str2&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh f8.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter any string:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hemant&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Your string is : hemant&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter word that your what replace with other word&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;t&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter new string&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;tfofandi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;after replacing&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;hemantfofandi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;e). Accept filename and displays last modification time if file exists, otherwise display appropriate message.&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat f9.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter file name&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read fnm&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if [ ! -f $fnm ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;then&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;File&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;Not Found&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;exit 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;dt=`date -r $fnm`&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;modification date is:&quot; $dt&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh f9.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter file name&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;f6.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;modification date is: Tue Dec 7 &lt;st1:time minute=&quot;24&quot; hour=&quot;15&quot;&gt;15:24:23&lt;/st1:time&gt; IST 2010&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;F ). Fetch the data from a file and display data into another file in reverse order.&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;echo &quot;enter file name for fatching data and store in other file&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat f10.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;enter a file name to do operation &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read fnm&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if [ ! -f $fnm ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;File not found&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;exit 1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;enter new file name:&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read newfile&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;while read -n1 char;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;str=$char$str&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;$fnm&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo $str&gt;$newfile&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo $newfile &quot;successfully created on&quot; `pwd` &quot; path&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh f10.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;enter a file name to do operation&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;f6.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;enter new file name:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hello.txt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hello.txt successfully created on /home/PARAM/mca09113&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;path&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;3:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;Write a script to find the global complete path for any file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat gtu3.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo -e &quot;Enter the filename to search in current directory: \c&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read FILE&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;args=`find . -name $FILE | xargs`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;for i in $args&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if [ -f &quot;$i&quot; ]; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;CPATH=`readlink -f &quot;$i&quot;`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo $CPATH&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;noargs=${#args}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if [ &quot;$noargs&quot; -eq &quot;0&quot; ]; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;No such a file exists&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh gtu3.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter the filename to search in current directory: gtu3.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;/home/PARAM/mca09113/gtu3.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh gtu3.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter the filename to search in current directory: f10.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;/home/PARAM/mca09113/f10.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 4:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to broadcast a message to a specified user or a group of users logged on any terminal&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat gtu4.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;who &gt; e.txt&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;For Broadcasting Messages.&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if [ $# = 0 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;then&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;Enter the User Name:\c&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;read nam&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;p=`grep $nam e.txt`&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if [ &quot;$p&quot; != &quot;&quot; ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;then&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;write $nam&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;rm e.txt&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;exit&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;echo &quot;The user is not logged in&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;fi&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;rm e.txt&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;exit&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if [ &quot;$1&quot; = &quot;all&quot; ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;then&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;wall&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;for nam in $*&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;p=`grep $nam e.txt`&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;if [ &quot;$p&quot; != &quot;&quot; ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;then&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;write $nam&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;echo &quot;The User $nam is not logged in&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;fi&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh gtu4.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;For Broadcasting Messages.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter the User Name:\c&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;mca09112&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;The user is not logged in&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh gtu4.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;For Broadcasting Messages.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter the User Name:\c&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;mca09113&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Message from mca09113@ALS on pts/2 at &lt;st1:time minute=&quot;49&quot; hour=&quot;13&quot;&gt;13:49&lt;/st1:time&gt; ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hi&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hi&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hello&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hello&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;GTU 5:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;Write a script to copy the file system from two directories to a new directory in such a way that only the latest file is copied in case there are common files in both the directories.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat gtu5.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;EXIT=n&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;while [ $EXIT != y ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;sleep 1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo -e &quot;\n&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo -e &quot;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;1. Display PWD&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;2. Long Listing&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;3. Change Directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;4. Copy Newest File.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;5. Exit&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;Enter Choice: \c&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;read ch&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;case $ch in&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;1)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;pwd&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;2)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;pwd&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;ls -l&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;3)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo -n &quot;Enter Absolute Path to change directory: &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;read apath&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;cd $apath&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if [ $? -eq 0 ]; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;Working Directory Changed successfully to..&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;sleep 1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;pwd&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;Please check your PATH.&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;4)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;Enter filenames to copy. ( * - for ALL Files, ELSE Separate files by spaces )&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;read allfiles&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if [ -f $allfiles ]; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;Enter Absolute path, where to copy these files: &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read -e cpath&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;if [ -d $cpath ]; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;cp -u &quot;$allfiles&quot; $cpath&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;echo &quot;There is no such a directory!&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;There is/are no such file(s)!&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;5)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo -n &quot;Exiting..&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;sleep 1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo -n &quot;.&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;sleep 1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo -n &quot;.&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;exit&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;*)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;Invalid Choice&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;esac&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;i&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh gtu5.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;1. Display PWD&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;2. Long Listing&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;3. Change Directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;4. Copy Newest File.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;5. Exit&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;Enter Choice:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 6:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;wite a script to compare identically named files in two different directories and if they are same, copy one of them in a third directory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat gtu6.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo Enter the name of 1st directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;read dir1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Enter the name of 2nd directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read dir2&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Enter the name of the directory in which you want to copy the duplicate file&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read dir3&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;cd `find /home/PARAM/mca09113 -type d -name $dir1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;for fl1 in *&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;echo $fl1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cd `find /home/PARAM/mca09113 -type d -name $dir2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for fl2 in *&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;if [ $fl1 == $fl2 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cd ..&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cp ./$dir2/$fl2 ./$dir3&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cd `find /home/PARAM/mca09113 -type d -name $dir2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;rm $fl2&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cd `find /home/PARAM/mca09113 -type d -name $dir1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;rm $fl1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;cd ..&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;mv ./temp1/* ./$dir2/$fl2&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;done&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh gtu6.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter the name of 1st directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;f1.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter the name of 2nd directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;f8.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter the name of the directory in which you want to copy the duplicate file&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;office&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;college&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;cp: cannot stat `./f8.sh/college&#39;: No such file or directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;rm: cannot remove `college&#39;: Is a directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;rm: cannot remove `college&#39;: Is a directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;mv: cannot stat `./temp1/*&#39;: No such file or directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 7&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;Write a script to delete zero sized files from a given directory .&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat gtu7.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;while true; do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;read -e -p &quot;Enter the Absolute Path: &quot; path || exit&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;[[ -d $path ]] &amp;amp;&amp;amp; break&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;Invalid Directory!&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;args=`find &quot;$path&quot; -empty -print0 | xargs -0`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;for i in $args&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if [ -f &quot;$i&quot; ]; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;rm -i &quot;$i&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh gtu7.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter the Absolute Path: /home/param/mca09113&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Invalid Directory!&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 8:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to display the name of those files (in the given directory) which are having multiple links&lt;/span&gt;&lt;u&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat g8.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter Absolute path of directory&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read path&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if test -d $path; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;cd $path&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;for i in *&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;for j in *&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;if test &quot;$i&quot; != &quot;$j&quot;; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;if test &quot;$i&quot; -ef &quot;$j&quot;; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                    &lt;/span&gt;echo &quot;$i&quot; &gt;&gt; $$.temp&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;cat $$.temp | uniq&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;rm $$.temp&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;cd -&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;Check your path.&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;u&gt;[mca09113@ALS ~]$ sh g8.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;u&gt;Enter Absolute path of directory&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;u&gt;/home/param/mca09113&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;u&gt;Check your path.&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 9:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to display the name of all executable files in the given directory.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat g9.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;i=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;ls &gt; test1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;set `wc -l test1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;l=$1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;while [ $l -ne 0 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;line=`head -$l test1 | tail -1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;if [ -x $line ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;i=`expr $i + 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;l=`expr $l - 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;echo -e &quot;\t\t\tTotal no. of executable files : &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;echo $i&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;[mca09113@ALS ~]$ sh g9.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;Total no. of executable files : 4&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 10:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to display the date, time and a welcome message (like Good Morning etc.). The time should be displayed with “a.m.” or “p.m.” and not in 24 hours notation&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat g10.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;time=`date +%H%M%S`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;d1=`date +%d/%m/%y`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;t1=`date +%I:%M:%S`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;date:&quot;$d1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if [ $time -ge 000000 -a $time -lt 120000 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;echo &quot;time:&quot;$t1&quot; a.m&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;echo &quot;time:&quot;$t1&quot; p.m&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if [ $time -lt 120000 -a $time -gt 60000 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;GooD MorninG&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if [ $time -eq 120000 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;GooD NooN&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;if [ $time -gt 120000 -a $time -lt 180000 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;echo &quot;GooD AfterNooN&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;if [ $time -gt 180000 -a $time -lt 210000 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;echo &quot;GooD EveninG&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;echo &quot;GooD NighT&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g10.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;date:&lt;st1:date year=&quot;2010&quot; day=&quot;12&quot; month=&quot;8&quot;&gt;08/12/10&lt;/st1:date&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;time:&lt;st1:time minute=&quot;9&quot; hour=&quot;15&quot;&gt;03:09:03 p.m&lt;/st1:time&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;GooD AfterNooN&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 11:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to display the directory in the descending order of the size of each file.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat g11.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo -n &quot;Enter directory name : &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read dname&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;ls $dname &gt; file&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;No of files in directory : $(grep [^*$] file-c)&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;rm -f file&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;ls | sort -r find . -size +1000c -print&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;or&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo Enter Directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read direc&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;cd $direc&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;ls -Sl&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g11.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter directory name : hm&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;grep: file-c: No such file or directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;No of files in directory :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;sort: invalid option -- e&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Try `sort --help&#39; for more information.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;g11.sh: line 12: or: command not found&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter Directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hm1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;total 20&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;drwxr-xr-x 3 mca09113 Domain Users 4096 Aug 13 &lt;st1:time minute=&quot;37&quot; hour=&quot;19&quot;&gt;07:37&lt;/st1:time&gt; hm&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;drwxr-xr-x 2 mca09113 Domain Users 4096 Aug 13 &lt;st1:time minute=&quot;12&quot; hour=&quot;8&quot;&gt;08:12&lt;/st1:time&gt; myhome&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;-rw-r--r-- 1 mca09113 Domain Users&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;26 Aug&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;9 &lt;st1:time minute=&quot;37&quot; hour=&quot;10&quot;&gt;10:37&lt;/st1:time&gt; homead1.txt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;-rw-r--r-- 1 mca09113 Domain Users&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;26 Aug&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;9 &lt;st1:time minute=&quot;31&quot; hour=&quot;10&quot;&gt;10:31&lt;/st1:time&gt; homeadd1.txt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;-rw-r--r-- 1 mca09113 Domain Users &lt;span style=&quot;&quot;&gt;  &lt;/span&gt;26 Aug&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;9 &lt;st1:time minute=&quot;23&quot; hour=&quot;9&quot;&gt;09:23&lt;/st1:time&gt; homeadd.txt&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 12:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to implement the following commands:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Tree (of DOS)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;which (of UNIX)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat 12g.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter Dir Name for Structure ..&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read dir1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;for i in `find $dir`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;if [ -d $i ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;echo &quot;+&quot; $i ;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;elif [ -f $i ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;echo &quot;-----&quot; $i&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh 12g.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter Dir Name for Structure ..&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;college&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;+ .&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 13:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script for generating a mark sheet after reading data from a file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;File contains student roll no, name , marks of three subjects.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;count=1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;total=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;per=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;rem1=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;wc -l s &gt; temp&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;************************************************************&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&gt;&gt;s.out&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;Students Result Are As Follows.....&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&gt;&gt; s.out&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;************************************************************&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&gt;&gt; s.out&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;Rno NAME&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;SUB1&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;SUB2&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;SUB3 TOTAL PERCENTAGE GRADE&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;RESULT&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&gt;&gt; s.out&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;************************************************************&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&gt;&gt; s.out&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;while [ $count -le `awk &#39;{print $1}&#39; temp` ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;let total=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;head -$count s &gt; temp1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;tail -1 temp1 &gt; temp2&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;rollno=`awk &#39;{print $1}&#39; temp2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;name=`awk &#39;{print $2}&#39; temp2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;sub1=`awk &#39;{print $3}&#39; temp2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;sub2=`awk &#39;{print $4}&#39; temp2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;sub3=`awk &#39;{print $5}&#39; temp2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;let total=$total+`awk &#39;{print $3}&#39; temp2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;let total=$total+`awk &#39;{print $4}&#39; temp2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;let total=$total+`awk &#39;{print $5}&#39; temp2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;echo &quot;STUDENT NAME IS :&quot; `awk &#39;{print $2}&#39; temp2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;echo &quot;TOTAL IS :&quot; $total&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;let per=`expr $total / 3`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;let rem1=`expr $total % 3`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;if test $rem1 -ne 0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                     &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;let per=$per+1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;echo &quot;PERCENTAGE IS :&quot; $per&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;if [&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;$per -ge 70 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                           &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                              &lt;/span&gt;grade=&quot;A+&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;elif test $per -ge 60&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                                  &lt;/span&gt;grade=&quot;A&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;elif test $per -ge 50&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                                  &lt;/span&gt;grade=&quot;B&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                  &lt;/span&gt;elif&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;test $per -ge 45&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                                  &lt;/span&gt;grade=&quot;C&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                    &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                  &lt;/span&gt;echo &quot;GRADE IS :&quot; $grade&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;let count=$count+1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                  &lt;/span&gt;echo $rollno&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;$name &quot;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&quot; $sub1 &quot;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&quot; $sub2 &quot;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&quot; $sub3 &quot;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&quot; $total &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&quot; $per &quot;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&quot; $grade&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&gt;&gt; s.out&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;-----------------------------------------------------&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&gt;&gt; s.out&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;rm temp&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;rm temp1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;rm temp2&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 14:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to make following file and directory management operations menu based:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Display current directory, List directory, Make directory, Change directory, Copy a file , Rename a file , Delete a file , Edit a file&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat g14.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;choice=y&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;while [ &quot;$choice&quot; = &quot;y&quot; ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;MAIN MENU&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;***************************&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;1 - DISPLAY CURRENT DIRECTORY&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;2 - LIST DIRECTORY&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;3 - MAKE DIRECTORY&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;4 - CHANGE DIRECTORY&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;5 - COPY A FILE&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;6 - RENAME A FILE&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;7 - DELETE A FILE&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;8 - EDIT A FILE&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;9 - EXIT&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;ENTER THE CHOICE :- &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read choice&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;case $choice in&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;1) echo &quot;DISPLAYING CURRENT DIRECTORY&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;pwd&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;2) echo &quot;\nLIST THE CURRENT DIRECTORY&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;ls -l&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;read&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;3) echo &quot;\nMAKE A NEW DIRECTORY&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;echo &quot;\nENTER THE DIRECTORY NAME :-\c&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;read dirname&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;mkdir &quot;$dirname&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;read dirname&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;4) echo &quot;\nCHANGE THE CURRENT DIRECTORY&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;echo &quot;\nENTER THE DIRECTORY TO WHICH YOU WANT TO&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;read dirname&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;pwd&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;cd ..&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;5) echo &quot;\nCOPY THE GIVEN FILE TO THE GIVEN DESTINAT&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;echo &quot;\nENTER THE FILE TO COPY :- \c&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;read file&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;echo &quot;\nENTER THE DESTINATION TO COPY :- \c&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;read destin&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;cp &quot;$file&quot; &quot;$destin&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;6) echo &quot;\nRENAMING THE GIVEN FILE&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;echo &quot;\nENTER THE FILE TO RENAME :- \c&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;read file1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;echo &quot;\nENTER THE NEW NAME :- \c&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;read file2&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;mv &quot;$file1&quot; &quot;$file2&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;7) echo &quot;\nDELETING THE GIVEN FILE&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;echo &quot;\nENTER THE FILE TO DELETE :- \c&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;read file&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;rm &quot;$file&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;8) echo &quot;\nEDITING A GIVEN FILE&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;echo &quot;\nENTER FILE TO EDIT :- \c&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;read file&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;vi &quot;$file&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;:q&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;9) exit&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;*) echo &quot;Invalid Choice .....&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;esac&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;echo -e &quot;Do u want to continue.....? [y/n]&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;read choice&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;case $choice in&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;Y|y) choice=y;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;N|n) choice=n;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;*) choice=y;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;esac&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g14.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;MAIN MENU&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;***************************&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;1 - DISPLAY CURRENT DIRECTORY&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;2 - LIST DIRECTORY&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;3 - MAKE DIRECTORY&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;4 - CHANGE DIRECTORY&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;5 - COPY A FILE&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;6 - RENAME A FILE&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;7 - DELETE A FILE&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;8 - EDIT A FILE&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;9 - EXIT&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;ENTER THE CHOICE :-&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;DISPLAYING CURRENT DIRECTORY&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;/home/PARAM/mca09113&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Do u want to continue.....? [y/n]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 15:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script which reads a text file and output the following&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Count of character, words and lines.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;File in reverse.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Frequency of particular word in the file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Lower case letter in place of upper case letter.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat g15.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo -e &quot;\n Enter Filename : &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read filen&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;--------------------------------------------------------------&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;&lt;span style=&quot;&quot;&gt;                             &lt;/span&gt;MENU&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;--------------------------------------------------------------&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot; a) Count the no. of char.s, words, lines.&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot; b) Display a file in reverse.&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot; c) Count the no. of occurrences of a particular word.&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot; d) Convert Lower case to UppeCase&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;--------------------------------------------------------------&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo -e &quot;\n Enter Your Choice : &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read c&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;case &quot;$c&quot; in&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;a) echo -e &quot;\n Total lines,words,char.s &quot; ; wc $filen ;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;b) rev $filen&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;read buf;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;c) echo -e &quot;\nEnter word to find :&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;read w&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for i in `cat $filen`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;echo $i &gt;&gt; f1.txt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;echo -e &quot;Total no. of words= \c&quot; ;grep -c $w f1.txt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;grep $w f1.txt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;rm f1.txt;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;*) echo &quot;Invalid choice&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;esac&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g15.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;Enter Filename :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;gtu7.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;--------------------------------------------------------------&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                             &lt;/span&gt;MENU&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;--------------------------------------------------------------&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;a) Count the no. of char.s, words, lines.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;b) Display a file in reverse.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;c) Count the no. of occurrences of a particular word.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;d) Convert Lower case to UppeCase&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;--------------------------------------------------------------&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;Enter Your Choice :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;a&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;Total lines,words,char.s&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;12&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;47 254 gtu7.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 16:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a shell script to check whether the named user is currently logged in or not&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo -e &quot;Enter The User name : &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read name&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;(who | grep $name&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;) &amp;amp;&amp;amp;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;The User &quot; $name &amp;amp;&amp;amp;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot; Is Currently Logged In &quot; || echo &quot;is logged out&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g16.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter The User name :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;mca09113&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;mca09113 pts/3&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;2010-12-08 &lt;st1:time minute=&quot;1&quot; hour=&quot;15&quot;&gt;15:01&lt;/st1:time&gt; (10.9.3.8)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;The User&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;mca09113&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;Is Currently Logged In&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 17:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a Script for Simple Database Management System Operation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Database File Contains Following Fields.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;EMP_NO ,EMP_NAME, EMP_ADDRESS, EMP_AGE, EMP_GENDER, EMP_DESIGNATION, EMP_BASIC_SALARY, Provide Menu Driven Facility For, VIEW RECORD BASED ON QUERY, ADD RECORD, DELETE RECORD, MODIFY RECORD., COUNT TOTAL NUMBER OF RECORDS EXIT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat 17g.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;i=&quot;y&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter name of database &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read db&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;while [ $i = &quot;y&quot; ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;1.View the DataBase &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;2.View Specific Records &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;3.Add Records &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;4.Delete Records &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;5.Exit &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Enter your choice &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read ch&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;case $ch in&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;1)cat $db;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;2)echo &quot;Enter id :&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;read id&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;l=`wc -l $db`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;j=1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;while [ $l -gt $j ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;$dbid=`cat $db | cut -f1 -d&quot;,&quot; | head -n $i | tail -n 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;if [ $id = $dbid ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;echo `head -n $i | tail -n 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;break&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;3)echo &quot;Enter new std id &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;iread tid&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;echo &quot;Enter new name:&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;read tnm&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;echo &quot;Enter designation &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;read des&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;echo &quot;Enter college name&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;read college&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;echo &quot;$tid&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;$tnm&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;$des&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;$college&quot;&gt;&gt;$db;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;4)echo &quot;Delete Records Where Id is&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;read id&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;grep -v &quot;$id&quot; $db &gt;dbs1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;echo &quot;Record is deleted&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;cat dbs1;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;5)exit;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;*)echo &quot;Invalid choice &quot;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;esac&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;Do u want to continue ?&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read i&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if [ $i != &quot;y&quot; ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;exit&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh 17g.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter name of database&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hm1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;1.View the DataBase&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;2.View Specific Records&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;3.Add Records&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;4.Delete Records&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;5.Exit&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter your choice&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;cat: hm1: Is a directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Do u want to continue ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 18:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write A Script To Perform Following String Operations Using Menu:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;COMPARE TWO STRINGS.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;JOIN TWO STRINGS.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;FIND THE LENGTH OF A GIVEN STRING.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;OCCURRENCE OF CHARACTER AND WORDS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;E. REVERSE THE STRING.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat g18.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;while true&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo ---------------------------------------&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo 1...COMPARE TWO STRINGS&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo 2...JOIN TWO STRINGS&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo 3...FIND THE LENGTH OF A GIVEN STRING&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo 4...OCCURRENCE OF CHARACTER AND WORDS&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo 5...REVERSE THE STRING&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo ---------------------------------------&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo Enter Choice:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read ch&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo ---------------------------------------&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;case $ch in&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;1)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Enter String1:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read str1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Enter String2:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read str2&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;if [ $str1 = $str2 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;echo String is equal&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;echo String is not equal&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;2)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Enter String1:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read str1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Enter String2:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read str2&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;str3=$str1$str2&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Join String: $str3&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;3)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;length=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Enter String1:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read str1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;length=`expr $str1 | wc -c`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;length=`expr $length - 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Length: $length&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;4)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Enter String:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read str&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Enter Word to find&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read word&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo $str | cat &gt; str1.txt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;grep -o $word str1.txt | cat &gt; str2.txt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;count=`grep -c $word str2.txt`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo Count: $count&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;5)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Enter String1:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read str&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;len=`expr $str | wc -c`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;len=`expr $len - 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;while [ $len -gt 0 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;rev=`expr $str | cut -c $len`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;ans=$ans$rev&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;len=`expr $len - 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Reverse String: $ans&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;*)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo Wrong Choice&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;esac&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo Do u want to continue?&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;read ans&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if [ $ans = n ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;exit&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g18.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;---------------------------------------&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;1...COMPARE TWO STRINGS&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;2...JOIN TWO STRINGS&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;3...FIND THE LENGTH OF A GIVEN STRING&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;4...OCCURRENCE OF CHARACTER AND WORDS&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;5...REVERSE THE STRING&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;---------------------------------------&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter Choice:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;---------------------------------------&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter String1:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;jay somnath&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter String2:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;jay somnath&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;g18.sh: line 22: [: too many arguments&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;String is not equal&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Do u want to continue?&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;n&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 19:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to calculate gross salary for any number of employees&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Gross Salary =Basic + HRA + DA.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;HRA=10% and DA= 15%.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 20:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to check whether a given string is palindrome or not.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat g20.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo Enter String&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read str&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;length=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;cnt=1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;flag=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;length=`expr $str | wc -c`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;length=`expr $length - 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;temp=`expr $length / 2`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;while test $cnt -le $temp&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;rev=`expr $str | cut -c $cnt`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;ans=`expr $str | cut -c $length`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;if [ $rev != $ans ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;flag=1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;cnt=`expr $cnt + 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;length=`expr $length - 1`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if [ $flag -eq 0 ]&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo String is palindrome&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo String is not palindrome&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g20.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter String&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;jay somnath&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;expr: syntax error&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;String is palindrome&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 21:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to check whether a given number is palindrome or not.&lt;/span&gt;&lt;u&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat g21.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot;ENTER NUMBER :=&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read number&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;rem=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;i=10&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;revnumber=0&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;for((;number&gt;0;))&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;let revnumber=&quot; revnumber * 10 &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;let rem=&quot; number % 10 &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;let number=&quot; number / 10 &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;let revnumber=&quot; revnumber + rem &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo -e &quot;\nREVERSE NUMBER :-\c&quot; &amp;amp; echo $revnumber&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g21.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;ENTER NUMBER :=&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;12345&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;REVERSE NUMBER :-54321&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 22:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to display all words of a file in ascending order&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;br /&gt; &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt; &lt;!--[endif]--&gt;&lt;/u&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat g22.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot; Enter File Name&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read fname&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;sort $fname&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;or&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;-e &quot;\n enter File name &quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read fn&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;for i in `cat $fn`&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;echo $i &gt;&gt; f2.txt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;sort f2.txt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;rm f2.tx&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g22.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;Enter File Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 23:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to display all lines of a file in ascending order.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;echo &quot; Enter File Name&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;read fname&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;sort $fname&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g23.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;Enter File Name&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;myfile.txt&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hi friends&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;how are you&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;thankyou&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 24:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script to display the last modified file&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;while true; &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;read -e -p &quot;Enter Directory: &quot; path || exit&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;[[ -d $path ]] &amp;amp;&amp;amp; break&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;Invalid Path, Try Again!&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;cd $path&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;ls * -dpltr | grep -v &#39;/$&#39; | tail -n1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;cd $OLDPWD&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g24.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter Directory: hm1&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;-rw-r--r-- 1 mca09113 Domain Users&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;26 Aug&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;9 &lt;st1:time hour=&quot;10&quot; minute=&quot;37&quot;&gt;10:37&lt;/st1:time&gt; homead1.txt&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 25:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a shell script to add the statement #include &lt;stdio.h&gt; at the beginning of every C source file in current directory containing printf and fprintf.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;GTU 26:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; font-family: Times-Roman;&quot;&gt;Write a script that behaves both in interactive and non-interactive mode. When no arguments are supplied, it picks up each C program from current directory and lists the first 10 lines. It then prompts for deletion of the file. If the user supplies arguments with the script, then it works on those files only&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;ANS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ cat g26.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;N=$#&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;ext=C&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;if test &quot;$N&quot; -eq &quot;0&quot;; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;while true; do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;read -e -p &quot;Enter Path: &quot; path || exit&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;[[ -d $path ]] &amp;amp;&amp;amp; break&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;Invalid Path, Try Again!&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;path=${path%/}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;for i in $path/*.C&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;if [ &quot;$i&quot; != $path/&#39;*.C&#39; ]; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;mv &quot;$i&quot; &quot;${i/.C/}&quot;.c&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;for i in $path/*.&quot;$ext&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;if [ &quot;$i&quot; != &quot;$path&quot;/&#39;*.c&#39; ]; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;File is $i&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;head -n10 &quot;$i&quot; | nl&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;sleep 1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;rm -i &quot;$i&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;echo &quot;There are no matching \&quot;C\&quot; files to Prompt in this directory.&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;sleep 2&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;clear=no&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if test &quot;$clear&quot; != &quot;no&quot;; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;echo &quot;Remaining C files in the Directory...&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;ls -1 $path/*.c&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;for i in $path/*.C&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;if [ &quot;$i&quot; != $path/&#39;*.C&#39; ]; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;mv &quot;$i&quot; &quot;${i/.C/}&quot;.c&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;for i in $*&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;do&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;i=&quot;${i/.c/}&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;i=&quot;$(pwd)/$i.c&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;if [ -f &quot;$i&quot; ]; then&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;echo &quot;File name is $i&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;head -n10 &quot;$i&quot; | nl&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;sleep 1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;rm -i &quot;$i&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;else&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;echo &quot;There is no such a file with name: \&quot;$i\&quot; in current working directoy&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;sleep 3&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;fi&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;done&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;clear&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;echo &quot;Remaining C files in the Directory...&quot;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;ls -1 *.c&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;sleep 1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;fi&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;&lt;o:p&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;u&gt;OUTPUT:&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;[mca09113@ALS ~]$ sh g26.sh&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Enter Path: hm1&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;File is hm1/*.C&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;head: cannot open `hm1/*.C&#39; for reading: No such file or directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;rm: cannot lstat `hm1/*.C&#39;: No such file or directory&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Remaining C files in the Directory...&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;hm1/t1.c&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/5161563700816939077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/gtu-operating-system-practicle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/5161563700816939077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/5161563700816939077'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/gtu-operating-system-practicle.html' title='gtu operating system practicle'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-847449290432212822</id><published>2010-12-15T07:45:00.000-08:00</published><updated>2010-12-16T02:25:58.699-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java programing"/><title type='text'>JAVA GTU PROGRAMMING</title><content type='html'>&lt;meta equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;meta name=&quot;ProgId&quot; content=&quot;Word.Document&quot;&gt;&lt;meta name=&quot;Generator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;meta name=&quot;Originator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;link rel=&quot;File-List&quot; href=&quot;file:///C:%5CUsers%5C95Q%5CAppData%5CLocal%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate=&quot;false&quot; latentstylecount=&quot;156&quot;&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Times-Roman; 	mso-font-alt:&quot;Times New Roman&quot;; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:3 0 0 0 1 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:&quot;&quot;; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-fareast-font-family:&quot;Times New Roman&quot;; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 90.0pt 72.0pt 90.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-fareast-font-family:&quot;Times New Roman&quot;; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:78%;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;JAVA GTU PROGRAMMING&lt;/span&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;Write a simple java application to print a pyramid with 5 lines. The first line has one character, 2nd&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;line has two characters and so on. The character to be used in the pyramid is taken as a command&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;line argument&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;    &lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;package gtu;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;class printd &lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;public void print(String ch)&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;for(int i=0;i&lt;5;i++)&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;for(int k=5;k&gt;i;k--)&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.print(&quot; &quot;);&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;for(int j=0;j&lt;i+1;j++)&gt;&lt;/i+1;j++)&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;{ &lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;                         &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;System.out.print(ch+&quot; &quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;System.out.println(&quot; &quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;class gtu_2&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;public static void main(String args[])&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;try&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;{&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;printd p=new printd();&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;p.print(args[0]);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;catch(ArrayIndexOutOfBoundsException e)&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;caught &quot; +e);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;renter the character&quot;); &lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;   &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;Write a Java application which takes several command line arguments, which are supposed to be&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;names of students and prints output as given below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;(Suppose we enter 3 names then output should be as follows):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;Number of arguments = 3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;1: First Student Name is =Tom&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;2: Second Student Name is =Dick&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;3: Third Student Name is =Harry&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Hint: An array may be used for converting from numeric values from 1 to 20 into String.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt; &lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;   &lt;br /&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;package gtu;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;class gtu_3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;public static void main(String args[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;String arr[] = {&quot;First&quot;, &quot;Second&quot;, &quot;Third&quot;, &quot;Fourth&quot;, &quot;Fifth&quot;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                   &lt;/span&gt;&quot;Sixth&quot;, &quot;Seventh&quot;, &quot;Eight&quot;, &quot;Nineth&quot;,&quot;tenth&quot;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                   &lt;/span&gt;&quot;eleventh&quot;,&quot;twelth&quot;,&quot;thirteenth&quot;,&quot;fourteenth&quot;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;for(int i=0;i&lt;args.length;i++)&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/args.length;i++)&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;{ &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;System.out.println((i+1)+&quot;: &quot;+ arr[i]+&quot; Student Name is = &quot;+args[i]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;&quot;&gt;                    &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;}&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;  &lt;br /&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Write a class, with main method, which declares floating point variables and observe the output of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;dividing the floating point values by a 0, also observe the effect of assigning a high integer value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;(8 digits and above) to a float and casting it back to int and printing.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;  &lt;br /&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;package gtu;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;class gtu_4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;public static void main(String args[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;float test=12.0f;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;int test2=123456789;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;float value divide by zero : &quot;+test/0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;float test3=(int)test2;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;//narowing conversion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;assigning integer to float : &quot;+test3);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;int test4;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;test4=(int)test3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;casting float to integer : &quot;+test4);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;}&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;   &lt;br /&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;Write a class called Statistics, which has a static method called average,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;which takes a onedimensional array for double type, as parameter, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;and prints the average for the values in the array.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Now write a class with the main method, which creates a two-dimensional&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;array for the four weeks of a month, containing minimum temperatures for &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;the days of the week(an array of 4 by 7), and uses the average method of the &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Statistics class to compute and print the average temperatures for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;the four weeks.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;  &lt;br /&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;package gtu;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;import java.io.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;class Statistics&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;public static void average(double arr[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;double avg=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;for(int i=0;i&lt;arr.length;i++)&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/arr.length;i++)&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;{ &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;avg=avg+arr[i];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;}&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;System.out.println(&quot;average of the array&quot;+ avg/(arr.length));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;class gtu_5 extends Statistics&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;public static void main(String args[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{ &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;DataInputStream ds=new DataInputStream(System.in);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;double temp[][]=new double[4][7];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;double week[]=new double[7];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;int i,j,k;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;String data;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;try{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;for(i=0;i&lt;4;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;for(j=0;j&lt;7;j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{ &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;System.out.print(&quot;Enter &quot; + (i+1) +&quot;th Week and &quot; +(j+1)+&quot;th day: &quot;); &lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;data=ds.readLine();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;temp[i][j]=Double.parseDouble(data);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;for(i=0;i&lt;4;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;for(j=0;j&lt;7;j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                   &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                   &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;average(temp[i]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;catch(Exception e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;exception caught&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;}&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;   &lt;br /&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Define a class called Product, each product has a name, a product code and manufacturer name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;Define variables, methods and constructors, for the Product class. Write a class called Test&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Product, with the main method to test the methods and constructors of the Product class.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;    &lt;br /&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;class Product&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;{&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;int pCode;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;String pName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;String mName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;Product(int pc)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;this.pCode=pc;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Product(int pc,String s1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;                         &lt;/span&gt;this.pCode=pc;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;this.pName=s1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;Product(int pc,String s1,String s2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;{ &lt;span style=&quot;&quot;&gt;       &lt;/span&gt;this.pCode=pc;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;this.pName=s1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;this.mName=s2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;class testPrduct&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;public static void main(String args[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;constructor of peoduct with pc&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;Product p1=new Product(001);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;constructor of peoduct with pc and pn&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;Product p2=new Product(001,&quot;laptop&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;constructor of peoduct with pc,pn and mn&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;Product p3=new Product(001,&quot;laptop&quot;,&quot;lenovo&quot;);&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;     &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Define a class called Cartesian Point, which has two instance variables, x and y. Provide the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;methods get X() and get Y() to return the values of the x and y values respectively, a method called&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;move() which would take two integers as parameters and change the values of x and y respectively,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;a method called display() which would display the current values of x and y. Now overload the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;method move() to work with single parameter, which would set both x and y to the same values, .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;Provide constructors with two parameters and overload to work with one parameter as well. Now&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;define a class called Test Cartesian Point, with the main method to test the various methods in the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Cartesian Point class.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;   &lt;br /&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;package gtu;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;import java.io.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;class CP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;int x,y;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;public CP(int x,int y)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;this.x=x;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;this.y=y;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;public CP(int a)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;x=y=a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;int getx()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;return x;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;int gety()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;return y;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;void move(int x,int y)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;this.x=x;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;this.y=y;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;void display()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;System.out.println(&quot;Current value of x : &quot;+getx());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;System.out.println(&quot;Current value of y : &quot;+gety());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;void move(int a)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;x=y=a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;class p7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;public static void main(String arg[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;CP cp1 = new CP(5,25);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;System.out.println(&quot;\n\nDefault Values with &quot;+5+&quot; And &quot;+25);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;cp1.display();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;System.out.println(&quot;After Function move with two arguments is called,&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;cp1.move(11,25);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;cp1.display();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;System.out.println(&quot;After Function move with one arguments is called,&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;cp1.move(95);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;cp1.display();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;System.out.println(&quot;-------------------------------------&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;CP cp2 = new CP(15);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;System.out.println(&quot;\n\nDefault Values with&quot;+15);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;cp2.display();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;System.out.println(&quot;After Function move with two arguments is called,&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;cp2.move(35,65);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;cp2.display();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;System.out.println(&quot;After Function move with one arguments is called,&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;cp2.move(105);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;cp2.display();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;       &lt;br /&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;Define a class called Triangle, which has constructor with three parameters, which are of type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;Cartesian Point, defined in the exercise 7. Provide methods to find the area and the perimeter of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;the Triangle, a method display() to display the three Cartesian Points separated by &#39;:&#39; character, a&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;method move() to move the first Cartesian Point to the specified x, y location, the move should&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;take care of relatively moving the other points as well, a method called rotate, which takes two&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;arguments, one is the Cartesian Point and other is the angle in clockwise direction. Overload the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;move method to work with Cartesian Point as a parameter. Now define a class called Test Triangle&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;&quot; &gt;to test the various methods defined in the Triangle class. Similarly also define a class called&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Rectangle which has four Cartesian Point.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;       &lt;br /&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:Times-Roman;font-size:11;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;package gtu;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;class Triangle&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;CartesianPoint P1;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;CartesianPoint P2;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;CartesianPoint P3;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;Triangle()&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;Triangle(CartesianPoint p1, CartesianPoint p2, CartesianPoint p3)&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P1=p1;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P2=p2;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P3=p3;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;void display()&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P1.X: &quot;+P1.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P1.Y: &quot;+P1.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P2.X: &quot;+P2.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P2.Y: &quot;+P2.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P3.X: &quot;+P3.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P3.Y: &quot;+P3.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;void move()&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P1.x=P1.x+10;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P1.y=P1.y+10;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P2.x=P2.x+10;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P2.y=P2.y+10;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P3.x=P3.x+10;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P3.y=P3.y+10;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;void rotate(CartesianPoint P,int degree)&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;int x,y;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;x=(int)(P.x * Math.cos(degree) - P.y * Math.sin(degree));&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;y=(int)(P.x * Math.sin(degree) + P.y * Math.cos(degree));&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P.x=x;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P.y=y;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;public String toString()&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P1.X: &quot;+P1.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P1.Y: &quot;+P1.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P2.X: &quot;+P2.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P2.Y: &quot;+P2.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P3.X: &quot;+P3.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P3.Y: &quot;+P3.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;return &quot;&quot;;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;boolean equals(Triangle t)&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;boolean f;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;if(P1.x==t.P1.x &amp;amp;&amp;amp; P1.y==t.P1.y &amp;amp;&amp;amp; P2.x==t.P2.x &amp;amp;&amp;amp; P2.y==t.P2.y &amp;amp;&amp;amp; P3.x==t.P3.x &amp;amp;&amp;amp; P3.y==t.P3.y )&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;f=true;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;else&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;f=false;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;return f;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;class Rectangle&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;CartesianPoint P1;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;CartesianPoint P2;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;CartesianPoint P3;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;CartesianPoint P4;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;Rectangle()&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;Rectangle(CartesianPoint p1, CartesianPoint p2, CartesianPoint p3,CartesianPoint p4)&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P1=p1;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P2=p2;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P3=p3;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P4=p4;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; text-indent: 36pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;void display()&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P1.X: &quot;+P1.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P1.Y: &quot;+P1.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P2.X: &quot;+P2.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P2.Y: &quot;+P2.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P3.X: &quot;+P3.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P3.Y: &quot;+P3.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P4.X: &quot;+P4.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P4.Y: &quot;+P4.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;void move()&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P1.x=P1.x+15;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P1.y=P1.y+15;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P2.x=P2.x+15;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P2.y=P2.y+15;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P3.x=P3.x+15;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P3.y=P3.y+15;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P4.x=P4.x+15;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P4.y=P4.y+15;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;void rotate(CartesianPoint P,int degree)&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;int x,y;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;x=(int)(P.x * Math.cos(degree) - P.y * Math.sin(degree));&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;y=(int)(P.x * Math.sin(degree) + P.y * Math.cos(degree));&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P.x=x;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P.y=y;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;public String toString()&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P1.X: &quot;+P1.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P1.Y: &quot;+P1.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P2.X: &quot;+P2.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P2.Y: &quot;+P2.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P3.X: &quot;+P3.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P3.Y: &quot;+P3.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P4.X: &quot;+P4.x);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Cartesian Point P4.Y: &quot;+P4.y);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;return &quot;&quot;;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;boolean equals(Rectangle t)&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;boolean f;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;if(P1.x==t.P1.x &amp;amp;&amp;amp; P1.y==t.P1.y &amp;amp;&amp;amp; P2.x==t.P2.x &amp;amp;&amp;amp; P2.y==t.P2.y &amp;amp;&amp;amp; P3.x==t.P3.x &amp;amp;&amp;amp; P3.y==t.P3.y &amp;amp;&amp;amp; P4.x==t.P4.x &amp;amp;&amp;amp; P4.y==t.P4.y )&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;f=true;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;else&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;f=false;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;return f;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;class GTU8&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;public static void main(String arg[])&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;CartesianPoint P1=new CartesianPoint(10,20);&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;CartesianPoint P2=new CartesianPoint(20,20);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;CartesianPoint P3=new CartesianPoint(30,20);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;Triangle t=new Triangle(P1,P2,P3);&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;\n\n\t\tTriangle\n\n&quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;t.display();&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;\n\nOverload toString method\n\n&quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(t);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;\nEach Cartesian Point is move 10 relatively\n&quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;t.move();&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;t.display();&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;\nEach Cartesian Point is rotating 90 degree&quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;t.rotate(P1,10);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;t.rotate(P2,90);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;t.rotate(P3,90);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;t.display();&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P1=new CartesianPoint(10,20);&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P2=new CartesianPoint(40,30);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P3=new CartesianPoint(50,90);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;Triangle t2=new Triangle(P1,P2,P3);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;\n\n\t\tTriangle 2\n\n&quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(t2);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Equlas T1 and T2 &quot;+ t.equals(t2));&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;CartesianPoint P4=new CartesianPoint(25,55);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;Rectangle r=new Rectangle(P1,P2,P3,P4);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;\n\n\t\tRectangle\n\n&quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;r.display();&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;\n\nOverload toString method\n\n&quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(r);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;\nEach Cartesian Point is move 15 relatively\n&quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;r.move();&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;r.display();&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;\nEach Cartesian Point is rotating 90 degree&quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;r.rotate(P1,90);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;r.rotate(P2,90);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;r.rotate(P3,90);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;r.rotate(P4,90);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;r.display();&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P1=new CartesianPoint(10,20);&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P2=new CartesianPoint(20,20);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P3=new CartesianPoint(30,20);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;P4=new CartesianPoint(25,55);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;Rectangle r2=new Rectangle(P1,P2,P3,P4);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;\n\n\t\tRectangle 2\n\n&quot;);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(r2);&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;System.out.println(&quot;Equlas R1 and R2 &quot;+ r.equals(r2));&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/847449290432212822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/java-gtu-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/847449290432212822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/847449290432212822'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/java-gtu-programming.html' title='JAVA GTU PROGRAMMING'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-7935791758353344466</id><published>2010-12-14T08:29:00.000-08:00</published><updated>2010-12-14T08:44:19.731-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java programing"/><title type='text'>reverse number</title><content type='html'>&lt;span style=&quot;font-size:180%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;reverse number&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class Reverse&lt;br /&gt;{&lt;br /&gt;public static void main(String args[])&lt;br /&gt;{&lt;br /&gt;int i,s=0,a = 120;&lt;br /&gt;int no[] = new int[10];&lt;br /&gt;System.out.print(&quot;Original Number : &quot;+a);&lt;br /&gt;for(i=0;i&lt; a =&quot; a&quot; i=&quot;s;i&quot;&gt;0;i--)&lt;br /&gt;{&lt;br /&gt;System.out.print(no[i]);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/7935791758353344466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/class-reverse-public-static-void.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/7935791758353344466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/7935791758353344466'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/class-reverse-public-static-void.html' title='reverse number'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-987768431983698285</id><published>2010-12-14T08:00:00.000-08:00</published><updated>2010-12-14T08:06:36.535-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++ programing"/><title type='text'>sorting numbers</title><content type='html'>/*geting ten numbers from user and sort it*/&lt;br /&gt;&lt;br /&gt;#include&lt;iostream.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;    clrscr();&lt;br /&gt;       cout&lt;&lt;&quot;how many number&quot;;&lt;br /&gt;       int a[10],n;&lt;br /&gt;       cin&gt;&gt;n;&lt;br /&gt;       cout&lt;&lt;&quot;enter element&quot;;&lt;br /&gt;       for (int i=0;i&lt;n;i++)&lt;br /&gt;       cin&gt;&gt;a[i];&lt;br /&gt;       for(i=0;i&lt;n-1;i++)&lt;br /&gt;         {&lt;br /&gt;           for(int j=i+1;j&lt;n;j++)&lt;br /&gt;          {&lt;br /&gt;           if(a[i]&gt;a[j])&lt;br /&gt;            {&lt;br /&gt;             int temp=a[i];&lt;br /&gt;             a[i]=a[j];&lt;br /&gt;             a[j]=temp;&lt;br /&gt;             }&lt;br /&gt;           }&lt;br /&gt;          }&lt;br /&gt;        cout&lt;&lt;&quot;sorting is \n==&gt;  &quot;;&lt;br /&gt;       for (i=0;i&lt;n;i++)&lt;br /&gt;          {&lt;br /&gt;         cout&lt;&lt;a[i] n=&quot;=&quot;&quot;&gt;  &quot; ;&lt;br /&gt;           }&lt;br /&gt;       getch();&lt;br /&gt;       }</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/987768431983698285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/sorting-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/987768431983698285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/987768431983698285'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/sorting-numbers.html' title='sorting numbers'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-5032501988698855725</id><published>2010-12-14T07:56:00.001-08:00</published><updated>2010-12-14T08:00:27.629-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++ programing"/><title type='text'>array operation</title><content type='html'>&lt;meta equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;meta name=&quot;ProgId&quot; content=&quot;Word.Document&quot;&gt;&lt;meta name=&quot;Generator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;meta name=&quot;Originator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;link rel=&quot;File-List&quot; href=&quot;file:///C:%5CUsers%5C95Q%5CAppData%5CLocal%5CTemp%5Cmsohtml1%5C02%5Cclip_filelist.xml&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate=&quot;false&quot; latentstylecount=&quot;156&quot;&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Batang; 	panose-1:2 3 6 0 0 1 1 1 1 1; 	mso-font-alt:바탕; 	mso-font-charset:129; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1342176593 1775729915 48 0 524447 0;} @font-face 	{font-family:&quot;\@Batang&quot;; 	panose-1:2 3 6 0 0 1 1 1 1 1; 	mso-font-charset:129; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1342176593 1775729915 48 0 524447 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:&quot;&quot;; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-fareast-font-family:Batang;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 90.0pt 72.0pt 90.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-fareast-font-family:&quot;Times New Roman&quot;; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;b style=&quot;&quot;&gt;Accept 5 numbers in an array and display it.&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;#include&lt;iostream.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;conio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void main(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int a[5];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;clrscr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(register int i=0;i&lt;=4;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n\ta[&quot;&lt;&lt;i&lt;&lt;&quot;]:&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cin&gt;&gt;a[i];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(i=0;i&lt;=4;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n\tAreay a[&quot;&lt;&lt;i&lt;&lt;&quot;]:&quot;&lt;&lt;a[i];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;b style=&quot;&quot;&gt;Accept 10 numbers in an array, sort it and display it.&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;#include&lt;iostream.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;conio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void sorting(int []);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void main(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int a[10];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;clrscr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(register int i=0;i&lt;=9;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n\ta[&quot;&lt;&lt;i&lt;&lt;&quot;]:&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cin&gt;&gt;a[i];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;sorting(a);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void sorting(int a[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int t;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(register int i=0;i&lt;=9;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;for(register int j=i+1;j&lt;=9;j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;if(a[i]&gt;a[j]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                 &lt;/span&gt;t=a[i];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                 &lt;/span&gt;a[i]=a[j];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                 &lt;/span&gt;a[j]=t;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cout&lt;&lt;&quot;\n\n\t**AFTER SORTING**&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(i=0;i&lt;=9;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n\tAreay a[&quot;&lt;&lt;i&lt;&lt;&quot;]:&quot;&lt;&lt;a[i];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;b style=&quot;&quot;&gt;Accept 9 numbers in form of matrix. (3 X 3 matrix)&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;b style=&quot;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;#include&lt;iostream.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;conio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void matrix(int []);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void main(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int a[9];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;clrscr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(register int i=0;i&lt;9;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n\tmatrix ele.[&quot;&lt;&lt;i&lt;&lt;&quot;]:&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cin&gt;&gt;a[i];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;matrix(a);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void matrix(int a[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int k=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cout&lt;&lt;&quot;\n\n\n&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(register int i=0;i&lt;=2;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;for(register int j=0;j&lt;=2;j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;cout&lt;&lt;&quot;\t&quot;&lt;&lt;a[k];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;k++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/5032501988698855725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/array-operation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/5032501988698855725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/5032501988698855725'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/array-operation.html' title='array operation'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-96068298891706426</id><published>2010-12-14T07:39:00.000-08:00</published><updated>2010-12-14T07:59:29.176-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++ programing"/><title type='text'>pattern</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;br /&gt;1&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;23&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;456&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;78910&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;1112131415      &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;iostream.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;&lt;br /&gt;void display(int);&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;   int n;&lt;br /&gt;   clrscr();&lt;br /&gt;   cout&lt;&lt;&quot;Enter The NO:&quot;;     cin&gt;&gt;n;&lt;br /&gt;   display(n);&lt;br /&gt;   getch();&lt;br /&gt;}&lt;br /&gt;void display(int n)&lt;br /&gt;{&lt;br /&gt;   int k=1;&lt;br /&gt;   for(int i=1;i&lt;=n;i++)&lt;br /&gt;   {&lt;br /&gt;       for(int j=1;j&lt;=i;j++){&lt;br /&gt;           if(k%2==0){&lt;br /&gt;               cout&lt;&lt;&quot;1 &quot;;&lt;br /&gt;               k++;&lt;br /&gt;           }&lt;br /&gt;           else{&lt;br /&gt;               cout&lt;&lt;&quot;0 &quot;;&lt;br /&gt;               k++;&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;       cout&lt;&lt;&quot;\n&quot;;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/conio.h&gt;&lt;/iostream.h&gt;&lt;meta equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;meta name=&quot;ProgId&quot; content=&quot;Word.Document&quot;&gt;&lt;meta name=&quot;Generator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;meta name=&quot;Originator&quot; content=&quot;Microsoft Word 11&quot;&gt;&lt;link rel=&quot;File-List&quot; href=&quot;file:///C:%5CUsers%5C95Q%5CAppData%5CLocal%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate=&quot;false&quot; latentstylecount=&quot;156&quot;&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Batang; 	panose-1:2 3 6 0 0 1 1 1 1 1; 	mso-font-alt:바탕; 	mso-font-charset:129; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1342176593 1775729915 48 0 524447 0;} @font-face 	{font-family:&quot;\@Batang&quot;; 	panose-1:2 3 6 0 0 1 1 1 1 1; 	mso-font-charset:129; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1342176593 1775729915 48 0 524447 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:&quot;&quot;; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-fareast-font-family:Batang;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 90.0pt 72.0pt 90.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:&quot;Times New Roman&quot;; 	mso-fareast-font-family:&quot;Times New Roman&quot;; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;101&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;1010&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;10101&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;iostream.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;conio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;clrscr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cout&lt;&lt;&quot;Enter The NO:&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cin&gt;&gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;display(n);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int n)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(int i=1;i&lt;=n;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;int k=2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;for(int j=1;j&lt;=i;j++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;if(k%2==0){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                 &lt;/span&gt;cout&lt;&lt;&quot;1 &quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                 &lt;/span&gt;k++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;else{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                 &lt;/span&gt;cout&lt;&lt;&quot;0 &quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                                 &lt;/span&gt;k++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;a&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;bc&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;def&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;ghij&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;klmno  &lt;span style=&quot;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;    &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;#include&lt;iostream.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;conio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;clrscr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cout&lt;&lt;&quot;Enter The NO:&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cin&gt;&gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;display(n);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int n)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int k=97;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;char c;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(int i=1;i&lt;=n;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;for(int j=1;j&lt;=i;j++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;c=k;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;cout&lt;&lt;c&lt;&lt;&quot;&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;k++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;12345&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;2345&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;345&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;45&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;5&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;    &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;#include&lt;iostream.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;conio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;clrscr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cout&lt;&lt;&quot;Enter The NO:&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cin&gt;&gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;display(n);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int n)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(int i=1;i&lt;=n;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;for(int j=i;j&lt;=n;j++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;cout&lt;&lt;j&lt;&lt;&quot;&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;55555&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;4444&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;333&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;22&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;1          &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;iostream.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;conio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;clrscr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cout&lt;&lt;&quot;Enter The NO:&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cin&gt;&gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;display(n);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int n)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(int i=n;i&gt;=1;i--)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;for(int j=1;j&lt;=i;j++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;cout&lt;&lt;i&lt;&lt;&quot;&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;246810&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;46810&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;6810&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;810&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;10&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;iostream.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;conio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;clrscr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cout&lt;&lt;&quot;Enter The NO:&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cin&gt;&gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;display(n);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int n)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int k=2,l=2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(int i=1;i&lt;=n;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;k=l;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;for(int j=i;j&lt;=n;j++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;cout&lt;&lt;k&lt;&lt;&quot;&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;k+=2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;l+=2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;a&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;bc&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;def&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;ghij&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt; font-weight: bold;&quot;&gt;klmno&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;iostream.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;#include&lt;conio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;clrscr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cout&lt;&lt;&quot;Enter The NO:&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;cin&gt;&gt;n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;display(n);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;void display(int n)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;char c;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;int m=97;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;for(int i=1;i&lt;=n;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;c=m;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;for(int j=i;j&lt;=n;j++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;cout&lt;&lt;char(c)&lt;&lt;&quot;&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                                    &lt;/span&gt;c++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;m++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;                        &lt;/span&gt;cout&lt;&lt;&quot;\n&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 5.65pt;&quot;&gt;}&lt;/p&gt; &lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/96068298891706426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern_1371.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/96068298891706426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/96068298891706426'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern_1371.html' title='pattern'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-4722766761120585154</id><published>2010-12-14T07:35:00.000-08:00</published><updated>2010-12-14T07:39:13.480-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++ programing"/><title type='text'>pattern</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9qgDbyoDXqsUDmG38UUcDsHZpOmUzYBf5-lLKbX3mUEVIVzcLlYLdRqV1o296gp9pUhKVHGVIgmXB7UNKYSQCbHWahx3OHHArljZz5k-YTCJpK4NG9ymFEJN-uRvnzrY-RyVCilF6vxA/s1600/2.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 69px; height: 77px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9qgDbyoDXqsUDmG38UUcDsHZpOmUzYBf5-lLKbX3mUEVIVzcLlYLdRqV1o296gp9pUhKVHGVIgmXB7UNKYSQCbHWahx3OHHArljZz5k-YTCJpK4NG9ymFEJN-uRvnzrY-RyVCilF6vxA/s320/2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5550562835712892146&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;#include&lt;iostream.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;&lt;br /&gt;void display(int);&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;   int n;&lt;br /&gt;   clrscr();&lt;br /&gt;   cout&lt;&lt;&quot;Enter The No:&quot;;     cin&gt;&gt;n;&lt;br /&gt;   display(n);&lt;br /&gt;   getch();&lt;br /&gt;}&lt;br /&gt;void display(int n)&lt;br /&gt;{&lt;br /&gt;   for(int i=1;i&lt;=n;i++)     {         for(int j=n;j&gt;=i;j--){&lt;br /&gt;           cout&lt;&lt;&quot; &quot;;&lt;br /&gt;       }&lt;br /&gt;       for(int k=1;k&lt;=i;k++){&lt;br /&gt;           cout&lt;&lt;&quot;*&quot;;&lt;br /&gt;       }&lt;br /&gt;       cout&lt;&lt;&quot;\n&quot;;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/conio.h&gt;&lt;/iostream.h&gt;</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/4722766761120585154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern_14.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/4722766761120585154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/4722766761120585154'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern_14.html' title='pattern'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9qgDbyoDXqsUDmG38UUcDsHZpOmUzYBf5-lLKbX3mUEVIVzcLlYLdRqV1o296gp9pUhKVHGVIgmXB7UNKYSQCbHWahx3OHHArljZz5k-YTCJpK4NG9ymFEJN-uRvnzrY-RyVCilF6vxA/s72-c/2.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-6158245397214264562</id><published>2010-12-14T07:23:00.000-08:00</published><updated>2010-12-14T07:35:00.368-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++ programing"/><title type='text'>pattern</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQVg8JM03NL6f7plCNAG9PpAYToYCKqJ86iosdGbY9lgmZDRwdRukOsIIFlz6HZGC_vc3CHvXjWBF20pYwn9SVgjnLGRFMGYG6k4rocJYz1XtlOF9rBjtdwkcneRR8F5h0WyHx6dPgvTs/s1600/1.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 49px; height: 77px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQVg8JM03NL6f7plCNAG9PpAYToYCKqJ86iosdGbY9lgmZDRwdRukOsIIFlz6HZGC_vc3CHvXjWBF20pYwn9SVgjnLGRFMGYG6k4rocJYz1XtlOF9rBjtdwkcneRR8F5h0WyHx6dPgvTs/s320/1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5550561660452580594&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;iostream.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;&lt;br /&gt;void display(int);&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;   int n;&lt;br /&gt;   clrscr();&lt;br /&gt;   cout&lt;&lt;&quot;Enter The NO:&quot;;     cin&gt;&gt;n;&lt;br /&gt;   display(n);&lt;br /&gt;   getch();&lt;br /&gt;}&lt;br /&gt;void display(int n)&lt;br /&gt;{&lt;br /&gt;   for(int i=1;i&lt;=n;i++)     {         for(int j=n;j&gt;=i;j--){&lt;br /&gt;           cout&lt;&lt;&quot; &quot;;&lt;br /&gt;       }&lt;br /&gt;       for(int k=1;k&lt;=i;k++){&lt;br /&gt;           cout&lt;&lt;&quot; *&quot;;&lt;br /&gt;       }&lt;br /&gt;       cout&lt;&lt;&quot;\n&quot;;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/conio.h&gt;&lt;/iostream.h&gt;</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/6158245397214264562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/6158245397214264562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/6158245397214264562'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern.html' title='pattern'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQVg8JM03NL6f7plCNAG9PpAYToYCKqJ86iosdGbY9lgmZDRwdRukOsIIFlz6HZGC_vc3CHvXjWBF20pYwn9SVgjnLGRFMGYG6k4rocJYz1XtlOF9rBjtdwkcneRR8F5h0WyHx6dPgvTs/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-2908743691304023280</id><published>2010-12-13T20:38:00.000-08:00</published><updated>2010-12-13T20:43:40.233-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++ programing"/><title type='text'>pattern_2</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRZJmVVYv1aiJXohhqWtGDfwCIMO49PZYI0hgLNrN46HFcQddS9EcTjTwsbQA6Vf-0lAPj3wC9O2cJR0Ka77VEawOGyPks2Z1MwogmsvlvWxYrEuOCWUNw9IdI-YB9hLwJhNHepHtu4A/s1600/pattern_2.jpg&quot;&gt;&lt;img style=&quot;float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 110px; height: 94px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRZJmVVYv1aiJXohhqWtGDfwCIMO49PZYI0hgLNrN46HFcQddS9EcTjTwsbQA6Vf-0lAPj3wC9O2cJR0Ka77VEawOGyPks2Z1MwogmsvlvWxYrEuOCWUNw9IdI-YB9hLwJhNHepHtu4A/s200/pattern_2.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5550393732492850434&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;#include&lt;iostream.h&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt; clrscr();&lt;br /&gt; for(int i=1;i&lt;=5;i++)&lt;br /&gt;    {&lt;br /&gt;      for(int j=1;j&lt;=5-i;j++)&lt;br /&gt;   {&lt;br /&gt;     cout&lt;&lt;&quot; &quot;;&lt;br /&gt;   }&lt;br /&gt;       for(int k=1;k&lt;=i;k++)&lt;br /&gt;   {&lt;br /&gt;     cout&lt;&lt;&quot;* &quot;;&lt;br /&gt;   }&lt;br /&gt;       cout&lt;&lt;&quot;\n&quot;;&lt;br /&gt;     }&lt;br /&gt;  getch();&lt;br /&gt; }</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/2908743691304023280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern2_13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/2908743691304023280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/2908743691304023280'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern2_13.html' title='pattern_2'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRZJmVVYv1aiJXohhqWtGDfwCIMO49PZYI0hgLNrN46HFcQddS9EcTjTwsbQA6Vf-0lAPj3wC9O2cJR0Ka77VEawOGyPks2Z1MwogmsvlvWxYrEuOCWUNw9IdI-YB9hLwJhNHepHtu4A/s72-c/pattern_2.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-2035047583893044895</id><published>2010-12-13T20:36:00.000-08:00</published><updated>2010-12-13T20:37:51.861-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++ programing"/><title type='text'>pattern_1</title><content type='html'>/*      &lt;br /&gt; *&lt;br /&gt; * *&lt;br /&gt; * * *&lt;br /&gt; * * * *  &lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;#include&lt;iostream.h&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt; clrscr();&lt;br /&gt;&lt;br /&gt; for(int i=1;i&lt;=5;i++)&lt;br /&gt;  {&lt;br /&gt;    for(int j=1;j&lt;=i;j++)&lt;br /&gt;      {&lt;br /&gt; cout&lt;&lt;&quot; * &quot;;&lt;br /&gt;      }&lt;br /&gt;     cout&lt;&lt;&quot;\n&quot;;&lt;br /&gt;  }&lt;br /&gt; getch();&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/2035047583893044895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern1_597.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/2035047583893044895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/2035047583893044895'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern1_597.html' title='pattern_1'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-2905528050694099600</id><published>2010-12-13T20:33:00.000-08:00</published><updated>2010-12-13T20:36:19.834-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++ programing"/><title type='text'>fibonaci series</title><content type='html'>/*print 1 1 2 3 5 8 13 21 34 55 (fibonaci series)*/&lt;br /&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;#include&lt;iostream.h&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt; clrscr();&lt;br /&gt; cout&lt;&lt;&quot;enter no ==&gt; &quot;;&lt;br /&gt; int t1=1,t2=0,t3,no,i;&lt;br /&gt; cin&gt;&gt;no;&lt;br /&gt; for(i=1;i&lt;=no;i++)&lt;br /&gt;  {&lt;br /&gt;   t3=t1+t2;&lt;br /&gt;   t1=t2;&lt;br /&gt;   t2=t3;&lt;br /&gt;   cout&lt;&lt;&quot;\t&quot;&lt;&lt;t3;&lt;br /&gt;   }&lt;br /&gt;  getch();&lt;br /&gt; }</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/2905528050694099600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/fibonaci-series.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/2905528050694099600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/2905528050694099600'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/fibonaci-series.html' title='fibonaci series'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-1379739683060657115</id><published>2010-12-13T11:03:00.000-08:00</published><updated>2010-12-13T11:45:43.852-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="data structure"/><title type='text'>link list operation</title><content type='html'>/* link list operation like append,delete,insert,find,display*/&lt;br /&gt;&lt;br /&gt;#include&lt;dos.h&gt;&lt;br /&gt;#include&lt;iostream.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;#include&lt;stdlib.h&gt;&lt;br /&gt;#include&lt;alloc.h&gt;&lt;br /&gt;int ex=0;&lt;br /&gt;struct linklist&lt;br /&gt; {&lt;br /&gt;  int no;&lt;br /&gt;  char name[50];&lt;br /&gt;  struct linklist *link;&lt;br /&gt; };&lt;br /&gt;class linkl&lt;br /&gt; {&lt;br /&gt;  linklist *list,*temp;&lt;br /&gt;  public:&lt;br /&gt;  linklist *first;&lt;br /&gt;  void getdata();&lt;br /&gt;  void display(linklist *first);&lt;br /&gt;  int choice(linklist *first);&lt;br /&gt; };&lt;br /&gt;typedef class linklist stu;&lt;br /&gt;void linkl :: getdata()&lt;br /&gt;{&lt;br /&gt; clrscr();&lt;br /&gt; char x;&lt;br /&gt; list=new stu;&lt;br /&gt; first=list;&lt;br /&gt; while(1)&lt;br /&gt; {&lt;br /&gt;  cout &lt;&lt; &quot;\nEnter the roll no :- &quot;;&lt;br /&gt;  cin &gt;&gt; list-&gt;no;&lt;br /&gt;  cout &lt;&lt; &quot;\nEnter the name :- &quot;;&lt;br /&gt;  cin &gt;&gt; list-&gt;name;&lt;br /&gt;  cout &lt;&lt; &quot;\nDo you want to continue [y/n] :- &quot;;&lt;br /&gt;  cin &gt;&gt; x;&lt;br /&gt;  if(x==&#39;n&#39; || x==&#39;N&#39;)&lt;br /&gt;  break;&lt;br /&gt;  list-&gt;link=new stu;&lt;br /&gt;  list=list-&gt;link;&lt;br /&gt; }&lt;br /&gt; list-&gt;link=NULL;&lt;br /&gt; display(first);&lt;br /&gt;}&lt;br /&gt;void linkl :: display(linklist *first)&lt;br /&gt;{&lt;br /&gt; clrscr();&lt;br /&gt; list=first;&lt;br /&gt; while(1)&lt;br /&gt; {&lt;br /&gt;  cout &lt;&lt; &quot;\nROLL NO :-&quot;&lt;&lt; list-&gt;no;&lt;br /&gt;  cout &lt;&lt; &quot;\nNAME    :- &quot; &lt;&lt; list-&gt;name;&lt;br /&gt;  if(list-&gt;link==NULL)&lt;br /&gt;  break;&lt;br /&gt;  list=list-&gt;link;&lt;br /&gt; }&lt;br /&gt; choice(first);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;int linkl :: choice(linklist *first)&lt;br /&gt;{&lt;br /&gt;  int ch,x;&lt;br /&gt;  ex=0;&lt;br /&gt;  cout &lt;&lt; &quot;\n\t\t\t 1. APPEND &quot;;&lt;br /&gt;  cout &lt;&lt; &quot;\n\t\t\t 2. DELETE &quot;;&lt;br /&gt;  cout &lt;&lt; &quot;\n\t\t\t 3. INSERT &quot;;&lt;br /&gt;  cout &lt;&lt; &quot;\n\t\t\t 4. FIND &quot;;&lt;br /&gt;  cout &lt;&lt; &quot;\n\t\t\t 5. DISPLAY &quot;;&lt;br /&gt;  cout &lt;&lt; &quot;\n\t\t\t 6. EXIT &quot;;&lt;br /&gt;  cout &lt;&lt; &quot;\nEnter your choice :- &quot;;&lt;br /&gt;  cin &gt;&gt; ch;&lt;br /&gt;  switch(ch)&lt;br /&gt;  {&lt;br /&gt;&lt;br /&gt; case 1:  list=first;&lt;br /&gt;   while(1)&lt;br /&gt;   {&lt;br /&gt;     if(list-&gt;link==NULL)&lt;br /&gt;  {&lt;br /&gt;   list-&gt;link=new stu;&lt;br /&gt;   list=list-&gt;link;&lt;br /&gt;   cout &lt;&lt; &quot;\nEnter the roll no :- &quot;;&lt;br /&gt;   cin &gt;&gt; list-&gt;no;&lt;br /&gt;   cout &lt;&lt; &quot;\nEnter the name :- &quot;;&lt;br /&gt;   cin &gt;&gt; list-&gt;name;&lt;br /&gt;   list-&gt;link=NULL;&lt;br /&gt;   display(first);&lt;br /&gt;  if(ex)&lt;br /&gt;     return 1;&lt;br /&gt;     }&lt;br /&gt;  else&lt;br /&gt;   list=list-&gt;link;&lt;br /&gt;     }&lt;br /&gt;     display(first);&lt;br /&gt;  case 2: del :&lt;br /&gt;     clrscr();&lt;br /&gt;    list=first;&lt;br /&gt;   while(1)&lt;br /&gt;   {&lt;br /&gt;     cout &lt;&lt; &quot;\nROLL NO :- &quot; &lt;&lt; list-&gt;no;&lt;br /&gt;     cout &lt;&lt; &quot;\nNAME    :- &quot; &lt;&lt; list-&gt;name;&lt;br /&gt;     if(list-&gt;link==NULL)&lt;br /&gt;   break;&lt;br /&gt;     list=list-&gt;link;&lt;br /&gt;   }&lt;br /&gt;   list=first;&lt;br /&gt;   cout &lt;&lt; &quot;\n\t\t\t 1. DELETING AT FIRST &quot;;&lt;br /&gt;   cout &lt;&lt; &quot;\n\t\t\t 2. DELETING AT LAST &quot;;&lt;br /&gt;   cout &lt;&lt; &quot;\n\t\t\t 3. DELETE IN BETWEEN &quot;;&lt;br /&gt;   cout &lt;&lt; &quot;\n\t\t\t 4. GO BACK &quot;;&lt;br /&gt;   cout &lt;&lt; &quot;\nEnter your choice :- &quot;;&lt;br /&gt;   cin &gt;&gt; ch;&lt;br /&gt;   switch(ch)&lt;br /&gt;   {&lt;br /&gt;    case 1: first=first-&gt;link;&lt;br /&gt;     goto del;&lt;br /&gt;    case 2: while(list-&gt;link-&gt;link!=NULL)&lt;br /&gt;     {&lt;br /&gt;    list=list-&gt;link;&lt;br /&gt;      }&lt;br /&gt;   list-&gt;link=NULL;&lt;br /&gt;   goto del;&lt;br /&gt;    case 3:cout &lt;&lt; &quot;\nEnter the roll no to be deleted :- &quot;;&lt;br /&gt;    cin &gt;&gt; x;&lt;br /&gt;    while(list-&gt;link-&gt;no!=x)&lt;br /&gt;     {&lt;br /&gt;   list=list-&gt;link;&lt;br /&gt;     }&lt;br /&gt;     list-&gt;link=list-&gt;link-&gt;link;&lt;br /&gt;     goto del;&lt;br /&gt;    case 4: display(first);&lt;br /&gt;    default : break;&lt;br /&gt;   }&lt;br /&gt;  case 3:  del1:&lt;br /&gt;    clrscr();&lt;br /&gt;    list=first;&lt;br /&gt;    while(1)&lt;br /&gt;   {&lt;br /&gt;     cout &lt;&lt; &quot;\nROLL NO :- &quot; &lt;&lt; list-&gt;no;&lt;br /&gt;     cout &lt;&lt; &quot;\nNAME    :- &quot; &lt;&lt; list-&gt;name;&lt;br /&gt;     if(list-&gt;link==NULL)&lt;br /&gt;   break;&lt;br /&gt;     list=list-&gt;link;&lt;br /&gt;   }&lt;br /&gt;   list=first;&lt;br /&gt;   cout &lt;&lt; &quot;\n\t\t\t 1. INSERT AT FIRST &quot;;&lt;br /&gt;   cout &lt;&lt; &quot;\n\t\t\t 2. INSERT AT LAST &quot;;&lt;br /&gt;   cout &lt;&lt; &quot;\n\t\t\t 3. INSERT IN BETWEEN &quot;;&lt;br /&gt;   cout &lt;&lt; &quot;\n\t\t\t 4. GO BACK &quot;;&lt;br /&gt;   cout &lt;&lt; &quot;\nEnter your choice :- &quot;;&lt;br /&gt;   cin &gt;&gt; ch;&lt;br /&gt;   switch(ch)&lt;br /&gt;   {&lt;br /&gt;    case 1:list=new stu;&lt;br /&gt;    cout &lt;&lt; &quot;\nEnter the roll no :- &quot;;&lt;br /&gt;    cin &gt;&gt; list-&gt;no;&lt;br /&gt;    cout &lt;&lt; &quot;\nEnter the name :- &quot;;&lt;br /&gt;    cin &gt;&gt; list-&gt;name;&lt;br /&gt;    list-&gt;link=first;&lt;br /&gt;    first=list;&lt;br /&gt;    goto del1;&lt;br /&gt;  case 2:list=first;&lt;br /&gt;  while(1)&lt;br /&gt;  {&lt;br /&gt;   if(list-&gt;link==NULL)&lt;br /&gt;   {&lt;br /&gt;    list-&gt;link=new stu;&lt;br /&gt;    list=list-&gt;link;&lt;br /&gt;     cout &lt;&lt; &quot;\nEnter the roll no :- &quot;;&lt;br /&gt;     cin &gt;&gt; list-&gt;no;&lt;br /&gt;     cout &lt;&lt; &quot;\nEnter the name :- &quot;;&lt;br /&gt;     cin &gt;&gt; list-&gt;name;&lt;br /&gt;     list-&gt;link=NULL;&lt;br /&gt;     goto del1;&lt;br /&gt;    }&lt;br /&gt;   else&lt;br /&gt;     list=list-&gt;link;&lt;br /&gt;  }&lt;br /&gt;  break;&lt;br /&gt;   case 3: list=first;&lt;br /&gt;    cout &lt;&lt; &quot;\nEnter the roll no before you want to insert :- &quot;;&lt;br /&gt;    cin &gt;&gt; x;&lt;br /&gt;    while(list-&gt;link-&gt;no!=x)&lt;br /&gt;    {&lt;br /&gt;  list=list-&gt;link;&lt;br /&gt;    }&lt;br /&gt;    temp=new stu;&lt;br /&gt;    temp-&gt;link=list-&gt;link;&lt;br /&gt;    list-&gt;link=temp;&lt;br /&gt;    list=list-&gt;link;&lt;br /&gt;    cout &lt;&lt; &quot;\nEnter the roll no :- &quot;;&lt;br /&gt;    cin &gt;&gt; list-&gt;no;&lt;br /&gt;    cout &lt;&lt; &quot;\nEnter the name :- &quot;;&lt;br /&gt;    cin &gt;&gt; list-&gt;name;&lt;br /&gt;    goto del1;&lt;br /&gt;  case 4:display(first);&lt;br /&gt;  break;&lt;br /&gt;    default :break;&lt;br /&gt;   }&lt;br /&gt;  case 4: list=first;&lt;br /&gt;   cout &lt;&lt; &quot;\nEnter the roll no to be found :- &quot;;&lt;br /&gt;   cin &gt;&gt; x;&lt;br /&gt;   int flag=0;&lt;br /&gt;   int i=1;&lt;br /&gt;   while(1)&lt;br /&gt;   {&lt;br /&gt;    if(list-&gt;no==x)&lt;br /&gt;    {&lt;br /&gt;  flag=1;&lt;br /&gt;  goto b;&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;     {&lt;br /&gt;   if(list-&gt;link==NULL)&lt;br /&gt;    {&lt;br /&gt;  flag=0;&lt;br /&gt;  goto b;&lt;br /&gt;    }&lt;br /&gt;     }&lt;br /&gt;     list=list-&gt;link;&lt;br /&gt;     i=i+1;&lt;br /&gt;   }&lt;br /&gt;   b:&lt;br /&gt;   if(flag==1)&lt;br /&gt;   {&lt;br /&gt;     cout &lt;&lt; &quot;\nThe key is found in position &quot;&lt;&lt; i;&lt;br /&gt;     sleep(1);&lt;br /&gt;     display(first);&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;     cout &lt;&lt; &quot;\nThe key is invalid !!! &quot;;&lt;br /&gt;     sleep(1);&lt;br /&gt;     display(first);&lt;br /&gt;    }&lt;br /&gt;   break;&lt;br /&gt;  case 5: clrscr();&lt;br /&gt;   list=first;&lt;br /&gt;   while(1)&lt;br /&gt;   {&lt;br /&gt;    cout &lt;&lt; &quot;\nROLL NO :-&quot;&lt;&lt; list-&gt;no;&lt;br /&gt;    cout &lt;&lt; &quot;\nNAME    :- &quot; &lt;&lt; list-&gt;name;&lt;br /&gt;    if(list-&gt;link==NULL)&lt;br /&gt;     break;&lt;br /&gt;    list=list-&gt;link;&lt;br /&gt;   }&lt;br /&gt;   cout &lt;&lt; &quot;\n\n\t\t\t PLEASE WAIT ... &quot;;&lt;br /&gt;   sleep(3);&lt;br /&gt;   display(first);&lt;br /&gt;  case 6: ex=1;return 0;&lt;br /&gt;  default : break;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt; clrscr();&lt;br /&gt; char ch;&lt;br /&gt; linkl a,b;&lt;br /&gt; a.getdata();&lt;br /&gt; cout &lt;&lt;  &quot;\nDo you want to create another linklist :- &quot;;&lt;br /&gt; cin &gt;&gt; ch;&lt;br /&gt; if(ch==&#39;n&#39;||ch==&#39;N&#39;)&lt;br /&gt;   return 0;&lt;br /&gt; b.getdata();&lt;br /&gt; cout &lt;&lt; &quot;\nDo you want to wrok with the previoue one :- &quot;;&lt;br /&gt; cin &gt;&gt; ch;&lt;br /&gt;  if(ch==&#39;n&#39;||ch==&#39;N&#39;)&lt;br /&gt;   return 0;&lt;br /&gt; a.display(a.first);&lt;br /&gt; getch();&lt;br /&gt; return 0;&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/1379739683060657115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/link-list-operation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/1379739683060657115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/1379739683060657115'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/link-list-operation.html' title='link list operation'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-2310579782344068660</id><published>2010-12-13T10:59:00.000-08:00</published><updated>2010-12-13T11:01:14.821-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="data structure"/><title type='text'>stack operation</title><content type='html'>&lt;span style=&quot;font-weight:bold;&quot;&gt;/* program to perfortm the following operation on stack&lt;br /&gt;1) push   2) pop  3)is empty  4)is full  5) peep */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;#include&lt;iostream.h&gt;&lt;br /&gt;void push();&lt;br /&gt;void pop();&lt;br /&gt;void peep();&lt;br /&gt;void isempty();&lt;br /&gt;void isfull();&lt;br /&gt;int max=20;&lt;br /&gt;int stack[20],top=-1;&lt;br /&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt; int choice=1;&lt;br /&gt; clrscr();&lt;br /&gt; while(choice)&lt;br /&gt;  {&lt;br /&gt; cout&lt;&lt;&quot;\n1.psuh     |&quot;;&lt;br /&gt; cout&lt;&lt;&quot;\n2.pop      |&quot;;&lt;br /&gt; cout&lt;&lt;&quot;\n3.peep     |&quot;;&lt;br /&gt; cout&lt;&lt;&quot;\n4.is empty:|&quot;;&lt;br /&gt; cout&lt;&lt;&quot;\n5.is full :|&quot;;&lt;br /&gt; cout&lt;&lt;&quot;\n0.exit     |&quot;;&lt;br /&gt; cout&lt;&lt;&quot;\nenter your choice ==&gt; &quot;;&lt;br /&gt; cin&gt;&gt;choice;&lt;br /&gt; switch(choice)&lt;br /&gt; {&lt;br /&gt;  case 1:&lt;br /&gt;       push();&lt;br /&gt;       break;&lt;br /&gt;  case 2:&lt;br /&gt;       pop();&lt;br /&gt;       break;&lt;br /&gt;  case 3:&lt;br /&gt;       peep();&lt;br /&gt;       break;&lt;br /&gt;  case 4:&lt;br /&gt;       isempty();&lt;br /&gt;       break;&lt;br /&gt;  case 5:&lt;br /&gt;       isfull();&lt;br /&gt;       break;&lt;br /&gt;  default:&lt;br /&gt;    cout&lt;&lt;&quot;\nwrong choice: \n&quot;;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;void push()&lt;br /&gt;    {&lt;br /&gt;	int pushed;&lt;br /&gt;      if(top==(max-1))&lt;br /&gt;	cout&lt;&lt;&quot;\n\t\tstack is over flow\n&quot;;&lt;br /&gt;      else&lt;br /&gt;	{&lt;br /&gt;	cout&lt;&lt;&quot; \n\t\tenter the element to push ==&gt; &quot;;&lt;br /&gt;	cin&gt;&gt;pushed;&lt;br /&gt;	top=top+1;&lt;br /&gt;	stack[top]=pushed;&lt;br /&gt;	}&lt;br /&gt;    }&lt;br /&gt; void pop()&lt;br /&gt;    {&lt;br /&gt;      if(top==-1)&lt;br /&gt;       cout&lt;&lt;&quot;\n\t\tstack is under flow \n&quot;;&lt;br /&gt;      else&lt;br /&gt;       {&lt;br /&gt;	cout&lt;&lt;&quot;\n\t\tpop value is ==&gt; &quot;&lt;&lt;stack[top]&lt;&lt;&quot;\n&quot;;&lt;br /&gt;	top=top-1;&lt;br /&gt;       }&lt;br /&gt;     }&lt;br /&gt; void peep()&lt;br /&gt;    {&lt;br /&gt;      int x;&lt;br /&gt;      cout&lt;&lt;&quot;\n\t\tenter element to display ==&gt; &quot;;&lt;br /&gt;      cin&gt;&gt;x;&lt;br /&gt;      cout&lt;&lt;&quot;\n\t\tyour element is ==&gt; &quot;&lt;&lt;stack[x];&lt;br /&gt;    }&lt;br /&gt; void isempty()&lt;br /&gt;    {&lt;br /&gt;       if(top==-1)&lt;br /&gt;       cout&lt;&lt;&quot;\n\t\tstack is empty &quot;;&lt;br /&gt;    }&lt;br /&gt;  void isfull()&lt;br /&gt;    {&lt;br /&gt;     if (top==max)&lt;br /&gt;       cout&lt;&lt;&quot;\n\t\tstack is full &quot;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/2310579782344068660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/stack-operation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/2310579782344068660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/2310579782344068660'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/stack-operation.html' title='stack operation'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-4306176083739833433</id><published>2010-12-13T10:55:00.000-08:00</published><updated>2010-12-13T10:56:48.624-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++ programing"/><title type='text'>print squre and cube</title><content type='html'>/*input two numbers and print squre and cube*/&lt;br /&gt;&lt;br /&gt;#include&lt;iostream.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;  clrscr();&lt;br /&gt;  cout&lt;&lt;&quot;enter value of x _&quot;;&lt;br /&gt;  int x,y;&lt;br /&gt;  cin&gt;&gt;x;&lt;br /&gt;  int sx=x*x;&lt;br /&gt;  int cx=x*x*x;&lt;br /&gt;  cout&lt;&lt;&quot;\n squre of x is ==&gt; &quot;&lt;&lt;sx;&lt;br /&gt;  cout&lt;&lt;&quot;\ncube of x is ==&gt; &quot;&lt;&lt;cx;&lt;br /&gt;  cout&lt;&lt;&quot;\n\n\nenter value of y _&quot;;&lt;br /&gt;  cin&gt;&gt;y;&lt;br /&gt;  int sy=y*y;&lt;br /&gt;  int cy=y*y*y;&lt;br /&gt;  cout&lt;&lt;&quot;\n squre of y is ==&gt; &quot;&lt;&lt;sy;&lt;br /&gt;  cout&lt;&lt;&quot;\ncube of y is ==&gt; &quot;&lt;&lt;cy;&lt;br /&gt;  getch();&lt;br /&gt;  }&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/4306176083739833433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/print-squre-and-cube.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/4306176083739833433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/4306176083739833433'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/print-squre-and-cube.html' title='print squre and cube'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-3793052016514770598</id><published>2010-12-13T10:42:00.000-08:00</published><updated>2010-12-13T10:46:02.586-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c programing"/><title type='text'>pattern_1</title><content type='html'>/* &lt;br /&gt;  1&lt;br /&gt;   22&lt;br /&gt;   333&lt;br /&gt;   4444&lt;br /&gt;   55555*/&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt; int i,j,n=5;&lt;br /&gt; clrscr();&lt;br /&gt; for(i=1;i&lt;=n;i++)&lt;br /&gt; {&lt;br /&gt;  for(j=1;j&lt;=i;j++)&lt;br /&gt;  {&lt;br /&gt;   printf(&quot;%d&quot;,j);&lt;br /&gt;  }&lt;br /&gt;  printf(&quot;\n&quot;);&lt;br /&gt; }&lt;br /&gt; getch();&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/3793052016514770598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern1_13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/3793052016514770598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/3793052016514770598'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/pattern1_13.html' title='pattern_1'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-8936526938044149788</id><published>2010-12-13T10:40:00.000-08:00</published><updated>2010-12-13T10:42:02.054-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c programing"/><title type='text'>check number is armstrong</title><content type='html'>//Enter one number and check it is armstrong no or not&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt; int no,i,r=0,d;&lt;br /&gt; clrscr();&lt;br /&gt; printf(&quot;\n Enter The No :- &quot;);&lt;br /&gt; scanf(&quot;%d&quot;,&amp;no);&lt;br /&gt; while(no&gt;0)&lt;br /&gt; {&lt;br /&gt;  d=no%10;&lt;br /&gt;  no=no/10;&lt;br /&gt;  r=r+(d*d*d);&lt;br /&gt; }&lt;br /&gt; if(r==0)&lt;br /&gt; {&lt;br /&gt;  printf(&quot;\n No is Armstrong&quot;);&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt;  printf(&quot;\n No Is Not Armstrong&quot;);&lt;br /&gt; }&lt;br /&gt; getch();&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/8936526938044149788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/check-number-is-armstrong.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/8936526938044149788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/8936526938044149788'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/check-number-is-armstrong.html' title='check number is armstrong'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-5994497306090050536</id><published>2010-12-13T10:38:00.000-08:00</published><updated>2010-12-13T10:39:33.311-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c programing"/><title type='text'>prime number</title><content type='html'>/* except one no from user and find it is prime or not */&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;&lt;br /&gt;void main()&lt;br /&gt; {&lt;br /&gt;   int i=2,n;&lt;br /&gt;   clrscr();&lt;br /&gt;    printf(&quot;enter no:-&quot;);&lt;br /&gt;    scanf(&quot;%d&quot;,&amp;n);&lt;br /&gt;    while(i&lt;=n-1)&lt;br /&gt;    {&lt;br /&gt; if(n%i==0)&lt;br /&gt; {&lt;br /&gt;  printf(&quot;no is NOT prime&quot;);&lt;br /&gt;  break;&lt;br /&gt;  }&lt;br /&gt;      i++ ;&lt;br /&gt;    }&lt;br /&gt;    if(i==n)&lt;br /&gt;    {&lt;br /&gt;      printf(&quot;no is prime&quot;);&lt;br /&gt;    }&lt;br /&gt;  getch();&lt;br /&gt;  }</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/5994497306090050536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/prime-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/5994497306090050536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/5994497306090050536'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/prime-number.html' title='prime number'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-3522092586299522518</id><published>2010-12-13T10:37:00.002-08:00</published><updated>2010-12-13T10:38:47.235-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c programing"/><title type='text'>factorial number</title><content type='html'>/*except one no from user and display its factorial*/&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;&lt;br /&gt;void main()&lt;br /&gt; {&lt;br /&gt;     int no,i,fact=1;&lt;br /&gt;     clrscr();&lt;br /&gt;     printf(&quot;\n Enter The No :- &quot;);&lt;br /&gt;     scanf(&quot;%d&quot;,&amp;no);&lt;br /&gt;       for(i=no;i&gt;=1;i--)&lt;br /&gt;  {&lt;br /&gt;   fact=fact*i;&lt;br /&gt;    }&lt;br /&gt;     printf(&quot;\n factorial of this number is :- %d&quot;,fact);&lt;br /&gt;     getch();&lt;br /&gt; }</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/3522092586299522518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/factorial-number.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/3522092586299522518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/3522092586299522518'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/factorial-number.html' title='factorial number'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-3751869413767300867</id><published>2010-12-13T10:37:00.001-08:00</published><updated>2010-12-13T10:37:47.813-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c programing"/><title type='text'>sum of each digit</title><content type='html'>*/ except one no from user and display sum of each digit */&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;&lt;br /&gt;void main()&lt;br /&gt; {&lt;br /&gt;     int no,d,sum=0;&lt;br /&gt;     clrscr();&lt;br /&gt;     printf(&quot;\n Enter The No :- &quot;);&lt;br /&gt;     scanf(&quot;%d&quot;,&amp;no);&lt;br /&gt; while(no&gt;0)&lt;br /&gt;    {&lt;br /&gt;       d=no%10;&lt;br /&gt;       no=no/10;&lt;br /&gt;       sum=sum+d;&lt;br /&gt;    }&lt;br /&gt;     printf(&quot;\n The Sum Digit :- %d&quot;,sum);&lt;br /&gt;     getch();&lt;br /&gt; }</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/3751869413767300867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/sum-of-each-digit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/3751869413767300867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/3751869413767300867'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/sum-of-each-digit.html' title='sum of each digit'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-25107619470831563</id><published>2010-12-13T10:32:00.000-08:00</published><updated>2010-12-13T10:33:29.807-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c programing"/><title type='text'>reverse of number</title><content type='html'>/* except one no from user and display reverse of it.*/&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;&lt;br /&gt;void main()&lt;br /&gt; {&lt;br /&gt;   long int no,d,rev=0;&lt;br /&gt;     clrscr();&lt;br /&gt;     printf(&quot;\n Enter The No :- &quot;);&lt;br /&gt;     scanf(&quot;%ld&quot;,&amp;no);&lt;br /&gt;     while(no&gt;0)&lt;br /&gt; {&lt;br /&gt;     d=no%10;&lt;br /&gt;     no=no/10;&lt;br /&gt;     rev=d+(rev*10);&lt;br /&gt; }&lt;br /&gt; printf(&quot;\n Reverse No Is :- %ld&quot;,rev);&lt;br /&gt; getch();&lt;br /&gt; }</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/25107619470831563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/reverse-of-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/25107619470831563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/25107619470831563'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/reverse-of-number.html' title='reverse of number'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-7338859107238641475</id><published>2010-12-13T10:30:00.000-08:00</published><updated>2010-12-13T10:31:14.178-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c programing"/><title type='text'>print the total of 1-2+3-4+5-6+7-8+9-10...</title><content type='html'>/* print the total of 1-2+3-4+5-6+7-8+9-10 */&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;    int i,sum=0;&lt;br /&gt;    clrscr();&lt;br /&gt;    for(i=1;i&lt;=10;i++)&lt;br /&gt; {&lt;br /&gt;    if(i==1)&lt;br /&gt;        {&lt;br /&gt;    printf(&quot;%d&quot;,i);&lt;br /&gt;    sum=sum+i;&lt;br /&gt;        }&lt;br /&gt;   else if(i%2==0)&lt;br /&gt;       {&lt;br /&gt;    printf(&quot;-%d&quot;,i);&lt;br /&gt;    sum=sum-i;&lt;br /&gt;       }&lt;br /&gt;   else&lt;br /&gt;      {&lt;br /&gt;    printf(&quot;+%d&quot;,i);&lt;br /&gt;   sum=sum+i;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; printf(&quot;\n Total = %d&quot;,sum);&lt;br /&gt; getch();&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/7338859107238641475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/print-total-of-1-23-45-67-89-10.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/7338859107238641475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/7338859107238641475'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/print-total-of-1-23-45-67-89-10.html' title='print the total of 1-2+3-4+5-6+7-8+9-10...'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-6699732664717438642</id><published>2010-12-13T10:29:00.000-08:00</published><updated>2010-12-13T10:30:02.999-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c programing"/><title type='text'>print the total of 1/2 + 2/3+......+9/10. ...</title><content type='html'>/* print the total of 1/2 + 2/3+......+9/10. */&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt; float i=1,j=2;&lt;br /&gt; float tot=0;&lt;br /&gt; clrscr();&lt;br /&gt; while(i&lt;10)&lt;br /&gt; {&lt;br /&gt;      tot=tot+(i/j);&lt;br /&gt;      printf(&quot;\n%f&quot;,i/j);&lt;br /&gt;      i++;&lt;br /&gt;      j++;&lt;br /&gt; }&lt;br /&gt; printf(&quot;\nsum is %f&quot;,tot);&lt;br /&gt; getch();&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/6699732664717438642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/print-total-of-12-23910.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/6699732664717438642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/6699732664717438642'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/print-total-of-12-23910.html' title='print the total of 1/2 + 2/3+......+9/10. ...'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-6468540667794247110</id><published>2010-12-13T10:28:00.001-08:00</published><updated>2010-12-13T10:28:49.816-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c programing"/><title type='text'>print 2,11,20,28,35,41,46,50,53,55,56...</title><content type='html'>/* print 2,11,20,28,35,41,46,50,53,55,56 */&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;   void main()&lt;br /&gt;   {&lt;br /&gt;       int i=1,gap,sum=0;&lt;br /&gt;       clrscr();&lt;br /&gt;       sum=1;&lt;br /&gt;       gap=10;&lt;br /&gt;       for(i=1;i&lt;=11;i++)&lt;br /&gt;    {&lt;br /&gt;        printf(&quot;\n %d&quot;,sum);&lt;br /&gt;        sum=gap+sum;&lt;br /&gt;        gap--;&lt;br /&gt;     }&lt;br /&gt;       getch();&lt;br /&gt;   }</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/6468540667794247110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/print-211202835414650535556.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/6468540667794247110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/6468540667794247110'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/print-211202835414650535556.html' title='print 2,11,20,28,35,41,46,50,53,55,56...'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-201901024372824034.post-3134515683188221671</id><published>2010-12-13T10:26:00.000-08:00</published><updated>2010-12-13T10:27:54.001-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c programing"/><title type='text'>print 1,10,2,9,3,8,4,7,5,6...</title><content type='html'>/* print 1,10,2,9,3,8,4,7,5,6 /*&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;   void main()&lt;br /&gt;   {&lt;br /&gt;       int j,i=1;&lt;br /&gt;       clrscr();&lt;br /&gt;       printf(&quot;enter number: &quot;);&lt;br /&gt;       scanf(&quot;%d&quot;,&amp;j);&lt;br /&gt;       for(i=1;i&lt;=j;i++,j--)&lt;br /&gt;    {&lt;br /&gt;        printf(&quot; %d %d&quot;,i,j);&lt;br /&gt;&lt;br /&gt;     }&lt;br /&gt;       getch();&lt;br /&gt;   }</content><link rel='replies' type='application/atom+xml' href='http://myprograming.blogspot.com/feeds/3134515683188221671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myprograming.blogspot.com/2010/12/print-11029384756.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/3134515683188221671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/201901024372824034/posts/default/3134515683188221671'/><link rel='alternate' type='text/html' href='http://myprograming.blogspot.com/2010/12/print-11029384756.html' title='print 1,10,2,9,3,8,4,7,5,6...'/><author><name>hemant</name><uri>http://www.blogger.com/profile/03457535149080824783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1RM3LdhzQsfmBtViT-qAvRy6XoFOTVDAc9H8YEJgBI-a9J_OhMk7b25jS1CAaYz_vBeby29OPUyOh5inMpIeODxF2HVhd0xKB4gLyKsFtHOHLCiP_j5fPrWByL5SVQ/s220/Untitled2.jpg'/></author><thr:total>2</thr:total></entry></feed>