<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>8051 microcontroller tutorial</title><description>This blog shows you how to write embedded C programs to 8051 family microcontrollers using KEIL compiler. It also discusses C and C++ projects, trending Arduino Board, Automation, AI &amp;amp; Robotics.</description><managingEditor>noreply@blogger.com (belgaumboy)</managingEditor><pubDate>Mon, 24 Aug 2026 00:00:00 +0530</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">582</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://8051microcontrollertutorial.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>This blog shows you how to write embedded C programs to 8051 family microcontrollers using KEIL compiler. It also discusses C and C++ projects, trending Arduino Board, Automation, AI &amp;amp; Robotics.</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>Printing Hollow Diamond in C | Advanced Shape Patterns</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/printing-hollow-diamond-in-c.html</link><category>CCode</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Mon, 24 Aug 2026 00:00:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-3124187596348802411</guid><description>&lt;p style="text-align: justify;"&gt;&lt;span data-path-to-node="1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;The hollow diamond pattern is a classic logic-building exercise in C programming&lt;/span&gt;&lt;span data-path-to-node="1,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;/span&gt;&lt;span data-path-to-node="1,2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;. Unlike solid shape patterns, printing a hollow structure requires combining space management, structural symmetry, and conditional boundary checks (&lt;code data-index-in-node="150" data-path-to-node="1,2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;if-else&lt;/code&gt; statements) within nested loops&lt;/span&gt;&lt;span data-path-to-node="1,3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;/span&gt;&lt;span data-path-to-node="1,4" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="1" id="p-rc_96ac87b57515bd33-340" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h2 data-path-to-node="2,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;Introduction&lt;/h2&gt;&lt;span data-path-to-node="2,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;p data-path-to-node="3" id="p-rc_96ac87b57515bd33-341" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;&lt;span data-path-to-node="3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Constructing a hollow diamond involves dividing the pattern into two symmetrical phases—an upper growing pyramid and a lower shrinking pyramid&lt;/span&gt;&lt;span data-path-to-node="3,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="3,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;. The key challenge lies in replacing inner asterisks with spaces while ensuring the outer perimeter remains intact&lt;/span&gt;&lt;span data-path-to-node="3,3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="3,4" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;. This tutorial breaks down the mathematical logic, provides a full C implementation, and analyzes its performance complexity&lt;/span&gt;&lt;span data-path-to-node="3,5" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="3,6" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;ul data-path-to-node="4" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="4,0,0" id="p-rc_96ac87b57515bd33-342" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="4,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="4,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Prerequisites&lt;/b&gt;: Proficiency in nested &lt;code data-index-in-node="37" data-path-to-node="4,0,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/code&gt; loops, conditional logic (&lt;code data-index-in-node="67" data-path-to-node="4,0,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;if-else&lt;/code&gt;), standard input/output (&lt;code data-index-in-node="100" data-path-to-node="4,0,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/code&gt;, &lt;code data-index-in-node="108" data-path-to-node="4,0,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;scanf&lt;/code&gt;), and arithmetic operations&lt;/span&gt;&lt;span data-path-to-node="4,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="4,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="4,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="4,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Expected Output&lt;/b&gt;:&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-82 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-82 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQ8QE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_0167a2e81845ee14&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_96ac87b57515bd33&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-82" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-82" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-82 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="buttons ng-tns-c3578594610-82 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;nbsp; &amp;nbsp; *&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3578594610="" class="ng-tns-c3578594610-82" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3578594610="" class="code-container formatted ng-tns-c3578594610-82" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;   * *
  *   *
 *     *
*       *
 *     *
  *   *
   * *
    *
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="6" id="p-rc_96ac87b57515bd33-343" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h2 data-path-to-node="7,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Deconstructing the Pattern Logic&lt;/h2&gt;&lt;span data-path-to-node="7,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;p data-path-to-node="8" id="p-rc_96ac87b57515bd33-344" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="8,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;For an upper-half height of &lt;span class="math-inline" data-index-in-node="28" data-math="n" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$n$&lt;/span&gt;, the total height of the shape is &lt;span class="math-inline" data-index-in-node="64" data-math="2n - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2n - 1&lt;/span&gt;&amp;nbsp;rows&lt;/span&gt;&lt;span data-path-to-node="8,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;. We split the rendering logic into two phases&lt;/span&gt;&lt;span data-path-to-node="8,3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,4" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;:&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h3 data-path-to-node="9,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Phase 1: Upper Hollow Pyramid (&lt;span class="math-inline" data-index-in-node="31" data-math="i = 1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i = 1&lt;/span&gt;&amp;nbsp;to &lt;span class="math-inline" data-index-in-node="40" data-math="n" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;n&lt;/span&gt;)&lt;/h3&gt;&lt;span data-path-to-node="9,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="10" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="10,0,0" id="p-rc_96ac87b57515bd33-345" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="10,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="10,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Leading Spaces&lt;/b&gt;: Decreases each row (&lt;span class="math-inline" data-index-in-node="36" data-math="n - i" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;n - i&lt;/span&gt;)&lt;/span&gt;&lt;span data-path-to-node="10,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="10,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="10,1,0" id="p-rc_96ac87b57515bd33-346" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="10,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="10,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Boundary Condition&lt;/b&gt;: Print &lt;code data-index-in-node="26" data-path-to-node="10,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;*&lt;/code&gt; only at the first (&lt;span class="math-inline" data-index-in-node="47" data-math="j = 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;j = 1&lt;/span&gt;) and last (&lt;span class="math-inline" data-index-in-node="64" data-math="j = 2i - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;j = 2i - 1&lt;/span&gt;) column positions&lt;/span&gt;&lt;span data-path-to-node="10,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="10,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;. Fill all intermediate positions (&lt;span class="math-inline" data-index-in-node="35" data-math="1 &amp;lt; j &amp;lt; 2i - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1 &amp;lt; j &amp;lt; 2i - 1&lt;/span&gt;) with empty spaces&lt;/span&gt;&lt;span data-path-to-node="10,1,0,3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="10,1,0,4" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-path-to-node="11,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Phase 2: Lower Inverted Hollow Pyramid (&lt;span class="math-inline" data-index-in-node="40" data-math="i = 1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i = 1&lt;/span&gt;&amp;nbsp;to &lt;span class="math-inline" data-index-in-node="49" data-math="n - 1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;n - 1&lt;/span&gt;)&lt;/h3&gt;&lt;span data-path-to-node="11,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="12" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="12,0,0" id="p-rc_96ac87b57515bd33-347" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="12,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="12,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Leading Spaces&lt;/b&gt;: Increases each row (&lt;span class="math-inline" data-index-in-node="36" data-math="i" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/span&gt;)&lt;/span&gt;&lt;span data-path-to-node="12,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="12,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="12,1,0" id="p-rc_96ac87b57515bd33-348" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="12,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="12,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Boundary Condition&lt;/b&gt;: Print &lt;code data-index-in-node="26" data-path-to-node="12,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;*&lt;/code&gt; only at the first (&lt;span class="math-inline" data-index-in-node="47" data-math="j = 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;j = 1&lt;/span&gt;) and last (&lt;span class="math-inline" data-index-in-node="64" data-math="j = 2(n - i) - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;j = 2(n - i) - 1&lt;/span&gt;) column positions&lt;/span&gt;&lt;span data-path-to-node="12,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="12,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;. Fill intermediate positions with spaces&lt;/span&gt;&lt;span data-path-to-node="12,1,0,3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="12,1,0,4" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;table data-path-to-node="13" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-bottom: 32px; margin-top: 0px !important;"&gt;&lt;thead style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Row Index&lt;/strong&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Phase&lt;/strong&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Leading Spaces&lt;/strong&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Star Indices (j)&lt;/strong&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Inner Spaces&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,1,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Upper&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,1,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,1,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,1,4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,2,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Upper&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,2,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,2,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1, 3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,2,4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,3,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Upper&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,3,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,3,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1, 5&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,3,4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,4,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,4,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Upper&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,4,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,4,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1, 7&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,4,4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;5&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,5,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;5 (Center)&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,5,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Upper&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,5,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,5,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1, 9&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,5,4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;7&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,6,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1 (Row 6)&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,6,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Lower&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,6,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,6,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1, 7&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,6,4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;5&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,7,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2 (Row 7)&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Lower&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,7,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,7,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1, 5&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,7,4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,8,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3 (Row 8)&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,8,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Lower&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,8,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,8,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1, 3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,8,4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,9,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4 (Row 9)&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,9,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Lower&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,9,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,9,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,9,4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 data-path-to-node="14,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation&lt;/h2&gt;&lt;span data-path-to-node="14,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-83 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-83 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQ-gE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_0167a2e81845ee14&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_96ac87b57515bd33&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-83" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-83" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-83 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="buttons ng-tns-c3578594610-83 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3578594610="" class="ng-tns-c3578594610-83" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3578594610="" class="code-container formatted ng-tns-c3578594610-83" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n, i, j, space;

    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Enter the number of rows for upper half: "&lt;/span&gt;);
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; (&lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;scanf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%d"&lt;/span&gt;, &amp;amp;n) != &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt; || n &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;) {
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Invalid input. Please enter a positive integer.\n"&lt;/span&gt;);
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;;
    }

    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Phase 1: Upper Hollow Pyramid (Rows 1 to n)&lt;/span&gt;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print leading spaces&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (space = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; space &amp;lt;= n - i; space++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
        }
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print boundary asterisks and inner spaces&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * i - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); j++) {
            &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; (j == &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt; || j == (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * i - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;)) {
                &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"*"&lt;/span&gt;);
            } &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;else&lt;/span&gt; {
                &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
            }
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }

    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Phase 2: Lower Inverted Hollow Pyramid (Rows 1 to n - 1)&lt;/span&gt;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i++) {
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print leading spaces&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (space = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; space &amp;lt;= i; space++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
        }
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print boundary asterisks and inner spaces&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * (n - i) - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); j++) {
            &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; (j == &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt; || j == (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * (n - i) - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;)) {
                &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"*"&lt;/span&gt;);
            } &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;else&lt;/span&gt; {
                &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
            }
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }

    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="16" id="p-rc_96ac87b57515bd33-349" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h3 data-path-to-node="17,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Breakdown&lt;/h3&gt;&lt;span data-path-to-node="17,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="18" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,0,0" id="p-rc_96ac87b57515bd33-350" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Boundary Checks&lt;/b&gt;: The condition &lt;code data-index-in-node="31" data-path-to-node="18,0,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j == 1 || j == (2 * i - 1)&lt;/code&gt; restricts character printing solely to the edges of the shape, creating the hollow interior&lt;/span&gt;&lt;span data-path-to-node="18,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,1,0" id="p-rc_96ac87b57515bd33-351" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Phase Split&lt;/b&gt;: Executing Phase 2 up to &lt;span class="math-inline" data-index-in-node="37" data-math="n - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;n - 1&lt;/span&gt;&amp;nbsp;prevents duplicating the central apex line&lt;/span&gt;&lt;span data-path-to-node="18,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,2,0" id="p-rc_96ac87b57515bd33-352" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Row Transition&lt;/b&gt;: &lt;code data-index-in-node="16" data-path-to-node="18,2,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf("\n");&lt;/code&gt; ensures proper line breaks after completing each horizontal scan line&lt;/span&gt;&lt;span data-path-to-node="18,2,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,2,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="19,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Compiling and Execution&lt;/h2&gt;&lt;span data-path-to-node="19,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;p data-path-to-node="20" id="p-rc_96ac87b57515bd33-353" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="20,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Compile and execute using GCC&lt;/span&gt;&lt;span data-path-to-node="20,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="20,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;:&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-84 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-84 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQgAI" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_0167a2e81845ee14&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_96ac87b57515bd33&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-84" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-84" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-84 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="22" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Console Output&lt;/b&gt;:&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code-block&gt;&lt;/response-element&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-85 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-85 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQgQI" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_0167a2e81845ee14&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_96ac87b57515bd33&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-85" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-85" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-85 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="buttons ng-tns-c3578594610-85 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;br /&gt;&lt;gem-icon-button _ngcontent-ng-c3578594610="" _nghost-ng-c2501665546="" aria-describedby="cdk-describedby-message-ng-1-17" arialabel="Copy code" cdk-describedby-host="ng-1" class="mat-mdc-tooltip-trigger copy-button ng-tns-c3578594610-85 gem-button gem-button-badge-size-small gem-button-size-small gem-button-type-on-surface lm-enabled ng-star-inserted" data-test-id="gem-copy-button" fonticonname="copy" gemtooltip="Copy code" size="small" style="line-height: 1.15 !important; margin-top: 0px !important;" tabindex="-1" theme="lm" type="onSurface"&gt;&lt;!----&gt;&lt;!----&gt;&lt;/gem-icon-button&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;pre _ngcontent-ng-c3578594610="" class="ng-tns-c3578594610-85" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3578594610="" class="code-container formatted ng-tns-c3578594610-85" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Enter the number of rows for upper half: 5
    *
   * *
  *   *
 *     *
*       *
 *     *
  *   *
   * *
    *
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="24" id="p-rc_96ac87b57515bd33-354" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h2 data-path-to-node="25,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Common Mistakes &amp;amp; Troubleshooting&lt;/h2&gt;&lt;span data-path-to-node="25,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="26" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="26,0,0" id="p-rc_96ac87b57515bd33-355" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="26,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="26,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Filling the Interior&lt;/b&gt;: Omitting conditional statements within the character loop results in a standard solid diamond rather than a hollow outline&lt;/span&gt;&lt;span data-path-to-node="26,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="26,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="26,1,0" id="p-rc_96ac87b57515bd33-356" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="26,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="26,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Off-by-One Boundary Errors&lt;/b&gt;: Checking &lt;code data-index-in-node="37" data-path-to-node="26,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j == i&lt;/code&gt; instead of &lt;code data-index-in-node="55" data-path-to-node="26,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j == (2 * i - 1)&lt;/code&gt; distorts the right boundary line&lt;/span&gt;&lt;span data-path-to-node="26,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="26,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="27,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Complexity Analysis&lt;/h2&gt;&lt;span data-path-to-node="27,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="28" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="28,0,0" id="p-rc_96ac87b57515bd33-357" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="28,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="28,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Time Complexity&lt;/b&gt;: &lt;span class="math-inline" data-index-in-node="17" data-math="O(n^2)" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;O(n^2)&lt;/span&gt;&amp;nbsp;due to nested space allocation and character loops across &lt;span class="math-inline" data-index-in-node="82" data-math="2n - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2n - 1&lt;/span&gt;&amp;nbsp;total iterations&lt;/span&gt;&lt;span data-path-to-node="28,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="28,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="28,1,0" id="p-rc_96ac87b57515bd33-358" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="28,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="28,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Space Complexity&lt;/b&gt;: &lt;span class="math-inline" data-index-in-node="18" data-math="O(1)" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;O(1)&lt;/span&gt;&amp;nbsp;auxiliary memory since only scalar integer counters are used&lt;/span&gt;&lt;span data-path-to-node="28,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="28,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="29,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Conclusion&lt;/h2&gt;&lt;span data-path-to-node="29,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;p data-path-to-node="30" id="p-rc_96ac87b57515bd33-359" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;&lt;span data-path-to-node="30,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Combining boundary conditions with multi-phase nested loops provides a foundational technique for rendering custom graphical boundaries in terminal applications&lt;/span&gt;&lt;span data-path-to-node="30,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="30,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="30" id="p-rc_96ac87b57515bd33-359" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="30,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b id="docs-internal-guid-5a2177ad-7fff-2d9b-6fe1-fedd72f892c1" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial,sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span style="-webkit-text-decoration-skip: none; background-color: transparent; color: #1155cc; font-family: Arial,sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap; white-space: pre;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial,sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="30" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="30,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial,sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Printing Solid Diamond in C | Advanced Shape Patterns</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/printing-solid-diamond-in-c.html</link><category>CCode</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Sun, 23 Aug 2026 00:00:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-3639948541683444825</guid><description>&lt;p style="text-align: justify;"&gt;&lt;span data-path-to-node="1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;The solid diamond pattern combines two fundamental symmetric structures: an upper full pyramid and a lower inverted full pyramid&lt;/span&gt;&lt;span data-path-to-node="1,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;/span&gt;&lt;span data-path-to-node="1,2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;. Mastering this shape sharpens your ability to design multi-phase loop structures, manage symmetrical alignment, and sequence mathematical boundaries&lt;/span&gt;&lt;span data-path-to-node="1,3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;/span&gt;&lt;span data-path-to-node="1,4" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="1" id="p-rc_a8b3608c24c23dcb-320" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h2 data-path-to-node="2,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Introduction&lt;/h2&gt;&lt;span data-path-to-node="2,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;p data-path-to-node="3" id="p-rc_a8b3608c24c23dcb-321" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;&lt;span data-path-to-node="3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Building a solid diamond pattern requires splitting the shape into two distinct halves: a growing upper section and a shrinking lower section&lt;/span&gt;&lt;span data-path-to-node="3,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="3,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;. This tutorial breaks down the mathematical relationships between row indexes, space padding, and asterisk counts, providing a complete C source implementation and execution breakdown&lt;/span&gt;&lt;span data-path-to-node="3,3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="3,4" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;ul data-path-to-node="4" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="4,0,0" id="p-rc_a8b3608c24c23dcb-322" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="4,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="4,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Prerequisites&lt;/b&gt;: Knowledge of nested &lt;code data-index-in-node="35" data-path-to-node="4,0,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/code&gt; loops, standard input/output functions (&lt;code data-index-in-node="79" data-path-to-node="4,0,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/code&gt;, &lt;code data-index-in-node="87" data-path-to-node="4,0,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;scanf&lt;/code&gt;), and basic conditional statements&lt;/span&gt;&lt;span data-path-to-node="4,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="4,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="4,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="4,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Expected Output&lt;/b&gt;:&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-78 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-78 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQ1gE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_3347dff42e935d3f&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_a8b3608c24c23dcb&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-78" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-78" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-78 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="buttons ng-tns-c3578594610-78 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;nbsp; &amp;nbsp; *&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3578594610="" class="ng-tns-c3578594610-78" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3578594610="" class="code-container formatted ng-tns-c3578594610-78" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;   ***
  *****
 *******
*********
 *******
  *****
   ***
    *
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="6" id="p-rc_a8b3608c24c23dcb-323" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h2 data-path-to-node="7,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Deconstructing the Pattern Logic&lt;/h2&gt;&lt;span data-path-to-node="7,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;p data-path-to-node="8" id="p-rc_a8b3608c24c23dcb-324" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="8,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;For an upper-half height of &lt;span class="math-inline" data-index-in-node="28" data-math="n" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$n$&lt;/span&gt;, the total height of the diamond is &lt;span class="math-inline" data-index-in-node="66" data-math="2n - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2n - 1&lt;/span&gt;&amp;nbsp;rows&lt;/span&gt;&lt;span data-path-to-node="8,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;. The program executes in two sequential loop phases&lt;/span&gt;&lt;span data-path-to-node="8,3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,4" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;:&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h3 data-path-to-node="9,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Phase 1: Upper Pyramid (&lt;span class="math-inline" data-index-in-node="24" data-math="i = 1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i = 1&lt;/span&gt;&amp;nbsp;to &lt;span class="math-inline" data-index-in-node="33" data-math="n" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;n&lt;/span&gt;)&lt;/h3&gt;&lt;span data-path-to-node="9,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="10" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="10,0,0" id="p-rc_a8b3608c24c23dcb-325" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="10,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="10,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Leading Spaces&lt;/b&gt;: Decreases each row (&lt;span class="math-inline" data-index-in-node="36" data-math="n - i" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$n - i$&lt;/span&gt;)&lt;/span&gt;&lt;span data-path-to-node="10,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="10,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="10,1,0" id="p-rc_a8b3608c24c23dcb-326" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="10,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="10,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Asterisks&lt;/b&gt;: Increases in odd increments (&lt;span class="math-inline" data-index-in-node="40" data-math="2i - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$2i - 1$&lt;/span&gt;)&lt;/span&gt;&lt;span data-path-to-node="10,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="10,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-path-to-node="11,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Phase 2: Lower Inverted Pyramid (&lt;span class="math-inline" data-index-in-node="33" data-math="i = 1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i = 1&lt;/span&gt;&amp;nbsp;to &lt;span class="math-inline" data-index-in-node="42" data-math="n - 1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;n - 1&lt;/span&gt;)&lt;/h3&gt;&lt;span data-path-to-node="11,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="12" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="12,0,0" id="p-rc_a8b3608c24c23dcb-327" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="12,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="12,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Leading Spaces&lt;/b&gt;: Increases each row (&lt;span class="math-inline" data-index-in-node="36" data-math="i" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/span&gt;)&lt;/span&gt;&lt;span data-path-to-node="12,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="12,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="12,1,0" id="p-rc_a8b3608c24c23dcb-328" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="12,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="12,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Asterisks&lt;/b&gt;: Decreases in odd increments (&lt;span class="math-inline" data-index-in-node="40" data-math="2(n - i) - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2(n - i) - 1&lt;/span&gt;)&lt;/span&gt;&lt;span data-path-to-node="12,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="12,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;table data-path-to-node="13" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-bottom: 32px; margin-top: 0px !important;"&gt;&lt;thead style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Row Index&lt;/strong&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Phase&lt;/strong&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Leading Spaces&lt;/strong&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Asterisks&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,1,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Upper&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,1,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,1,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,2,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Upper&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,2,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,2,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,3,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Upper&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,3,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,3,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;5&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,4,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,4,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Upper&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,4,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,4,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;7&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,5,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;5 (Center)&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,5,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Upper&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,5,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,5,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;9&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,6,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1 (Row 6)&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,6,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Lower&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,6,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,6,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;7&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,7,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2 (Row 7)&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Lower&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,7,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,7,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;5&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,8,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3 (Row 8)&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,8,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Lower&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,8,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,8,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,9,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4 (Row 9)&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,9,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Lower&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,9,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="13,9,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 data-path-to-node="14,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation&lt;/h2&gt;&lt;span data-path-to-node="14,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-79 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-79 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQ3wE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_3347dff42e935d3f&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_a8b3608c24c23dcb&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-79" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-79" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-79 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="buttons ng-tns-c3578594610-79 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;br /&gt;&lt;gem-icon-button _ngcontent-ng-c3578594610="" _nghost-ng-c2501665546="" aria-describedby="cdk-describedby-message-ng-1-17" arialabel="Copy code" cdk-describedby-host="ng-1" class="mat-mdc-tooltip-trigger copy-button ng-tns-c3578594610-79 gem-button gem-button-badge-size-small gem-button-size-small gem-button-type-on-surface lm-enabled ng-star-inserted" data-test-id="gem-copy-button" fonticonname="copy" gemtooltip="Copy code" size="small" style="line-height: 1.15 !important; margin-top: 0px !important;" tabindex="-1" theme="lm" type="onSurface"&gt;&lt;!----&gt;&lt;!----&gt;&lt;/gem-icon-button&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;pre _ngcontent-ng-c3578594610="" class="ng-tns-c3578594610-79" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3578594610="" class="code-container formatted ng-tns-c3578594610-79" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-meta" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n, i, j, space;

    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Enter the number of rows for upper half: "&lt;/span&gt;);
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; (&lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;scanf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%d"&lt;/span&gt;, &amp;amp;n) != &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt; || n &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;) {
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Invalid input. Please enter a positive integer.\n"&lt;/span&gt;);
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;;
    }

    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Phase 1: Upper Full Pyramid (Rows 1 to n)&lt;/span&gt;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print leading spaces&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (space = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; space &amp;lt;= n - i; space++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
        }
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print asterisks&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * i - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"*"&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }

    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Phase 2: Lower Inverted Pyramid (Rows 1 to n - 1)&lt;/span&gt;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i++) {
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print leading spaces&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (space = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; space &amp;lt;= i; space++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
        }
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print asterisks&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * (n - i) - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"*"&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }

    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="16" id="p-rc_a8b3608c24c23dcb-329" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h3 data-path-to-node="17,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Breakdown&lt;/h3&gt;&lt;span data-path-to-node="17,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="18" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,0,0" id="p-rc_a8b3608c24c23dcb-330" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Upper Loop Phase&lt;/b&gt;: Handles rows &lt;span class="math-inline" data-index-in-node="31" data-math="1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&amp;nbsp;through &lt;span class="math-inline" data-index-in-node="41" data-math="n" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;n&lt;/span&gt;, expanding asterisks to construct the widest middle line&lt;/span&gt;&lt;span data-path-to-node="18,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,1,0" id="p-rc_a8b3608c24c23dcb-331" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Lower Loop Phase&lt;/b&gt;: Runs &lt;span class="math-inline" data-index-in-node="23" data-math="n - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;n - 1&lt;/span&gt;&amp;nbsp;times to avoid repeating the maximum width row, contracting asterisks down to a single vertex&lt;/span&gt;&lt;span data-path-to-node="18,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,2,0" id="p-rc_a8b3608c24c23dcb-332" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Row Formatting&lt;/b&gt;: &lt;code data-index-in-node="16" data-path-to-node="18,2,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf("\n");&lt;/code&gt; breaks lines after each iteration of the outer loops&lt;/span&gt;&lt;span data-path-to-node="18,2,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,2,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="19,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Compiling and Execution&lt;/h2&gt;&lt;span data-path-to-node="19,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;p data-path-to-node="20" id="p-rc_a8b3608c24c23dcb-333" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="20,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Compile and execute using standard GCC tooling&lt;/span&gt;&lt;span data-path-to-node="20,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="20,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;:&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-80 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-80 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQ5QE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_3347dff42e935d3f&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_a8b3608c24c23dcb&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-80" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-80" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-80 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="22" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Console Output&lt;/b&gt;:&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code-block&gt;&lt;/response-element&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-81 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-81 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQ5gE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_3347dff42e935d3f&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_a8b3608c24c23dcb&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-81" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-81" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-81 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="buttons ng-tns-c3578594610-81 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;br /&gt;&lt;gem-icon-button _ngcontent-ng-c3578594610="" _nghost-ng-c2501665546="" aria-describedby="cdk-describedby-message-ng-1-17" arialabel="Copy code" cdk-describedby-host="ng-1" class="mat-mdc-tooltip-trigger copy-button ng-tns-c3578594610-81 gem-button gem-button-badge-size-small gem-button-size-small gem-button-type-on-surface lm-enabled ng-star-inserted" data-test-id="gem-copy-button" fonticonname="copy" gemtooltip="Copy code" size="small" style="line-height: 1.15 !important; margin-top: 0px !important;" tabindex="-1" theme="lm" type="onSurface"&gt;&lt;!----&gt;&lt;!----&gt;&lt;/gem-icon-button&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;pre _ngcontent-ng-c3578594610="" class="ng-tns-c3578594610-81" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3578594610="" class="code-container formatted ng-tns-c3578594610-81" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Enter the number of rows for upper half: 5
    *
   ***
  *****
 *******
*********
 *******
  *****
   ***
    *
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="24" id="p-rc_a8b3608c24c23dcb-334" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h2 data-path-to-node="25,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Common Mistakes &amp;amp; Troubleshooting&lt;/h2&gt;&lt;span data-path-to-node="25,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="26" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="26,0,0" id="p-rc_a8b3608c24c23dcb-335" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="26,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="26,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Duplicate Center Line&lt;/b&gt;: Iterating the lower outer loop up to &lt;span class="math-inline" data-index-in-node="60" data-math="n" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;n&lt;/span&gt;&amp;nbsp;instead of &lt;span class="math-inline" data-index-in-node="73" data-math="n - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;n - 1&lt;/span&gt;&amp;nbsp;duplicates the widest row (&lt;span class="math-inline" data-index-in-node="106" data-math="9" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;9&lt;/span&gt;&amp;nbsp;asterisks for &lt;span class="math-inline" data-index-in-node="122" data-math="n = 5" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;n = 5&lt;/span&gt;)&lt;/span&gt;&lt;span data-path-to-node="26,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="26,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="26,1,0" id="p-rc_a8b3608c24c23dcb-336" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="26,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="26,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Misaligned Offsets&lt;/b&gt;: Using &lt;code data-index-in-node="26" data-path-to-node="26,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;space &amp;lt; n - i&lt;/code&gt; instead of &lt;code data-index-in-node="51" data-path-to-node="26,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;space &amp;lt;= n - i&lt;/code&gt; shifts the entire top half leftward relative to the bottom half&lt;/span&gt;&lt;span data-path-to-node="26,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="26,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="27,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Complexity Analysis&lt;/h2&gt;&lt;span data-path-to-node="27,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="28" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="28,0,0" id="p-rc_a8b3608c24c23dcb-337" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="28,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="28,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Time Complexity&lt;/b&gt;: &lt;span class="math-inline" data-index-in-node="17" data-math="O(n^2)" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;O(n^2)&lt;/span&gt;&amp;nbsp;due to consecutive nested loop blocks iterating proportionally to &lt;span class="math-inline" data-index-in-node="90" data-math="n" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;n&lt;/span&gt;&lt;/span&gt;&lt;span data-path-to-node="28,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="28,1,0" id="p-rc_a8b3608c24c23dcb-338" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="28,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="28,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Space Complexity&lt;/b&gt;: &lt;span class="math-inline" data-index-in-node="18" data-math="O(1)" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;O(1)&lt;/span&gt;&amp;nbsp;auxiliary space requiring only scalar variables&lt;/span&gt;&lt;span data-path-to-node="28,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="28,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="29,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Conclusion&lt;/h2&gt;&lt;span data-path-to-node="29,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;p data-path-to-node="30" id="p-rc_a8b3608c24c23dcb-339" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;&lt;span data-path-to-node="30,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Modularizing patterns into multi-phase nested loops provides the blueprint for rendering complex geometric outputs in terminal applications&lt;/span&gt;&lt;span data-path-to-node="30,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="30,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="30" id="p-rc_a8b3608c24c23dcb-339" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="30,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b id="docs-internal-guid-5a2177ad-7fff-2d9b-6fe1-fedd72f892c1" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial,sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span style="-webkit-text-decoration-skip: none; background-color: transparent; color: #1155cc; font-family: Arial,sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap; white-space: pre;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial,sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="30" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="30,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial,sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Printing Inverted Full Pyramid in C | Advanced Shape Patterns</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/printing-inverted-full-pyramid-in-c.html</link><category>CCode</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Sat, 22 Aug 2026 00:00:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-5560101809244318452</guid><description>&lt;p style="text-align: justify;"&gt;&lt;span data-path-to-node="1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;The inverted full pyramid is a fundamental structural pattern in C programming that tests your command over multi-loop logic, decreasing iteration bounds, and symmetric space management&lt;/span&gt;&lt;span data-path-to-node="1,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;/span&gt;&lt;span data-path-to-node="1,2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="1" id="p-rc_94304412837668a3-301" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h2 data-path-to-node="2,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Introduction&lt;/h2&gt;&lt;span data-path-to-node="2,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;p data-path-to-node="3" id="p-rc_94304412837668a3-302" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Mastering the inverted full pyramid sharpens your ability to manage dynamic loop bounds and horizontal symmetry&lt;/span&gt;&lt;span data-path-to-node="3,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="3,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;. This tutorial breaks down the pattern logic, line-by-line algorithm, C source code, and performance complexity required to output a flexible inverted pyramid based on user input&lt;/span&gt;&lt;span data-path-to-node="3,3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="3,4" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;p data-path-to-node="4" id="p-rc_94304412837668a3-303" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Prerequisites&lt;/b&gt;: Familiarity with basic &lt;code data-index-in-node="38" data-path-to-node="4,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/code&gt; loops, standard I/O (&lt;code data-index-in-node="63" data-path-to-node="4,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/code&gt;, &lt;code data-index-in-node="71" data-path-to-node="4,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;scanf&lt;/code&gt;), and integer arithmetic&lt;/span&gt;&lt;span data-path-to-node="4,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="4,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;p data-path-to-node="5" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="5" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Expected Output&lt;/b&gt;:&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-74 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-74 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQvAE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_d5827b1ded6f3cdc&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_94304412837668a3&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-74" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-74" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-74 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="buttons ng-tns-c3578594610-74 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;*********&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3578594610="" class="ng-tns-c3578594610-74" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3578594610="" class="code-container formatted ng-tns-c3578594610-74" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt; *******
  *****
   ***
    *
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="7" id="p-rc_94304412837668a3-304" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h2 data-path-to-node="8,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Deconstructing the Pattern Logic&lt;/h2&gt;&lt;span data-path-to-node="8,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;p data-path-to-node="9" id="p-rc_94304412837668a3-305" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="9,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;To render an inverted pyramid of height &lt;span class="math-inline" data-index-in-node="40" data-math="n" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$n$&lt;/span&gt;, track how the leading space count increases while the asterisk count decreases across rows&lt;/span&gt;&lt;span data-path-to-node="9,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="9,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;:&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;table data-path-to-node="10" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-bottom: 32px; margin-top: 0px !important;"&gt;&lt;thead style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Row (i)&lt;/strong&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Leading Spaces (i−1)&lt;/strong&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Asterisks (2(n−i)+1)&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,1,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,1,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;9&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,2,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,2,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;7&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,3,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,3,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;5&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,4,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,4,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,4,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,5,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;5&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,5,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="10,5,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;ul data-path-to-node="11" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="11,0,0" id="p-rc_94304412837668a3-306" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="11,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="11,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Outer Loop&lt;/b&gt;: Iterates through rows &lt;span class="math-inline" data-index-in-node="34" data-math="i = 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$i = 1$&lt;/span&gt; to &lt;span class="math-inline" data-index-in-node="43" data-math="n" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$n$&lt;/span&gt;&lt;/span&gt;&lt;span data-path-to-node="11,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="11,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="11,1,0" id="p-rc_94304412837668a3-307" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="11,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="11,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Spaces Loop&lt;/b&gt;: Prints &lt;span class="math-inline" data-index-in-node="20" data-math="i - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$i - 1$&lt;/span&gt; spaces on row &lt;span class="math-inline" data-index-in-node="40" data-math="i" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$i$&lt;/span&gt; to shift the asterisks rightward&lt;/span&gt;&lt;span data-path-to-node="11,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="11,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="11,2,0" id="p-rc_94304412837668a3-308" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="11,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="11,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Asterisk Loop&lt;/b&gt;: Prints an odd sequence of asterisks given by &lt;span class="math-inline" data-index-in-node="60" data-math="2(n - i) + 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$2(n - i) + 1$&lt;/span&gt;&lt;/span&gt;&lt;span data-path-to-node="11,2,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="11,2,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="12,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation&lt;/h2&gt;&lt;span data-path-to-node="12,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-75 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-75 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQxAE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_d5827b1ded6f3cdc&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_94304412837668a3&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-75" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-75" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-75 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="buttons ng-tns-c3578594610-75 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3578594610="" class="ng-tns-c3578594610-75" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3578594610="" class="code-container formatted ng-tns-c3578594610-75" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n, i, j, space;

    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Enter the number of rows: "&lt;/span&gt;);
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; (&lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;scanf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%d"&lt;/span&gt;, &amp;amp;n) != &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt; || n &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;) {
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Invalid input. Please enter a positive integer.\n"&lt;/span&gt;);
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;;
    }

    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print leading spaces&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (space = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; space &amp;lt; i; space++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
        }
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print asterisks&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * (n - i) + &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"*"&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }

    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="14" id="p-rc_94304412837668a3-309" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h3 data-path-to-node="15,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Breakdown&lt;/h3&gt;&lt;span data-path-to-node="15,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="16" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="16,0,0" id="p-rc_94304412837668a3-310" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="16,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="16,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Space Offsets&lt;/b&gt;: For row &lt;span class="math-inline" data-index-in-node="23" data-math="i" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/span&gt;, the loop runs &lt;span class="math-inline" data-index-in-node="40" data-math="i - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;i - 1&lt;/span&gt;&amp;nbsp;times to maintain vertical pyramid alignment&lt;/span&gt;&lt;span data-path-to-node="16,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="16,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="16,1,0" id="p-rc_94304412837668a3-311" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="16,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="16,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Star Count Formula&lt;/b&gt;: &lt;span class="math-inline" data-index-in-node="20" data-math="2(n - i) + 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2(n - i) + 1&lt;/span&gt;&amp;nbsp;calculates the decremental odd sequence (&lt;span class="math-inline" data-index-in-node="74" data-math="9, 7, 5, 3, 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;9, 7, 5, 3, 1&lt;/span&gt;&amp;nbsp;for &lt;span class="math-inline" data-index-in-node="92" data-math="n = 5" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;n = 5&lt;/span&gt;)&lt;/span&gt;&lt;span data-path-to-node="16,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="16,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="16,2,0" id="p-rc_94304412837668a3-312" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="16,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="16,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Row Transition&lt;/b&gt;: &lt;code data-index-in-node="16" data-path-to-node="16,2,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf("\n");&lt;/code&gt; breaks the output line after completing star output for the current row&lt;/span&gt;&lt;span data-path-to-node="16,2,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="16,2,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="17,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Compiling and Execution&lt;/h2&gt;&lt;span data-path-to-node="17,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;p data-path-to-node="18" id="p-rc_94304412837668a3-313" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Compile and execute the program using standard GCC tools&lt;/span&gt;&lt;span data-path-to-node="18,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;:&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-76 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-76 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQygE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_d5827b1ded6f3cdc&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_94304412837668a3&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-76" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-76" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-76 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="20" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Console Output&lt;/b&gt;:&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code-block&gt;&lt;/response-element&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-77 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-77 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQywE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_d5827b1ded6f3cdc&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_94304412837668a3&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-77" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-77" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-77 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="buttons ng-tns-c3578594610-77 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;br /&gt;&lt;gem-icon-button _ngcontent-ng-c3578594610="" _nghost-ng-c2501665546="" aria-describedby="cdk-describedby-message-ng-1-17" arialabel="Copy code" cdk-describedby-host="ng-1" class="mat-mdc-tooltip-trigger copy-button ng-tns-c3578594610-77 gem-button gem-button-badge-size-small gem-button-size-small gem-button-type-on-surface lm-enabled ng-star-inserted" data-test-id="gem-copy-button" fonticonname="copy" gemtooltip="Copy code" size="small" style="line-height: 1.15 !important; margin-top: 0px !important;" tabindex="-1" theme="lm" type="onSurface"&gt;&lt;!----&gt;&lt;!----&gt;&lt;/gem-icon-button&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;pre _ngcontent-ng-c3578594610="" class="ng-tns-c3578594610-77" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3578594610="" class="code-container formatted ng-tns-c3578594610-77" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Enter the number of rows: 5
*********
 *******
  *****
   ***
    *
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="22" id="p-rc_94304412837668a3-314" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;h2 data-path-to-node="23,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Common Mistakes &amp;amp; Troubleshooting&lt;/h2&gt;&lt;span data-path-to-node="23,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="24" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="24,0,0" id="p-rc_94304412837668a3-315" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="24,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="24,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Incorrect Formula&lt;/b&gt;: Using &lt;span class="math-inline" data-index-in-node="25" data-math="2n - 2i" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$2n - 2i$&lt;/span&gt; instead of &lt;span class="math-inline" data-index-in-node="44" data-math="2(n - i) + 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$2(n - i) + 1$&lt;/span&gt; produces even numbers of stars, distorting the central vertex&lt;/span&gt;&lt;span data-path-to-node="24,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="24,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="24,1,0" id="p-rc_94304412837668a3-316" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="24,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="24,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Missing Line Breaks&lt;/b&gt;: Forgetting &lt;code data-index-in-node="32" data-path-to-node="24,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf("\n");&lt;/code&gt; causes all symbols to print on a single continuous horizontal line&lt;/span&gt;&lt;span data-path-to-node="24,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="24,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="25,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Complexity Analysis&lt;/h2&gt;&lt;span data-path-to-node="25,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;ul data-path-to-node="26" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="26,0,0" id="p-rc_94304412837668a3-317" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="26,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="26,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Time Complexity&lt;/b&gt;: &lt;span class="math-inline" data-index-in-node="17" data-math="O(n^2)" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;O(n^2)&lt;/span&gt;&amp;nbsp;due to nested space and star loop execution over &lt;span class="math-inline" data-index-in-node="73" data-math="n" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;n&lt;/span&gt;&amp;nbsp;iterations&lt;/span&gt;&lt;span data-path-to-node="26,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="26,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="26,1,0" id="p-rc_94304412837668a3-318" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="26,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="26,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Space Complexity&lt;/b&gt;: &lt;span class="math-inline" data-index-in-node="18" data-math="O(1)" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;O(1)&lt;/span&gt;&amp;nbsp;auxiliary space as it executes using scalar integer variables&lt;/span&gt;&lt;span data-path-to-node="26,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="26,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="27,0" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Conclusion&lt;/h2&gt;&lt;span data-path-to-node="27,1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;p data-path-to-node="28" id="p-rc_94304412837668a3-319" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="28,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Understanding inverse pattern formulas provides a foundation for complex ASCII graphics and symmetric layout algorithms in lower-level programming&lt;/span&gt;&lt;span data-path-to-node="28,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="28,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;span id="docs-internal-guid-5a2177ad-7fff-2d9b-6fe1-fedd72f892c1"&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;p data-path-to-node="28" id="p-rc_94304412837668a3-319" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="28,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Printing Full Pyramid in C | Advanced Shape Patterns</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/printing-full-pyramid-in-c.html</link><category>CCode</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Fri, 21 Aug 2026 00:00:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-1047880119763736907</guid><description>&lt;p data-path-to-node="2" id="p-rc_52dadd4ff3d5d71c-254" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;&lt;span data-path-to-node="2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Learn to print a full pyramid star pattern in C, boosting your loop logic and conditional reasoning&lt;/span&gt;&lt;span data-path-to-node="2,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="2,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;. This tutorial describes the pattern, its complexity, its significance in learning C programming, and its relevance for building logic, conditionals, and problem-solving skills&lt;/span&gt;&lt;span data-path-to-node="2,3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="2,4" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;p data-path-to-node="3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Introduction&lt;/b&gt;&lt;/p&gt;&lt;p data-path-to-node="4" id="p-rc_52dadd4ff3d5d71c-255" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;ul data-path-to-node="5" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="5,0,0" id="p-rc_52dadd4ff3d5d71c-256" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="5,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="5,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Hook&lt;/b&gt;: Mastering the full pyramid star pattern introduces new concepts like applying conditions or managing symmetry with visual appeal&lt;/span&gt;&lt;span data-path-to-node="5,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="5,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="5,1,0" id="p-rc_52dadd4ff3d5d71c-257" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="5,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="5,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;What You Will Learn&lt;/b&gt;: The purpose of this post is to teach how to create the specific pattern using more intricate logic, such as nested loops with conditions or managing spaces&lt;/span&gt;&lt;span data-path-to-node="5,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="5,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;. The objective is to understand and implement the code for the specific pattern&lt;/span&gt;&lt;span data-path-to-node="5,1,0,3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="5,1,0,4" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="5,2,0" id="p-rc_52dadd4ff3d5d71c-258" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="5,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="5,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Prerequisites&lt;/b&gt;: This level assumes knowledge of basic &lt;code data-index-in-node="53" data-path-to-node="5,2,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/code&gt; loops, &lt;code data-index-in-node="64" data-path-to-node="5,2,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/code&gt;, &lt;code data-index-in-node="72" data-path-to-node="5,2,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;scanf&lt;/code&gt;, &lt;code data-index-in-node="79" data-path-to-node="5,2,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;if-else&lt;/code&gt; statements, and functions&lt;/span&gt;&lt;span data-path-to-node="5,2,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="5,2,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="5,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="5,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Final Output&lt;/b&gt;:&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-72 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-72 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQiwE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_4338a9c9efd81b20&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_52dadd4ff3d5d71c&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-72" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-72" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-72 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="buttons ng-tns-c3578594610-72 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;nbsp; &amp;nbsp; *&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3578594610="" class="ng-tns-c3578594610-72" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3578594610="" class="code-container formatted ng-tns-c3578594610-72" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;   ***
  *****
 *******
*********
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="5,3,2" id="p-rc_52dadd4ff3d5d71c-259" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-path-to-node="6" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="6" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Deconstructing the Pattern: The Logic&lt;/b&gt;&lt;/p&gt;&lt;p data-path-to-node="7" id="p-rc_52dadd4ff3d5d71c-260" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;ul data-path-to-node="8" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="8,0,0" id="p-rc_52dadd4ff3d5d71c-261" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="8,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="8,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Visual Representation&lt;/b&gt;: The pattern displays a symmetric structure with clearly marked rows and columns (e.g., Row 1, Row 2, Column 1, etc.)&lt;/span&gt;&lt;span data-path-to-node="8,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="8,1,0" id="p-rc_52dadd4ff3d5d71c-262" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="8,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="8,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Problem Statement&lt;/b&gt;: The program prints a dynamic full pyramid based on user input, detailing rules for centered alignment and symbol placement&lt;/span&gt;&lt;span data-path-to-node="8,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="8,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="8,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Pattern Analysis &amp;amp; Logic&lt;/b&gt;:&lt;/p&gt;&lt;ul data-path-to-node="8,2,1" style="line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="8,2,1,0,0" id="p-rc_52dadd4ff3d5d71c-263" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="8,2,1,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Rows and columns are identified to explain how loops run and how spaces and elements are arranged&lt;/span&gt;&lt;span data-path-to-node="8,2,1,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,2,1,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="8,2,1,1,0" id="p-rc_52dadd4ff3d5d71c-264" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="8,2,1,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Conditional logic utilizes statements to determine what is printed&lt;/span&gt;&lt;span data-path-to-node="8,2,1,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,2,1,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="8,2,1,2,0" id="p-rc_52dadd4ff3d5d71c-265" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="8,2,1,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Multi-loop logic requires more than two simple loops, breaking down the roles of each loop for rows, spaces, and pattern characters&lt;/span&gt;&lt;span data-path-to-node="8,2,1,2,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,2,1,2,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="8,2,1,3,0" id="p-rc_52dadd4ff3d5d71c-266" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="8,2,1,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Mathematical formulas calculate elements like the number of spaces (&lt;span class="math-inline" data-index-in-node="68" data-math="n - i" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$n - i$&lt;/span&gt;) and characters (&lt;span class="math-inline" data-index-in-node="91" data-math="2i - 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$2i - 1$&lt;/span&gt;)&lt;/span&gt;&lt;span data-path-to-node="8,2,1,3,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,2,1,3,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="8,3,0" id="p-rc_52dadd4ff3d5d71c-267" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="8,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="8,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Step-by-Step Explanation/Algorithm&lt;/b&gt;: Outlines pseudocode detailing structure, symmetry, alignment, and logic for spaces, symbols, and print order&lt;/span&gt;&lt;span data-path-to-node="8,3,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,3,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="8,4,0" id="p-rc_52dadd4ff3d5d71c-268" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="8,4,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="8,4,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Table/Diagrams&lt;/b&gt;: A table maps row vs. column values and how values change based on conditions, supported by logic diagrams&lt;/span&gt;&lt;span data-path-to-node="8,4,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="8,4,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;table data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-bottom: 32px; margin-top: 0px !important;"&gt;&lt;thead style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Row (i)&lt;/strong&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Leading Spaces (n−i)&lt;/strong&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;strong style="line-height: 1.15 !important; margin-bottom: 0px !important; margin-top: 0px !important;"&gt;Asterisks (2i−1)&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,1,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,1,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,2,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,2,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,3,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,3,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;5&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,4,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,4,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,4,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;7&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,5,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;5&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,5,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid rgb(196, 199, 197); line-height: 1.15 !important; margin-top: 0px !important; padding: 8px 12px;"&gt;&lt;span data-path-to-node="9,5,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;9&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p data-path-to-node="10" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="10" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Code Implementation&lt;/b&gt;&lt;/p&gt;&lt;p data-path-to-node="11" id="p-rc_52dadd4ff3d5d71c-269" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;br /&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3578594610="" class="ng-tns-c3578594610-73 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block ng-tns-c3578594610-73 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwi766rB1KKWAxUAAAAAHQAAAAAQmgE" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_4338a9c9efd81b20&amp;quot;,&amp;quot;c_78efffae1a707ca2&amp;quot;,null,&amp;quot;rc_52dadd4ff3d5d71c&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3578594610="" class="formatted-code-block-internal-container ng-tns-c3578594610-73" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="animated-opacity ng-tns-c3578594610-73" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3578594610-73 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3578594610="" class="buttons ng-tns-c3578594610-73 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3578594610="" class="ng-tns-c3578594610-73" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3578594610="" class="code-container formatted ng-tns-c3578594610-73" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n, i, j, space;
    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Enter the number of rows: "&lt;/span&gt;);
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; (&lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;scanf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%d"&lt;/span&gt;, &amp;amp;n) != &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt; || n &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;) {
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Invalid input.\n"&lt;/span&gt;);
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;;
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print leading spaces&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (space = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; space &amp;lt;= n - i; space++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
        }
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Print asterisks&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * i - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"*"&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="14" id="p-rc_52dadd4ff3d5d71c-271" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;ul data-path-to-node="15" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="15,0,0" id="p-rc_52dadd4ff3d5d71c-272" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="15,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="15,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Comments&lt;/b&gt;: Inline comments explain each key line of code, loop conditions, and &lt;code data-index-in-node="78" data-path-to-node="15,0,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/code&gt; statements&lt;/span&gt;&lt;span data-path-to-node="15,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="15,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="15,1,0" id="p-rc_52dadd4ff3d5d71c-273" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="15,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="15,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Explanation&lt;/b&gt;: An in-depth breakdown of variable initialization, loop iterations, printing behavior, and the role of &lt;code data-index-in-node="115" data-path-to-node="15,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf("\n")&lt;/code&gt;&lt;/span&gt;&lt;span data-path-to-node="15,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="15,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="15,2,0" id="p-rc_52dadd4ff3d5d71c-274" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="15,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="15,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Modularization&lt;/b&gt;: Utilizing functions or arrays/pointers if relevant to intermediate patterns&lt;/span&gt;&lt;span data-path-to-node="15,2,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="15,2,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="15,3,0" id="p-rc_52dadd4ff3d5d71c-275" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="15,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="15,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Visual Explanation&lt;/b&gt;: Includes dry-run tables for key iterations tracking values of &lt;code data-index-in-node="82" data-path-to-node="15,3,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/code&gt;, &lt;code data-index-in-node="85" data-path-to-node="15,3,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j&lt;/code&gt;, and condition results&lt;/span&gt;&lt;span data-path-to-node="15,3,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="15,3,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-path-to-node="16" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="16" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Sample Output or Compiling and Running the Program&lt;/b&gt;&lt;/p&gt;&lt;p data-path-to-node="17" id="p-rc_52dadd4ff3d5d71c-276" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;ul data-path-to-node="18" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,0,0" id="p-rc_52dadd4ff3d5d71c-277" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;User Input&lt;/b&gt;: The user types &lt;code data-index-in-node="27" data-path-to-node="18,0,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Enter the number of rows: 5&lt;/code&gt; into the console&lt;/span&gt;&lt;span data-path-to-node="18,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,1,0" id="p-rc_52dadd4ff3d5d71c-278" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Program Output&lt;/b&gt;: Displays the exact expected console output matching the final output block&lt;/span&gt;&lt;span data-path-to-node="18,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,2,0" id="p-rc_52dadd4ff3d5d71c-279" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Edge Cases &amp;amp; Input Validation&lt;/b&gt;: Discusses handling edge cases like invalid input, large inputs, zero, or negative numbers&lt;/span&gt;&lt;span data-path-to-node="18,2,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,2,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,3,0" id="p-rc_52dadd4ff3d5d71c-280" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Compiling and Running&lt;/b&gt;: Instructions on compiling with &lt;code data-index-in-node="54" data-path-to-node="18,3,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;gcc&lt;/code&gt; and running executable binaries&lt;/span&gt;&lt;span data-path-to-node="18,3,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,3,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,4,0" id="p-rc_52dadd4ff3d5d71c-281" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="18,4,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,4,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Output Analysis&lt;/b&gt;: Shows expected outputs for different inputs like &lt;code data-index-in-node="66" data-path-to-node="18,4,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;size=5&lt;/code&gt; and &lt;code data-index-in-node="77" data-path-to-node="18,4,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;size=10&lt;/code&gt;, highlighting symmetries and row-by-row structure&lt;/span&gt;&lt;span data-path-to-node="18,4,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="18,4,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-path-to-node="19" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="19" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Variations and Enhancements&lt;/b&gt;&lt;/p&gt;&lt;p data-path-to-node="20" id="p-rc_52dadd4ff3d5d71c-282" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;ul data-path-to-node="21" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="21,0,0" id="p-rc_52dadd4ff3d5d71c-283" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="21,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="21,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Challenge&lt;/b&gt;: Modify the code to create an inverted version of the full pyramid&lt;/span&gt;&lt;span data-path-to-node="21,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="21,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="21,1,0" id="p-rc_52dadd4ff3d5d71c-284" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="21,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="21,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Modify the Character&lt;/b&gt;: Replace the &lt;code data-index-in-node="34" data-path-to-node="21,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;*&lt;/code&gt; with a different character or number&lt;/span&gt;&lt;span data-path-to-node="21,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="21,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="21,2,0" id="p-rc_52dadd4ff3d5d71c-285" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="21,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="21,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Change the Logic&lt;/b&gt;: Modify &lt;code data-index-in-node="25" data-path-to-node="21,2,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/code&gt; to display alternative sequences like &lt;code data-index-in-node="70" data-path-to-node="21,2,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/code&gt; instead of &lt;code data-index-in-node="83" data-path-to-node="21,2,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j&lt;/code&gt;&lt;/span&gt;&lt;span data-path-to-node="21,2,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="21,2,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="21,3,0" id="p-rc_52dadd4ff3d5d71c-286" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="21,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="21,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Advanced Concepts&lt;/b&gt;: Adapt the code to use arrays or pointers&lt;/span&gt;&lt;span data-path-to-node="21,3,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="21,3,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="21,4,0" id="p-rc_52dadd4ff3d5d71c-287" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="21,4,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="21,4,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Customization Tips&lt;/b&gt;: Adjust symbol, size, alignment, or shape for filled, mirrored, or hollow forms&lt;/span&gt;&lt;span data-path-to-node="21,4,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="21,4,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-path-to-node="22" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="22" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Common Mistakes and Troubleshooting&lt;/b&gt;&lt;/p&gt;&lt;p data-path-to-node="23" id="p-rc_52dadd4ff3d5d71c-288" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;ul data-path-to-node="24" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="24,0,0" id="p-rc_52dadd4ff3d5d71c-289" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="24,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="24,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Missing Newline&lt;/b&gt;: Forgetting the &lt;code data-index-in-node="32" data-path-to-node="24,0,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf("\n")&lt;/code&gt; statement&lt;/span&gt;&lt;span data-path-to-node="24,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="24,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="24,1,0" id="p-rc_52dadd4ff3d5d71c-290" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="24,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="24,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Incorrect Loop Conditions&lt;/b&gt;: Loop condition typos like &lt;code data-index-in-node="53" data-path-to-node="24,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i &amp;lt;= n&lt;/code&gt; or &lt;code data-index-in-node="63" data-path-to-node="24,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j &amp;lt;= i&lt;/code&gt; that disrupt pattern layout&lt;/span&gt;&lt;span data-path-to-node="24,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="24,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="24,2,0" id="p-rc_52dadd4ff3d5d71c-291" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="24,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="24,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Typical Errors&lt;/b&gt;: Off-by-one errors in loop ranges or incorrect space logic&lt;/span&gt;&lt;span data-path-to-node="24,2,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="24,2,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="24,3,0" id="p-rc_52dadd4ff3d5d71c-292" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="24,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="24,3,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Solutions&lt;/b&gt;: Before-and-after code examples explaining how to fix loop ranges and extra characters&lt;/span&gt;&lt;span data-path-to-node="24,3,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="24,3,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-path-to-node="25" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="25" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Complexity Analysis&lt;/b&gt;&lt;/p&gt;&lt;p data-path-to-node="26" id="p-rc_52dadd4ff3d5d71c-293" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;ul data-path-to-node="27" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="27,0,0" id="p-rc_52dadd4ff3d5d71c-294" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="27,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="27,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Time Complexity&lt;/b&gt;: &lt;span class="math-inline" data-index-in-node="17" data-math="O(n^2)" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;O(n^2)&lt;/span&gt;&amp;nbsp;for nested loops analyzing loop depth&lt;/span&gt;&lt;span data-path-to-node="27,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="27,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="27,1,0" id="p-rc_52dadd4ff3d5d71c-295" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="27,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="27,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Space Complexity&lt;/b&gt;: &lt;span class="math-inline" data-index-in-node="18" data-math="O(1)" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;O(1)&lt;/span&gt;&amp;nbsp;space complexity, noting scalar variable use&lt;/span&gt;&lt;span data-path-to-node="27,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="27,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="27,2,0" id="p-rc_52dadd4ff3d5d71c-296" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="27,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="27,2,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Optimization Tips&lt;/b&gt;: Reducing complexity or using formulas for faster execution&lt;/span&gt;&lt;span data-path-to-node="27,2,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="27,2,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-path-to-node="28" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="28" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Conclusion&lt;/b&gt;&lt;/p&gt;&lt;p data-path-to-node="29" id="p-rc_52dadd4ff3d5d71c-297" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;ul data-path-to-node="30" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="30,0,0" id="p-rc_52dadd4ff3d5d71c-298" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="30,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="30,0,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Summary&lt;/b&gt;: Understanding multiple nested loops is the key to solving these intermediate patterns&lt;/span&gt;&lt;span data-path-to-node="30,0,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="30,0,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/source-inline-chip&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="30,1,0" id="p-rc_52dadd4ff3d5d71c-299" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span data-path-to-node="30,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="30,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Call to Action&lt;/b&gt;: Try the next pattern in the series or share your own variations, teasing the next pattern: "Inverted Pyramid"&lt;/span&gt;&lt;span data-path-to-node="30,1,0,1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;source-footnote _nghost-ng-c2318457044="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;sup _ngcontent-ng-c2318457044="" class="superscript" style="font-size: 16px !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;/sup&gt;&lt;/source-footnote&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/span&gt;&lt;span data-path-to-node="30,1,0,2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;.&lt;/span&gt;&lt;sources-carousel-inline _nghost-ng-c746355749="" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;  &lt;source-inline-chip _ngcontent-ng-c746355749="" _nghost-ng-c3839862124="" class="ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/source-inline-chip&gt;&lt;/sources-carousel-inline&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;span id="docs-internal-guid-5a2177ad-7fff-2d9b-6fe1-fedd72f892c1"&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Writing a Modular Diamond Pattern Program Using Helper Functions in C</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-FunsPgms-A03.html</link><category>CCode</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Thu, 20 Aug 2026 13:21:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-3829766174559314052</guid><description>&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj2APB7xrYYgeXhD09yZckMUC1xcBYD5-sjnpgjMhGcqRkxpDEhBRv6JvMSoLp8aXNThJaRc1Ktig2xbLaKk5s81zGRUg-gwqA1x-3ebOsKF_slVfJsibxASciC30Z_HA0D-1bdRh38OCkc6VxZmrPQ2R9HbzTXfgR14rGyBZlUg3ijy17OaWUjpWiGX8I/s1408/8051MT-PPIC-FunsPgms-A03_Im01.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Writing a Modular Diamond Pattern Program Using Helper Functions in C" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj2APB7xrYYgeXhD09yZckMUC1xcBYD5-sjnpgjMhGcqRkxpDEhBRv6JvMSoLp8aXNThJaRc1Ktig2xbLaKk5s81zGRUg-gwqA1x-3ebOsKF_slVfJsibxASciC30Z_HA0D-1bdRh38OCkc6VxZmrPQ2R9HbzTXfgR14rGyBZlUg3ijy17OaWUjpWiGX8I/w400-h219/8051MT-PPIC-FunsPgms-A03_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span face="&amp;quot;Google Sans Text&amp;quot;, sans-serif"&gt;When you venture into advanced pattern programming in C, few shapes test your logic quite like the &lt;/span&gt;&lt;b data-index-in-node="99" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;diamond&lt;/b&gt;&lt;span face="&amp;quot;Google Sans Text&amp;quot;, sans-serif"&gt;. A diamond pattern is symmetrical, intricate, and combines two distinct geometric structures: an upright pyramid for the top half and an inverted pyramid for the bottom half.&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px; text-align: justify;"&gt;If you attempt to write a diamond pattern using monolithic code inside &lt;code data-index-in-node="71" data-path-to-node="3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;main()&lt;/code&gt;, your script quickly becomes a dense maze of nested loops and manual spacing calculations. Worse, if you need to change the size or symbol, updating the code becomes error-prone.&lt;/p&gt;&lt;p data-path-to-node="4" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px; text-align: justify;"&gt;In this guide, we will explore how to write a clean, elegant, and fully modular diamond pattern program in C by leveraging reusable helper functions and clear separation of concerns.&lt;/p&gt;&lt;h2 data-path-to-node="6" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;1. Understanding the Anatomy of a Diamond&lt;/h2&gt;&lt;p data-path-to-node="7" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;Before writing any code, let's break down how a diamond of height &lt;span class="math-inline" data-index-in-node="66" data-math="N" style="line-height: 1.15; margin-top: 0px;"&gt;$N$&lt;/span&gt; (where &lt;span class="math-inline" data-index-in-node="75" data-math="N" style="line-height: 1.15; margin-top: 0px;"&gt;$N$&lt;/span&gt; represents the number of rows in the upper half) is constructed:&lt;/p&gt;&lt;ul data-path-to-node="8" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15; margin-top: 0px;"&gt;&lt;p data-path-to-node="8,0,0" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;b data-index-in-node="0" data-path-to-node="8,0,0" style="line-height: 1.15; margin-top: 0px;"&gt;The Upper Pyramid:&lt;/b&gt; Consists of rows where spaces decrease (&lt;span class="math-inline" data-index-in-node="59" data-math="N - i" style="line-height: 1.15; margin-top: 0px;"&gt;$N - i$&lt;/span&gt;) and stars increase (&lt;span class="math-inline" data-index-in-node="86" data-math="2i - 1" style="line-height: 1.15; margin-top: 0px;"&gt;$2i - 1$&lt;/span&gt;).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15; margin-top: 0px;"&gt;&lt;p data-path-to-node="8,1,0" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;b data-index-in-node="0" data-path-to-node="8,1,0" style="line-height: 1.15; margin-top: 0px;"&gt;The Lower Inverted Pyramid:&lt;/b&gt; Consists of rows where spaces increase (&lt;span class="math-inline" data-index-in-node="68" data-math="N - i" style="line-height: 1.15; margin-top: 0px;"&gt;$N - i$&lt;/span&gt;) and stars decrease (&lt;span class="math-inline" data-index-in-node="95" data-math="2i - 1" style="line-height: 1.15; margin-top: 0px;"&gt;$2i - 1$&lt;/span&gt;), running backward from &lt;span class="math-inline" data-index-in-node="126" data-math="N - 1" style="line-height: 1.15; margin-top: 0px;"&gt;$N - 1$&lt;/span&gt; down to &lt;span class="math-inline" data-index-in-node="140" data-math="1" style="line-height: 1.15; margin-top: 0px;"&gt;$1$&lt;/span&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;Instead of mixing these two distinct behaviors into one massive loop block, we can design two specialized helper functions: one for the upper triangle and one for the lower triangle.&lt;/p&gt;&lt;h2 data-path-to-node="11" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;2. Designing the Modular Architecture&lt;/h2&gt;&lt;p data-path-to-node="12" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;To keep our code clean, we will structure our program into three components:&lt;/p&gt;&lt;ol data-path-to-node="13" start="1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15; margin-top: 0px;"&gt;&lt;p data-path-to-node="13,0,0" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;b data-index-in-node="0" data-path-to-node="13,0,0" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;code data-index-in-node="0" data-path-to-node="13,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;printUpperPyramid()&lt;/code&gt;:&lt;/b&gt; Handles the growing upper section.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15; margin-top: 0px;"&gt;&lt;p data-path-to-node="13,1,0" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;b data-index-in-node="0" data-path-to-node="13,1,0" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;code data-index-in-node="0" data-path-to-node="13,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;printLowerPyramid()&lt;/code&gt;:&lt;/b&gt; Handles the shrinking lower section.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15; margin-top: 0px;"&gt;&lt;p data-path-to-node="13,2,0" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;b data-index-in-node="0" data-path-to-node="13,2,0" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;code data-index-in-node="0" data-path-to-node="13,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;printDiamond()&lt;/code&gt; (The Orchestrator):&lt;/b&gt; Calls both helper functions sequentially to render the complete diamond, accepting height and symbol parameters.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2 data-path-to-node="15" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;3. Complete Code Implementation&lt;/h2&gt;&lt;p data-path-to-node="16" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;Here is how you implement a fully modular diamond generator in C:&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-323 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-323 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQmwo" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_a517914638445228&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_a809028721ce6bed&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-323" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-323" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-323 ng-star-inserted" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-323 ng-star-inserted" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;br /&gt;&lt;gem-icon-button _ngcontent-ng-c3788586330="" _nghost-ng-c1256235956="" aria-describedby="cdk-describedby-message-ng-1-20" arialabel="Copy code" cdk-describedby-host="ng-1" class="mat-mdc-tooltip-trigger copy-button ng-tns-c3788586330-323 gem-button gem-button-badge-size-small gem-button-size-small gem-button-type-on-surface lm-enabled ng-star-inserted" data-test-id="gem-copy-button" fonticonname="copy" gemtooltip="Copy code" size="small" style="line-height: 1.15; margin-top: 0px;" tabindex="-1" theme="lm" type="onSurface"&gt;&lt;!----&gt;&lt;!----&gt;&lt;/gem-icon-button&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-323" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-323" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;&lt;span class="hljs-meta" style="line-height: 1.15; margin-top: 0px;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15; margin-top: 0px;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class="hljs-comment" style="line-height: 1.15; margin-top: 0px;"&gt;// Helper Function 1: Prints the upper pyramid&lt;/span&gt;
&lt;span class="hljs-function" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;void&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15; margin-top: 0px;"&gt;printUpperPyramid&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15; margin-top: 0px;"&gt;(&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;int&lt;/span&gt; n, &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;char&lt;/span&gt; symbol)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-comment" style="line-height: 1.15; margin-top: 0px;"&gt;// Print leading spaces&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;int&lt;/span&gt; space = &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;1&lt;/span&gt;; space &amp;lt;= (n - i); space++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15; margin-top: 0px;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15; margin-top: 0px;"&gt;" "&lt;/span&gt;);
        }
        &lt;span class="hljs-comment" style="line-height: 1.15; margin-top: 0px;"&gt;// Print symbols&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;int&lt;/span&gt; star = &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;1&lt;/span&gt;; star &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;2&lt;/span&gt; * i - &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;1&lt;/span&gt;); star++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15; margin-top: 0px;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15; margin-top: 0px;"&gt;"%c"&lt;/span&gt;, symbol);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15; margin-top: 0px;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15; margin-top: 0px;"&gt;"\n"&lt;/span&gt;);
    }
}

&lt;span class="hljs-comment" style="line-height: 1.15; margin-top: 0px;"&gt;// Helper Function 2: Prints the lower inverted pyramid&lt;/span&gt;
&lt;span class="hljs-function" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;void&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15; margin-top: 0px;"&gt;printLowerPyramid&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15; margin-top: 0px;"&gt;(&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;int&lt;/span&gt; n, &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;char&lt;/span&gt; symbol)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;int&lt;/span&gt; i = n - &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;1&lt;/span&gt;; i &amp;gt;= &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;1&lt;/span&gt;; i--) {
        &lt;span class="hljs-comment" style="line-height: 1.15; margin-top: 0px;"&gt;// Print leading spaces&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;int&lt;/span&gt; space = &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;1&lt;/span&gt;; space &amp;lt;= (n - i); space++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15; margin-top: 0px;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15; margin-top: 0px;"&gt;" "&lt;/span&gt;);
        }
        &lt;span class="hljs-comment" style="line-height: 1.15; margin-top: 0px;"&gt;// Print symbols&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;int&lt;/span&gt; star = &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;1&lt;/span&gt;; star &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;2&lt;/span&gt; * i - &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;1&lt;/span&gt;); star++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15; margin-top: 0px;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15; margin-top: 0px;"&gt;"%c"&lt;/span&gt;, symbol);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15; margin-top: 0px;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15; margin-top: 0px;"&gt;"\n"&lt;/span&gt;);
    }
}

&lt;span class="hljs-comment" style="line-height: 1.15; margin-top: 0px;"&gt;// Master Orchestration Function: Combines helpers to form a diamond&lt;/span&gt;
&lt;span class="hljs-function" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;void&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15; margin-top: 0px;"&gt;printDiamond&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15; margin-top: 0px;"&gt;(&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;int&lt;/span&gt; height, &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;char&lt;/span&gt; symbol)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;if&lt;/span&gt; (height &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;0&lt;/span&gt;) {
        &lt;span class="hljs-built_in" style="line-height: 1.15; margin-top: 0px;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15; margin-top: 0px;"&gt;"Error: Height must be greater than zero.\n"&lt;/span&gt;);
        &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;return&lt;/span&gt;;
    }

    &lt;span class="hljs-comment" style="line-height: 1.15; margin-top: 0px;"&gt;// Render Upper Half&lt;/span&gt;
    printUpperPyramid(height, symbol);
    
    &lt;span class="hljs-comment" style="line-height: 1.15; margin-top: 0px;"&gt;// Render Lower Half&lt;/span&gt;
    printLowerPyramid(height, symbol);
}

&lt;span class="hljs-function" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15; margin-top: 0px;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15; margin-top: 0px;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;int&lt;/span&gt; size = &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;4&lt;/span&gt;;
    
    &lt;span class="hljs-built_in" style="line-height: 1.15; margin-top: 0px;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15; margin-top: 0px;"&gt;"--- Generating a Diamond (Size: %d, Symbol: *) ---\n\n"&lt;/span&gt;, size);
    printDiamond(size, &lt;span class="hljs-string" style="line-height: 1.15; margin-top: 0px;"&gt;'*'&lt;/span&gt;);
    
    &lt;span class="hljs-built_in" style="line-height: 1.15; margin-top: 0px;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15; margin-top: 0px;"&gt;"\n--- Generating a Diamond (Size: 3, Symbol: #) ---\n\n"&lt;/span&gt;);
    printDiamond(&lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;3&lt;/span&gt;, &lt;span class="hljs-string" style="line-height: 1.15; margin-top: 0px;"&gt;'#'&lt;/span&gt;);

    &lt;span class="hljs-keyword" style="line-height: 1.15; margin-top: 0px;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15; margin-top: 0px;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="18" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;Output&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-324 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-324 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQnAo" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_a517914638445228&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_a809028721ce6bed&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-324" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-324" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-324 ng-star-inserted" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-324 ng-star-inserted" style="line-height: 1.15; margin-top: 0px;"&gt;--- Generating a Diamond (Size: 4, Symbol: *) ---&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-324" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-324" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;
   *
  ***
 *****
*******
 *****
  ***
   *

--- Generating a Diamond (Size: 3, Symbol: #) ---

    #
  ###
#####
  ###
    #
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="21" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;4. Why Modularizing Complex Patterns Matters&lt;/h2&gt;&lt;ul data-path-to-node="22" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15; margin-top: 0px;"&gt;&lt;p data-path-to-node="22,0,0" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;b data-index-in-node="0" data-path-to-node="22,0,0" style="line-height: 1.15; margin-top: 0px;"&gt;Divide and Conquer:&lt;/b&gt; Breaking a complex shape into two smaller, manageable helper functions (&lt;code data-index-in-node="92" data-path-to-node="22,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;printUpperPyramid&lt;/code&gt; and &lt;code data-index-in-node="114" data-path-to-node="22,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;printLowerPyramid&lt;/code&gt;) completely eliminates cognitive overload. You can debug each half independently.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15; margin-top: 0px;"&gt;&lt;p data-path-to-node="22,1,0" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;b data-index-in-node="0" data-path-to-node="22,1,0" style="line-height: 1.15; margin-top: 0px;"&gt;Reusability:&lt;/b&gt; If you ever need to print a standalone pyramid or an inverted triangle elsewhere in your application, your helper functions are already built and ready to use.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15; margin-top: 0px;"&gt;&lt;p data-path-to-node="22,2,0" style="line-height: 1.15; margin-top: 0px;"&gt;&lt;b data-index-in-node="0" data-path-to-node="22,2,0" style="line-height: 1.15; margin-top: 0px;"&gt;Maintainability:&lt;/b&gt; If a bug occurs in the spacing or boundary logic, you know precisely which helper function to fix without tearing apart your entire orchestration layer.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-path-to-node="23" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;By mastering helper functions and clean architecture, even the most intricate pattern challenges become simple, structured, and fun to solve!&lt;/p&gt;&lt;p data-path-to-node="23" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15; margin-top: 0px;"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;" target="_blank"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj2APB7xrYYgeXhD09yZckMUC1xcBYD5-sjnpgjMhGcqRkxpDEhBRv6JvMSoLp8aXNThJaRc1Ktig2xbLaKk5s81zGRUg-gwqA1x-3ebOsKF_slVfJsibxASciC30Z_HA0D-1bdRh38OCkc6VxZmrPQ2R9HbzTXfgR14rGyBZlUg3ijy17OaWUjpWiGX8I/s72-w400-h219-c/8051MT-PPIC-FunsPgms-A03_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Step-by-Step Code Walkthrough: Modularizing Right-Angled Triangles in C</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-FunsPgms-A02.html</link><category>CCode</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Wed, 19 Aug 2026 13:17:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-9033791239442547556</guid><description>&lt;p style="text-align: justify;"&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFV8CEGyvsSzfxTAaLvKxh3W2j8owDdUmnDPyk5OXfPRPCWPw4eHtZtlBo1nREB6mWV2gVtUuXTxv105hQrJlMmPKySslmWHkqbZrvcOC7YE9sQg540GzAjqkM1QMGlrYzmV75PaMsk_L0HIbVRf1-SVn5sCJ1mQQ7bwlg0vqVK2Wy28N-xV2gcg-vzJ_Z/s1408/8051MT-PPIC-FunsPgms-A02_Im01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Step-by-Step Code Walkthrough: Modularizing Right-Angled Triangles in C" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFV8CEGyvsSzfxTAaLvKxh3W2j8owDdUmnDPyk5OXfPRPCWPw4eHtZtlBo1nREB6mWV2gVtUuXTxv105hQrJlMmPKySslmWHkqbZrvcOC7YE9sQg540GzAjqkM1QMGlrYzmV75PaMsk_L0HIbVRf1-SVn5sCJ1mQQ7bwlg0vqVK2Wy28N-xV2gcg-vzJ_Z/w400-h219/8051MT-PPIC-FunsPgms-A02_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;When learning to modularize code, squares and rectangles are great starting points because their row and column lengths remain identical or static. However, real-world patterns—and common coding interview challenges—often require shapes whose dimensions shift dynamically, such as &lt;/span&gt;&lt;b data-index-in-node="281" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;right-angled triangles&lt;/b&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;Unlike a square, a right-angled triangle's inner loop boundary changes with every iteration of the outer loop (&lt;span class="math-inline" data-index-in-node="111" data-math="j \le i" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$j \le i$&lt;/span&gt;). Modularizing this shape requires careful thought around parameter passing and loop dependency.&lt;/p&gt;&lt;p data-path-to-node="4" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;In this step-by-step code walkthrough, we will break down how to refactor a monolithic right-angled triangle script into a clean, reusable, and parameterized C function.&lt;/p&gt;&lt;h2 data-path-to-node="6" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Step 1: The Monolithic Baseline (The Old Way)&lt;/h2&gt;&lt;p data-path-to-node="7" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Traditionally, when beginners learn to print a right-angled triangle, everything is written directly inside the &lt;code data-index-in-node="112" data-path-to-node="7" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;main()&lt;/code&gt; function:&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-302 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-302 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQ5wk" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_9661634059e48459&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_2042bb0581723a1a&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-302" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-302" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-302 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-302 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-302" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-302" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; rows = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    
    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Monolithic loop structure&lt;/span&gt;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= rows; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;While this prints the desired output, it is locked to a hardcoded height of &lt;code data-index-in-node="76" data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/code&gt; and uses only asterisks (&lt;code data-index-in-node="103" data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;*&lt;/code&gt;). If you need a triangle of height &lt;code data-index-in-node="140" data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;6&lt;/code&gt; using hash symbols (&lt;code data-index-in-node="162" data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;/code&gt;) elsewhere in your program, you are forced to duplicate code.&lt;/p&gt;&lt;h2 data-path-to-node="11" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Step 2: Designing the Function Signature&lt;/h2&gt;&lt;p data-path-to-node="12" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;To make our triangle generator truly modular, we need to extract the core logic into a dedicated function. Let's analyze what inputs the function requires:&lt;/p&gt;&lt;ol data-path-to-node="13" start="1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="13,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="13,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code data-index-in-node="0" data-path-to-node="13,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;int height&lt;/code&gt;:&lt;/b&gt; Controls the total number of rows (the outer loop limit).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="13,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="13,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code data-index-in-node="0" data-path-to-node="13,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;char symbol&lt;/code&gt;:&lt;/b&gt; Controls the rendering character, adding flexibility beyond standard stars.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-path-to-node="14" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Thus, our function signature becomes:&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-303 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-303 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQ6Ak" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_9661634059e48459&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_2042bb0581723a1a&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-303" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-303" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-303 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-303 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;void&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printRightTriangle&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;(&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; height, &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;char&lt;/span&gt; symbol)&lt;/span&gt;&lt;/span&gt;;&lt;/div&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-303 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="17" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Step 3: Writing the Modular Implementation&lt;/h2&gt;&lt;p data-path-to-node="18" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Now let's encapsulate the original loop logic inside our new function definition. We will also include basic input validation to ensure safety against negative or zero heights.&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-304 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-304 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQ6Qk" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_9661634059e48459&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_2042bb0581723a1a&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-304" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-304" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-304 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-304 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-304" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-304" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Modular function definition&lt;/span&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;void&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printRightTriangle&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;(&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; height, &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;char&lt;/span&gt; symbol)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Input validation guard&lt;/span&gt;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; (height &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;) {
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Error: Height must be greater than zero.\n"&lt;/span&gt;);
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt;;
    }

    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Outer loop controls rows&lt;/span&gt;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= height; i++) {
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Inner loop controls columns, dynamically scaling with row 'i'&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%c "&lt;/span&gt;, symbol);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="21" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Step 4: Orchestrating the Function in &lt;code data-index-in-node="38" data-path-to-node="21" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/code&gt;&lt;/h2&gt;&lt;p data-path-to-node="22" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;With our reusable function built, the &lt;code data-index-in-node="38" data-path-to-node="22" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;main()&lt;/code&gt; function transforms into a clean coordinator. We can now call &lt;code data-index-in-node="107" data-path-to-node="22" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printRightTriangle&lt;/code&gt; multiple times with different arguments without repeating any loop logic.&lt;/p&gt;&lt;h3 data-path-to-node="23" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Complete Program&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-305 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-305 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQ6gk" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_9661634059e48459&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_2042bb0581723a1a&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-305" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-305" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-305 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-305 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-305" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-305" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Function Prototype&lt;/span&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;void&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printRightTriangle&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;(&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; height, &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;char&lt;/span&gt; symbol)&lt;/span&gt;&lt;/span&gt;;

&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"--- Triangle 1 (Height: 4, Symbol: *) ---\n"&lt;/span&gt;);
    printRightTriangle(&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;, &lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;'*'&lt;/span&gt;);

    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n--- Triangle 2 (Height: 6, Symbol: #) ---\n"&lt;/span&gt;);
    printRightTriangle(&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;6&lt;/span&gt;, &lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;'#'&lt;/span&gt;);

    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n--- Triangle 3 (Height: 3, Symbol: @) ---\n"&lt;/span&gt;);
    printRightTriangle(&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;, &lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;'@'&lt;/span&gt;);

    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}

&lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Function Definition&lt;/span&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;void&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printRightTriangle&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;(&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; height, &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;char&lt;/span&gt; symbol)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; (height &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;) {
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Error: Height must be greater than zero.\n"&lt;/span&gt;);
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt;;
    }

    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= height; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%c "&lt;/span&gt;, symbol);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="25" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Output&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-306 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-306 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQ6wk" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_9661634059e48459&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_2042bb0581723a1a&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-306" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-306" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-306 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-306 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;--- Triangle 1 (Height: 4, Symbol: *) ---&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-306" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-306" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;* 
* * 
* * * 
* * * * 

--- Triangle 2 (Height: 6, Symbol: #) ---
# 
# # 
# # # 
# # # # 
# # # # # 
# # # # # # 

--- Triangle 3 (Height: 3, Symbol: @) ---
@ 
@ @ 
@ @ @ 
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="28" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Summary of Takeaways&lt;/h2&gt;&lt;ol data-path-to-node="29" start="1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="29,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="29,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Dynamic Inner Loops:&lt;/b&gt; Even when an inner loop depends on an outer counter (&lt;code data-index-in-node="74" data-path-to-node="29,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j &amp;lt;= i&lt;/code&gt;), it can be safely encapsulated inside a parameterized function.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="29,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="29,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Reusability:&lt;/b&gt; Passing &lt;code data-index-in-node="26" data-path-to-node="29,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;height&lt;/code&gt; and &lt;code data-index-in-node="37" data-path-to-node="29,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;symbol&lt;/code&gt; transforms a single-use script into a dynamic utility capable of rendering countless variations.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="29,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="29,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Clean Architecture:&lt;/b&gt; Keeping your loop logic separate from your &lt;code data-index-in-node="63" data-path-to-node="29,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;main()&lt;/code&gt; execution flow makes your C programs significantly easier to read, test, and maintain.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFV8CEGyvsSzfxTAaLvKxh3W2j8owDdUmnDPyk5OXfPRPCWPw4eHtZtlBo1nREB6mWV2gVtUuXTxv105hQrJlMmPKySslmWHkqbZrvcOC7YE9sQg540GzAjqkM1QMGlrYzmV75PaMsk_L0HIbVRf1-SVn5sCJ1mQQ7bwlg0vqVK2Wy28N-xV2gcg-vzJ_Z/s72-w400-h219-c/8051MT-PPIC-FunsPgms-A02_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Building a Reusable Star Square Generator Using Parameterized C Functions</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-FunsPgms-A01.html</link><category>CCode</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Tue, 18 Aug 2026 13:12:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-8675408599758483399</guid><description>&lt;p style="text-align: justify;"&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_i-nfshRkayjz4VYsxZt5aHkUsdFazoPeJ9ZTvQcuDkXh4mquPLzlqhZq7qUOdUtD4MUkoME5z8082YPV9fUdXlV9dbuh9Y4PzUvUXsTicLTvfsbuk7aKkxARYPDq31WCUftLHal7DQwsEvvWwWsuw1HRUKuuSNolDMrNm22s1ANRVrhdRfv2TSxpqcWm/s1408/8051MT-PPIC-FunsPgms-A01_Im01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Building a Reusable Star Square Generator Using Parameterized C Functions" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_i-nfshRkayjz4VYsxZt5aHkUsdFazoPeJ9ZTvQcuDkXh4mquPLzlqhZq7qUOdUtD4MUkoME5z8082YPV9fUdXlV9dbuh9Y4PzUvUXsTicLTvfsbuk7aKkxARYPDq31WCUftLHal7DQwsEvvWwWsuw1HRUKuuSNolDMrNm22s1ANRVrhdRfv2TSxpqcWm/w400-h219/8051MT-PPIC-FunsPgms-A01_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;When you first begin learning C, printing a square pattern of stars usually involves hardcoding your loop boundaries or rewriting code every time you need a different size. While that works for quick practice, professional software engineering relies heavily on &lt;/span&gt;&lt;b data-index-in-node="262" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;reusability and parameterization&lt;/b&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;Instead of writing a custom loop every time you need a grid, you can build a flexible, reusable &lt;b data-index-in-node="96" data-path-to-node="3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Star Square Generator&lt;/b&gt; using parameterized C functions. In this guide, we will walk through how to design, build, and optimize a modular square generator that accepts customizable dimensions and symbols.&lt;/p&gt;&lt;h2 data-path-to-node="5" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1. Moving Beyond Hardcoded Loops&lt;/h2&gt;&lt;p data-path-to-node="6" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Consider a standard, monolithic script that prints a &lt;span class="math-inline" data-index-in-node="53" data-math="4 \times 4" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$4 \times 4$&lt;/span&gt; star square:&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-274 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-274 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQqQk" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_9ecb50f445ac4bfa&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_c03bc590945d663b&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-274" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-274" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-274 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-274 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-274" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-274" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;; i &amp;lt; n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;; j &amp;lt; n; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="8" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;While this prints the desired output, it lacks flexibility. If you suddenly need a &lt;span class="math-inline" data-index-in-node="83" data-math="3 \times 3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$3 \times 3$&lt;/span&gt; grid or want to swap asterisks for hash symbols (&lt;code data-index-in-node="143" data-path-to-node="8" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;/code&gt;), you have to rewrite your source code.&lt;/p&gt;&lt;h2 data-path-to-node="10" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;2. Designing the Parameterized Square Generator&lt;/h2&gt;&lt;p data-path-to-node="11" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;To solve this, we extract the core logic into a dedicated function. A truly reusable square generator should accept two key parameters:&lt;/p&gt;&lt;ol data-path-to-node="12" start="1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="12,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="12,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code data-index-in-node="0" data-path-to-node="12,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;int size&lt;/code&gt;:&lt;/b&gt; Determines both the height and width of the square grid (&lt;span class="math-inline" data-index-in-node="67" data-math="N \times N" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$N \times N$&lt;/span&gt;).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="12,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="12,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code data-index-in-node="0" data-path-to-node="12,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;char symbol&lt;/code&gt;:&lt;/b&gt; Allows the caller to specify what character renders the grid.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-path-to-node="13" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-275 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-275 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQqgk" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_9ecb50f445ac4bfa&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_c03bc590945d663b&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-275" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-275" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-275 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-275 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-275" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-275" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Reusable Star Square Generator Function&lt;/span&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;void&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;generateSquare&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;(&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; size, &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;char&lt;/span&gt; symbol)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Input validation for safety&lt;/span&gt;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; (size &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;) {
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Error: Size must be greater than zero.\n"&lt;/span&gt;);
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt;;
    }

    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;; i &amp;lt; size; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;; j &amp;lt; size; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%c "&lt;/span&gt;, symbol);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
}

&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"--- 3x3 Star Square ---\n"&lt;/span&gt;);
    generateSquare(&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;, &lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;'*'&lt;/span&gt;);

    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n--- 5x5 Hash Square ---\n"&lt;/span&gt;);
    generateSquare(&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;5&lt;/span&gt;, &lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;'#'&lt;/span&gt;);

    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="15" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Output&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-276 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-276 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQqwk" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_9ecb50f445ac4bfa&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_c03bc590945d663b&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-276" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-276" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-276 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-276 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;--- 3x3 Star Square ---&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-276" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-276" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;* * * 
* * * 
* * * 

--- 5x5 Hash Square ---
# # # # # 
# # # # # 
# # # # # 
# # # # # 
# # # # # 
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="18" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;3. Why This Approach Elevates Your Code&lt;/h2&gt;&lt;ul data-path-to-node="19" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="19,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="19,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Dynamic Versatility:&lt;/b&gt; By decoupling size and symbol from the function body, a single block of code can now generate squares of any dimension and character type.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="19,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="19,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Built-in Error Handling:&lt;/b&gt; Adding a basic conditional check (&lt;code data-index-in-node="59" data-path-to-node="19,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;size &amp;lt;= 0&lt;/code&gt;) ensures your program handles unexpected or invalid arguments gracefully without crashing.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="19,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="19,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Clean Orchestration:&lt;/b&gt; Your &lt;code data-index-in-node="26" data-path-to-node="19,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;main()&lt;/code&gt; function transforms from a messy collection of nested loops into a clean dashboard that simply calls &lt;code data-index-in-node="134" data-path-to-node="19,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;generateSquare()&lt;/code&gt; with different arguments.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="21" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Conclusion&lt;/h2&gt;&lt;p data-path-to-node="22" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;Building a reusable star square generator is a fantastic stepping stone toward mastering modular programming in C. By wrapping your loop logic inside parameterized functions, you write cleaner, more adaptable, and enterprise-ready software!&lt;/p&gt;&lt;p data-path-to-node="22" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_i-nfshRkayjz4VYsxZt5aHkUsdFazoPeJ9ZTvQcuDkXh4mquPLzlqhZq7qUOdUtD4MUkoME5z8082YPV9fUdXlV9dbuh9Y4PzUvUXsTicLTvfsbuk7aKkxARYPDq31WCUftLHal7DQwsEvvWwWsuw1HRUKuuSNolDMrNm22s1ANRVrhdRfv2TSxpqcWm/s72-w400-h219-c/8051MT-PPIC-FunsPgms-A01_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Library Book Details || C Lab Programs</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-CLabPgms-A14-LibraryBookDetails.html</link><category>CCode</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Mon, 17 Aug 2026 16:25:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-6049897774474418575</guid><description>&lt;p&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-weight: 700; white-space: pre-wrap;"&gt;Program 14: Store and display library book details using structures.&lt;/span&gt;&lt;/p&gt;&lt;span id="docs-internal-guid-e180f1de-7fff-da09-a39d-9b2c4de45a4b"&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Statement::&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; A local library needs to store and display details of its books, including the title, author, and year of publication. Design a structure that can hold these details and develop a C program to display a list of all books entered.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Description:&lt;/span&gt;&lt;/p&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Input:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The total number of books (&lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;), followed by the title (string), author (string), and year of publication (integer) for each book.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; A formatted list displaying each book's details in the format: "Book &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;i&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;: Title by Author (Year)".&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Constraints:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The number of books must be greater than zero; the year must be a positive integer; input strings should be less than 50 characters.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Method:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Define a &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;struct Book&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; to organize the disparate data types (strings and integers) into a single record.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Pgm Logic:&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Start.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Define a &lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;structure&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; named &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Book&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; containing character arrays for &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;title&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; and &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;author&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;, and an integer for &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;year&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input the total number of books &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Declare an &lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;array of structures&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; named &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;booklist&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; of size &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Use a &lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;for-loop&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; to iterate from &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;0&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; to &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n-1&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Prompt and read the title, author, and year for each book using a method that accepts spaces.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Use another &lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;for-loop&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; to iterate through the array:&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Display the stored details for each book in the required format.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Stop.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Code:&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;// Purpose: To store and display library book details using C structures.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;// Define the structure to hold diverse book details&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;struct Book {&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;char title[15];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;char author[15];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int year;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;};&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;int main() {&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int n, i;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter number of books: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d", &amp;amp;n);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Declare an array of structures based on user input size&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;struct Book booklist[n];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i = 0; i &amp;lt; n; i++) {&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("\nEnter details for book %d:\n", i + 1);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Title: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// " %[^\n]s" reads the entire line including spaces&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf(" %[^\n]s", booklist[i].title);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Author: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf(" %[^\n]s", booklist[i].author);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Year of Publication: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d", &amp;amp;booklist[i].year);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("\nLibrary Book Details:\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("---------------------------\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i = 0; i &amp;lt; n; i++) {&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Accessing structure members using the dot (.) operator&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Book %d: %s by %s (%d)\n", i + 1, booklist[i].title, booklist[i].author, booklist[i].year);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter number of books: 2&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter details for book 1:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Title: C Programming&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Author: Dennis Ritchie&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Year of Publication: 1978&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter details for book 2:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Title: Digital Design&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Author: Morris Mano&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Year of Publication: 2017&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Library Book Details:&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Book 1: C Programming by Dennis Ritchie (1978)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Book 2: Digital Design by Morris Mano (2017)&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;RESULT:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Thus the program has been executed and the output was verified.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Remarks:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; This program was compiled and run in the &lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Code::Blocks IDE&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;. It demonstrates how structures can act like a mini-database in memory. Using the space before &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;%[&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; in &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;scanf&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; is essential to clear any leftover newline characters from the previous numeric input.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Explanation:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The program uses a &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;struct&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; to group a book's title, author, and year into a single unit. By creating an array of these structures, we can store multiple book records efficiently. The code utilizes a loop to collect data for each book and another loop to traverse the array and print the details using the dot (&lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;) operator to access individual fields within each structure.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published C Lab Program posts Index page: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/08/CLabProgrampostsIndex.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published articles list: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/01/8051MT01022026PublishedArticlesIndexPage.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Advanced Modular Patterns: Designing Complex Multi-Shape Systems with C Functions</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-FunsArticles-A03.html</link><category>Article</category><category>CCode</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Mon, 17 Aug 2026 13:08:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-2393057843127212548</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7hQjyG4sR9Oliu0kbGSyVTF4Zkqz_ACjCPteZCILOX6wVve8S0b1hsaeAc0f9CYL9whZuvbpZFA0AD0f5gxoGfT4tRwTlaAM-wuKXkGjVjhrIrLHIs9n-u82NJbg4XouKqQ1XxISrTrQuN8iG1PqS73Vl5D79yqRWrZyatmRf5kIeuTYZtZgMhkqkcZ8v/s1408/8051MT-PPIC-FunsArticles-A03_Im01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Advanced Modular Patterns: Designing Complex Multi-Shape Systems with C Functions" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7hQjyG4sR9Oliu0kbGSyVTF4Zkqz_ACjCPteZCILOX6wVve8S0b1hsaeAc0f9CYL9whZuvbpZFA0AD0f5gxoGfT4tRwTlaAM-wuKXkGjVjhrIrLHIs9n-u82NJbg4XouKqQ1XxISrTrQuN8iG1PqS73Vl5D79yqRWrZyatmRf5kIeuTYZtZgMhkqkcZ8v/w400-h219/8051MT-PPIC-FunsArticles-A03_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;When you master passing arguments like height, width, and custom symbols to your pattern functions, you unlock a powerful capability: &lt;b data-index-in-node="134" data-path-to-node="2"&gt;composability&lt;/b&gt;. Instead of viewing pattern printing as a series of isolated exercises, you can begin treating individual patterns as building blocks—or micro-components—within a larger multi-shape system.&lt;/p&gt;&lt;p data-path-to-node="3" style="text-align: justify;"&gt;In this final installment of our modular programming series, we will explore how to architect advanced, multi-shape systems in C by combining reusable functions, orchestration logic, and clean separation of concerns.&lt;/p&gt;&lt;h2 data-path-to-node="5"&gt;1. The Vision: Multi-Shape Orchestration&lt;/h2&gt;&lt;p data-path-to-node="6"&gt;Imagine building a text-based dashboard, a retro terminal menu, or a composite geometric art banner. These applications rarely render just a single shape. They require printing a header banner, a centered pyramid, a series of dividing lines, and an aligned footer matrix—all in a coordinated sequence.&lt;/p&gt;&lt;p data-path-to-node="7"&gt;If you attempt this with monolithic code, your script quickly spirals into an unmaintainable tangle of loops. With &lt;b data-index-in-node="115" data-path-to-node="7"&gt;advanced modular design&lt;/b&gt;, your &lt;code data-index-in-node="145" data-path-to-node="7"&gt;main()&lt;/code&gt; function becomes a clean conductor orchestrating specialized worker functions.&lt;/p&gt;&lt;h2 data-path-to-node="9"&gt;2. Designing a Multi-Shape System&lt;/h2&gt;&lt;p data-path-to-node="10"&gt;To build a clean multi-shape system, we structure our code into three distinct tiers:&lt;/p&gt;&lt;ol data-path-to-node="11" start="1"&gt;&lt;li&gt;&lt;p data-path-to-node="11,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="11,0,0"&gt;The Primitive Layer:&lt;/b&gt; Simple helper functions that print fundamental lines or rows.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="11,1,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="11,1,0"&gt;The Component Layer:&lt;/b&gt; Complex shape functions (e.g., pyramids, diamonds, hollow borders) built using our primitive loops.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="11,2,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="11,2,0"&gt;The Orchestration Layer (&lt;code data-index-in-node="25" data-path-to-node="11,2,0"&gt;main&lt;/code&gt;):&lt;/b&gt; A coordinator function that sequences the components together into a cohesive visual output.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-path-to-node="12"&gt;Code Implementation: Composite Pattern System&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-253 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-253 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQ9Qg" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_b587369668a56a91&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_caf62b176dbcbd08&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-253"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-253"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-253 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-253 ng-star-inserted"&gt;#&lt;span class="hljs-meta-keyword"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-253"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-253" data-test-id="code-content" role="text"&gt;
&lt;span class="hljs-comment"&gt;// Component 1: Prints a horizontal divider line&lt;/span&gt;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;printDivider&lt;/span&gt;&lt;span class="hljs-params"&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; length, &lt;span class="hljs-keyword"&gt;char&lt;/span&gt; symbol)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number"&gt;0&lt;/span&gt;; i &amp;lt; length; i++) {
        &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"%c"&lt;/span&gt;, symbol);
    }
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n"&lt;/span&gt;);
}

&lt;span class="hljs-comment"&gt;// Component 2: Prints a centered pyramid&lt;/span&gt;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;printPyramid&lt;/span&gt;&lt;span class="hljs-params"&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; height, &lt;span class="hljs-keyword"&gt;char&lt;/span&gt; symbol)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; i &amp;lt;= height; i++) {
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; space = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; space &amp;lt;= (height - i); space++) {
            &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;" "&lt;/span&gt;);
        }
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; star = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; star &amp;lt;= (&lt;span class="hljs-number"&gt;2&lt;/span&gt; * i - &lt;span class="hljs-number"&gt;1&lt;/span&gt;); star++) {
            &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"%c"&lt;/span&gt;, symbol);
        }
        &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n"&lt;/span&gt;);
    }
}

&lt;span class="hljs-comment"&gt;// Component 3: Prints a solid rectangular block&lt;/span&gt;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;printBlock&lt;/span&gt;&lt;span class="hljs-params"&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; height, &lt;span class="hljs-keyword"&gt;int&lt;/span&gt; width, &lt;span class="hljs-keyword"&gt;char&lt;/span&gt; symbol)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number"&gt;0&lt;/span&gt;; i &amp;lt; height; i++) {
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number"&gt;0&lt;/span&gt;; j &amp;lt; width; j++) {
            &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"%c "&lt;/span&gt;, symbol);
        }
        &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n"&lt;/span&gt;);
    }
}

&lt;span class="hljs-comment"&gt;// Orchestration Layer: Combining components into a multi-shape system&lt;/span&gt;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; &lt;span class="hljs-title"&gt;main&lt;/span&gt;&lt;span class="hljs-params"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword"&gt;int&lt;/span&gt; span = &lt;span class="hljs-number"&gt;15&lt;/span&gt;;
    
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"=== SYSTEM RENDER START ===\n"&lt;/span&gt;);
    printDivider(span, &lt;span class="hljs-string"&gt;'='&lt;/span&gt;);
    
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n[1] Rendering Header Pyramid:\n"&lt;/span&gt;);
    printPyramid(&lt;span class="hljs-number"&gt;4&lt;/span&gt;, &lt;span class="hljs-string"&gt;'*'&lt;/span&gt;);
    
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n"&lt;/span&gt;);
    printDivider(span, &lt;span class="hljs-string"&gt;'-'&lt;/span&gt;);
    
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n[2] Rendering Data Block:\n"&lt;/span&gt;);
    printBlock(&lt;span class="hljs-number"&gt;3&lt;/span&gt;, &lt;span class="hljs-number"&gt;4&lt;/span&gt;, &lt;span class="hljs-string"&gt;'#'&lt;/span&gt;);
    
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n"&lt;/span&gt;);
    printDivider(span, &lt;span class="hljs-string"&gt;'='&lt;/span&gt;);
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"=== SYSTEM RENDER END ===\n"&lt;/span&gt;);
    
    &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; &lt;span class="hljs-number"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="14"&gt;Output&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-254 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-254 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQ9gg" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_b587369668a56a91&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_caf62b176dbcbd08&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-254"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-254"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-254 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-254 ng-star-inserted"&gt;=== SYSTEM RENDER START ===&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-254"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-254" data-test-id="code-content" role="text"&gt;===============

[1] Rendering Header Pyramid:
   *
  ***
 *****
*******

---------------

[2] Rendering Data Block:
# # # # 
# # # # 
# # # # 

===============
=== SYSTEM RENDER END ===
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="17"&gt;3. Benefits of Scaling to Multi-Shape Systems&lt;/h2&gt;&lt;ul data-path-to-node="18"&gt;&lt;li&gt;&lt;p data-path-to-node="18,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,0,0"&gt;DRY Principle (Don't Repeat Yourself):&lt;/b&gt; Notice how &lt;code data-index-in-node="50" data-path-to-node="18,0,0"&gt;printDivider&lt;/code&gt; can be reused multiple times across the program with different lengths and symbols (&lt;code data-index-in-node="147" data-path-to-node="18,0,0"&gt;=&lt;/code&gt; vs &lt;code data-index-in-node="152" data-path-to-node="18,0,0"&gt;-&lt;/code&gt;). You don't rewrite loop logic for visual separators.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="18,1,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,1,0"&gt;Independent Testability:&lt;/b&gt; Each shape function (&lt;code data-index-in-node="46" data-path-to-node="18,1,0"&gt;printPyramid&lt;/code&gt;, &lt;code data-index-in-node="60" data-path-to-node="18,1,0"&gt;printBlock&lt;/code&gt;) can be tested, debugged, and optimized independently before being plugged into the larger system.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="18,2,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,2,0"&gt;Scalability:&lt;/b&gt; Adding a new shape (like a diamond or a hollow border) simply requires writing a new function and invoking it in your orchestration sequence, leaving existing code untouched.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="20"&gt;Conclusion&lt;/h2&gt;&lt;p data-path-to-node="21" style="text-align: justify;"&gt;What started as a simple exploration of single-dimensional loops has now evolved into enterprise-grade modular thinking. By breaking complex visual outputs into parameterized, reusable components managed by clean orchestration functions, you have mastered the true essence of software design in C.&lt;/p&gt;&lt;p data-path-to-node="22" style="text-align: justify;"&gt;Take these principles, build your own multi-shape dashboards, and enjoy the power of clean, modular code!&lt;/p&gt;&lt;p data-path-to-node="22"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7hQjyG4sR9Oliu0kbGSyVTF4Zkqz_ACjCPteZCILOX6wVve8S0b1hsaeAc0f9CYL9whZuvbpZFA0AD0f5gxoGfT4tRwTlaAM-wuKXkGjVjhrIrLHIs9n-u82NJbg4XouKqQ1XxISrTrQuN8iG1PqS73Vl5D79yqRWrZyatmRf5kIeuTYZtZgMhkqkcZ8v/s72-w400-h219-c/8051MT-PPIC-FunsArticles-A03_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Currency Exchange Simulation || C Lab Programs</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-CLabPgms-A13-CurrencyExchangeSimulation.html</link><category>CCode</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Sun, 16 Aug 2026 16:22:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-1391737043926679712</guid><description>&lt;p&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-weight: 700; white-space: pre-wrap;"&gt;Program 13: Simulate currency exchange using Call by Value and Reference.&lt;/span&gt;&lt;/p&gt;&lt;span id="docs-internal-guid-29ae176e-7fff-78bc-bfb7-de3d119d7894"&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Statement::&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; A currency exchange booth allows users to convert currencies. Before confirming, the system simulates a swap for a preview (without changing original data). In other cases, it updates the actual values permanently. Implement both behaviors using Call by Value and Call by Reference.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Description:&lt;/span&gt;&lt;/p&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Input:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Two integer values representing two currencies (&lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;x, y&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;).&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The results showing both a preview swap and an actual permanent swap.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Constraints:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Call by Value must leave original data unchanged; Call by Reference must modify the original variables.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Method:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Implement two distinct functions: one receiving values and another receiving memory addresses (pointers).&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Pgm Logic:&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Start.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input values &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;x&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; and &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;y&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Call &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;swapByValue(x, y)&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Inside: Swap local copies and print the "Preview" result.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Print &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;x&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; and &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;y&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; in main (verifying they are unchanged).&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Call &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;swapByReference(&amp;amp;x, &amp;amp;y)&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Inside: Swap values at the provided addresses using pointers and print "Actual" result.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Print updated &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;x&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; and &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;y&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; in main.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Stop.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Code:&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;// Purpose: To implement and compare Call by Value and Call by Reference behaviors in a simulation.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;void swapByValue(int a, int b) {&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int temp = a;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a = b;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b = temp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Preview Swap (By Value): %d %d\n", a, b);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;void swapByReference(int *a, int *b) {&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int temp = *a;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*a = *b;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*b = temp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Actual Swap (By Reference): %d %d\n", *a, *b);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;int main() {&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int x, y;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter two currency values: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d %d", &amp;amp;x, &amp;amp;y);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;swapByValue(x, y);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("After Call by Value (Original): %d %d\n", x, y);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;swapByReference(&amp;amp;x, &amp;amp;y);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("After Call by Reference (Updated): %d %d\n", x, y);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter two currency values: 10 20&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Preview Swap (By Value): 20 10&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;After Call by Value (Original): 10 20&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Actual Swap (By Reference): 20 10&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;After Call by Reference (Updated): 20 10&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;RESULT:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Thus the program has been executed and the output was verified.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Remarks:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Compiled in &lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Code::Blocks&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;. This program clearly demonstrates the difference between working with a copy of data versus working with the original data via pointers.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Explanation:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; In "Call by Value," the function creates temporary copies of the inputs, so the swap only exists inside the function. In "Call by Reference," the function receives the actual memory addresses, allowing it to modify the original variables permanently.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published C Lab Program posts Index page: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/08/CLabProgrampostsIndex.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published articles list: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/01/8051MT01022026PublishedArticlesIndexPage.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Passing Arguments to Pattern Functions in C: Controlling Height, Width, and Symbols Dynamically</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-FunsArticles-A02.html</link><category>Article</category><category>CCode</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Sun, 16 Aug 2026 13:03:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-1052291760772866842</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj26PIBouvFr0xQp2-zxaAKExGTz7NxEceS5hMz_aZKwmFhcied36hJuFOESuEcOqtkkptHZbiJlIp_zVv1LFA0ouVtBcEbCnPqBpLUKXIFF6RS1upnxtkpfDbScoi-dpQLqFL1nDLaQiaGBeP1_THTDDQrg8Ixmhn17s3k-hHJWaPxu5M0dXiRPyMRE2Rw/s1408/8051MT-PPIC-FunsArticles-A02_Im01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Passing Arguments to Pattern Functions in C: Controlling Height, Width, and Symbols Dynamically" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj26PIBouvFr0xQp2-zxaAKExGTz7NxEceS5hMz_aZKwmFhcied36hJuFOESuEcOqtkkptHZbiJlIp_zVv1LFA0ouVtBcEbCnPqBpLUKXIFF6RS1upnxtkpfDbScoi-dpQLqFL1nDLaQiaGBeP1_THTDDQrg8Ixmhn17s3k-hHJWaPxu5M0dXiRPyMRE2Rw/w400-h219/8051MT-PPIC-FunsArticles-A02_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;When you first begin modularizing your pattern programs using functions, you naturally start by passing a single argument—usually representing the number of rows or the size of the shape. While this is a massive upgrade from monolithic code, it still leaves your functions somewhat rigid. What if you want to print a rectangle instead of a square, requiring separate height and width parameters? What if you want to swap out the classic star (&lt;code data-index-in-node="443" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;*&lt;/code&gt;) for a hash (&lt;code data-index-in-node="458" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;/code&gt;), a dollar sign (&lt;code data-index-in-node="477" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;$&lt;/code&gt;), or even a letter?&lt;/p&gt;&lt;p data-path-to-node="3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;To build truly versatile, enterprise-grade utility functions in C, you need to master &lt;b data-index-in-node="86" data-path-to-node="3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;passing multiple parameters&lt;/b&gt; to control dimensions and characters dynamically. In this post, we will explore how to design flexible pattern functions that accept height, width, and custom symbols as arguments.&lt;/p&gt;&lt;h2 data-path-to-node="5" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1. The Limitations of Single-Parameter Functions&lt;/h2&gt;&lt;p data-path-to-node="6" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Consider a standard function designed to print a square:&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-231 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-231 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQvwg" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_0b9284fab40913f7&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7353ad35f6e7bd51&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-231" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-231" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-231 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;void&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printSquare&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;(&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n)&lt;/span&gt; &lt;/span&gt;{&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-231" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-231" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;; i &amp;lt; n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;; j &amp;lt; n; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="8" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;While &lt;code data-index-in-node="6" data-path-to-node="8" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printSquare(5)&lt;/code&gt; works fine, it forces a strict &lt;span class="math-inline" data-index-in-node="52" data-math="5 \times 5" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$5 \times 5$&lt;/span&gt; grid using only asterisks. It cannot handle rectangles (where height &lt;span class="math-inline" data-index-in-node="132" data-math="\neq" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$\neq$&lt;/span&gt; width), nor can it adapt if your user interface requires a different rendering character.&lt;/p&gt;&lt;p data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;By expanding our parameter list, we hand complete control over to the caller.&lt;/p&gt;&lt;h2 data-path-to-node="11" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;2. Designing a Multi-Parameter Function&lt;/h2&gt;&lt;p data-path-to-node="12" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;To make our pattern generator fully dynamic, our function signature needs to accept three distinct arguments:&lt;/p&gt;&lt;ol data-path-to-node="13" start="1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="13,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="13,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code data-index-in-node="0" data-path-to-node="13,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;int height&lt;/code&gt;:&lt;/b&gt; Controls the vertical scope (number of outer loop iterations / rows).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="13,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="13,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code data-index-in-node="0" data-path-to-node="13,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;int width&lt;/code&gt;:&lt;/b&gt; Controls the horizontal scope (number of inner loop iterations / columns).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="13,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="13,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code data-index-in-node="0" data-path-to-node="13,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;char symbol&lt;/code&gt;:&lt;/b&gt; The character used to render the pattern itself.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-path-to-node="14" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation: Dynamic Rectangle Generator&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-232 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-232 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQwAg" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_0b9284fab40913f7&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7353ad35f6e7bd51&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-232" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-232" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-232 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;br /&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-232 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-232" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-232" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Function that accepts height, width, and a custom symbol&lt;/span&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;void&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printRectangle&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;(&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; height, &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; width, &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;char&lt;/span&gt; symbol)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;; i &amp;lt; height; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;; j &amp;lt; width; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%c "&lt;/span&gt;, symbol);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
}

&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Printing a 3x6 grid using '#'&lt;/span&gt;
    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Rectangle 1 (#):\n"&lt;/span&gt;);
    printRectangle(&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;, &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;6&lt;/span&gt;, &lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;'#'&lt;/span&gt;);
    
    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);

    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Printing a 4x4 grid using '$'&lt;/span&gt;
    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Rectangle 2 ($):\n"&lt;/span&gt;);
    printRectangle(&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;, &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;, &lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;'$'&lt;/span&gt;);

    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="16" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Output&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-233 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-233 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQwQg" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_0b9284fab40913f7&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7353ad35f6e7bd51&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-233" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-233" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-233 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-233 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Rectangle 1 (#):&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-233" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-233" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;# # # # # # 
# # # # # # 
# # # # # # 

Rectangle 2 ($):
$ $ $ $ 
$ $ $ $ 
$ $ $ $ 
$ $ $ $ 
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="19" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;3. Applying Dynamic Arguments to Triangles&lt;/h2&gt;&lt;p data-path-to-node="20" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Triangles present a unique challenge because their width changes dynamically depending on the row. However, we can still use parameters to control the &lt;b data-index-in-node="151" data-path-to-node="20" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;total height&lt;/b&gt; and the &lt;b data-index-in-node="172" data-path-to-node="20" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;rendering symbol&lt;/b&gt;.&lt;/p&gt;&lt;h3 data-path-to-node="21" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation: Custom Triangle&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-234 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-234 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQwgg" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_0b9284fab40913f7&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7353ad35f6e7bd51&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-234" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-234" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-234 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-234 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;br /&gt;&lt;gem-icon-button _ngcontent-ng-c3788586330="" _nghost-ng-c1256235956="" aria-describedby="cdk-describedby-message-ng-1-20" arialabel="Copy code" cdk-describedby-host="ng-1" class="mat-mdc-tooltip-trigger copy-button ng-tns-c3788586330-234 gem-button gem-button-badge-size-small gem-button-size-small gem-button-type-on-surface lm-enabled ng-star-inserted" data-test-id="gem-copy-button" fonticonname="copy" gemtooltip="Copy code" size="small" style="line-height: 1.15 !important; margin-top: 0px !important;" tabindex="-1" theme="lm" type="onSurface"&gt;&lt;!----&gt;&lt;!----&gt;&lt;/gem-icon-button&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-234" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-234" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-meta" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;void&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printCustomTriangle&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;(&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; height, &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;char&lt;/span&gt; symbol)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= height; i++) {
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Inner loop runs up to 'i', scaling width with the row&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%c "&lt;/span&gt;, symbol);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
}

&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; rows = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    
    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Triangle using '&amp;amp;':\n"&lt;/span&gt;);
    printCustomTriangle(rows, &lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;'&amp;amp;'&lt;/span&gt;);
    
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="23" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Output&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-235 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-235 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQwwg" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_0b9284fab40913f7&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7353ad35f6e7bd51&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-235" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-235" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-235 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-235 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Triangle using '&amp;amp;':&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-235" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-235" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;amp; 
&amp;amp; &amp;amp; 
&amp;amp; &amp;amp; &amp;amp; 
&amp;amp; &amp;amp; &amp;amp; &amp;amp; 
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="26" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Best Practices for Parameterized Functions&lt;/h2&gt;&lt;ol data-path-to-node="27" start="1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="27,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="27,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Use Descriptive Parameter Names:&lt;/b&gt; When writing functions with multiple arguments like &lt;code data-index-in-node="85" data-path-to-node="27,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printShape(int h, int w, char s)&lt;/code&gt;, it is easy to mix up the order. Use clear names like &lt;code data-index-in-node="172" data-path-to-node="27,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;height&lt;/code&gt;, &lt;code data-index-in-node="180" data-path-to-node="27,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;width&lt;/code&gt;, and &lt;code data-index-in-node="191" data-path-to-node="27,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;symbol&lt;/code&gt; to make your code self-documenting.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="27,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="27,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Validate Your Inputs:&lt;/b&gt; Always guard against invalid arguments (such as negative heights or widths) by adding simple validation checks at the beginning of your function:&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-236 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-236 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQxAg" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_0b9284fab40913f7&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7353ad35f6e7bd51&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-236" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-236" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-236 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-236 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; (height &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt; || width &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;) {&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-236" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-236" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;    &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Error: Dimensions must be greater than zero.\n"&lt;/span&gt;);
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="27,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="27,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Leverage Character Literals:&lt;/b&gt; Remember to pass characters using single quotes (e.g., &lt;code data-index-in-node="84" data-path-to-node="27,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;'*'&lt;/code&gt;, &lt;code data-index-in-node="89" data-path-to-node="27,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;'@'&lt;/code&gt;) when calling your functions, as characters in C are processed as ASCII integer values under the hood.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-path-to-node="28" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;By passing height, width, and symbols dynamically, you transform rigid, hardcoded scripts into flexible, reusable building blocks. This modular mindset is an essential trait of professional C software engineering!&lt;/p&gt;&lt;p data-path-to-node="28" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj26PIBouvFr0xQp2-zxaAKExGTz7NxEceS5hMz_aZKwmFhcied36hJuFOESuEcOqtkkptHZbiJlIp_zVv1LFA0ouVtBcEbCnPqBpLUKXIFF6RS1upnxtkpfDbScoi-dpQLqFL1nDLaQiaGBeP1_THTDDQrg8Ixmhn17s3k-hHJWaPxu5M0dXiRPyMRE2Rw/s72-w400-h219-c/8051MT-PPIC-FunsArticles-A02_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Mobile Contact Manager || C Lab Programs</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-CLabPgms-A12-MobileContactManager.html</link><category>CCode</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Sat, 15 Aug 2026 16:06:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-6447488276783355841</guid><description>&lt;p&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-weight: 700; white-space: pre-wrap;"&gt;Program 12: Manually join names and check screen fit.&lt;/span&gt;&lt;/p&gt;&lt;span id="docs-internal-guid-a108e24b-7fff-8e44-20b3-d9134cd0f7a9"&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Statement::&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; A basic mobile contact manager stores first and last names separately. For displaying full names in the contact list, the system needs to join them manually. Additionally, the system must check the length of each full name to ensure it fits within the 20-character screen limit.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Description:&lt;/span&gt;&lt;/p&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Input:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; First name (string) and Last name (string).&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Full name joined by a space, the total length, and a fit/no-fit message.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Constraints:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Implement without using built-in string functions (like &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;strcat&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; or &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;strlen&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;); screen limit is 20 characters.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Method:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Use character arrays and manual &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;while&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; loops to copy characters and calculate length.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Pgm Logic:&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Start.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;first&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; name and &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;last&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; name strings.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Initialize indices &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;i = 0&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;, &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;j = 0&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;, and &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;length = 0&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Loop through the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;first&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; name array until the null terminator (&lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;\0&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;) is reached, copying each character into the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;full&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; name array and incrementing &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;length&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Insert a space character (' ') into &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;full[length]&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; and increment &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;length&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Loop through the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;last&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; name array until &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;\0&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;, copying characters into &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;full&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; name and incrementing &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;length&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Terminate the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;full&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; name string by adding &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;\0&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; at the end.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Print the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;full&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; name and its calculated &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;length&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;If &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;length &amp;gt; 20&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;, print "Name too long for screen"; otherwise, print "Name fits the screen".&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Stop.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Code:&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;// Purpose: To join first and last names manually and verify if they fit a 20-character screen.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;int main()&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;char first[10], last[10], full[20];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int i = 0, j = 0, length = 0;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter first name: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%s", first);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter last name: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%s", last);&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Manually copy first name into the full name array&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(first[i] != '\0')&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;full[length++] = first[i++];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Manually add a space between names&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;full[length++] = ' ';&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Manually copy last name into the full name array&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(last[j] != '\0')&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;full[length++] = last[j++];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Manually terminate the new string with a null character&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;full[length] = '\0';&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Full Name: %s\n", full);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Total Length: %d\n", length);&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(length &amp;gt; 20)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Name too long for screen.\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Name fits the screen.\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter first name: Alexander&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter last name: Johnson&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Full Name: Alexander Johnson&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Total Length: 18&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Name fits the screen.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;RESULT:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Thus the program has been executed and the output was verified.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Remarks:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; This program was successfully compiled and tested in the &lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;onlineGDB tool&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;. It bypasses &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;string.h&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; by directly interacting with the character indices of the arrays.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Explanation:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Strings in C are essentially arrays of characters ending with a &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;\0&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; (null) character. The program uses &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;while&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; loops to travel through the input arrays, stopping only when the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;\0&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; is detected. By manually moving characters to a third array (&lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;full&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;), we perform concatenation. The final length check ensures the combined string doesn't exceed the hypothetical 20-character mobile display.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published C Lab Program posts Index page: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/08/CLabProgrampostsIndex.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published articles list: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/01/8051MT01022026PublishedArticlesIndexPage.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Functions for Pattern Programs in C: A Beginner’s Guide to Modular Design</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-FunsArticles-A01.html</link><category>Article</category><category>CCode</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Sat, 15 Aug 2026 12:59:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-1430460843359267287</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI-df9EKhrBRdR3WxxW7Bhi5yyBk7x1VCLLRMz533-kogJ5AesiXio0mgmTpoRuMrbns0gBJ7Rgkvz0bEyyHSdoe857znDL0MciO2jbRmexWbPUuQuFujBsQ9LZbw_zkCqEBfllt_6_k6QCnFHXU_OKQ41tdWMM_zYrW-6RujnQ_9n7qC_YEAs-Sl6TRRI/s1408/8051MT-PPIC-FunsArticles-A01_Im01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Functions for Pattern Programs in C: A Beginner’s Guide to Modular Design" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI-df9EKhrBRdR3WxxW7Bhi5yyBk7x1VCLLRMz533-kogJ5AesiXio0mgmTpoRuMrbns0gBJ7Rgkvz0bEyyHSdoe857znDL0MciO2jbRmexWbPUuQuFujBsQ9LZbw_zkCqEBfllt_6_k6QCnFHXU_OKQ41tdWMM_zYrW-6RujnQ_9n7qC_YEAs-Sl6TRRI/w400-h219/8051MT-PPIC-FunsArticles-A01_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p data-path-to-node="2"&gt;When you first start writing pattern programs in C, everything usually lives inside a single &lt;code data-index-in-node="93" data-path-to-node="2"&gt;main()&lt;/code&gt; function. You write your outer loop, your inner loop, your print statements, and your newlines all in one long, monolithic block of code.&lt;/p&gt;&lt;p data-path-to-node="3"&gt;While this works great for learning basic loop mechanics, it quickly becomes messy when you want to print multiple patterns, change sizes dynamically, or scale your code. The solution? &lt;b data-index-in-node="185" data-path-to-node="3"&gt;Modular design using functions.&lt;/b&gt;&lt;/p&gt;&lt;p data-path-to-node="4"&gt;In this guide, we will explore how to transition your pattern programs from rigid, single-file scripts into clean, reusable, and modular C functions.&lt;/p&gt;&lt;h2 data-path-to-node="6"&gt;1. The Problem with Monolithic Pattern Code&lt;/h2&gt;&lt;p data-path-to-node="7"&gt;Imagine you want to print a square pattern, a right-angled triangle, and a pyramid in the same C program. If everything is written inside &lt;code data-index-in-node="138" data-path-to-node="7"&gt;main()&lt;/code&gt;, your code will look something like this:&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-200 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-200 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQhwg" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_d0003d63ba0e3283&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_33b2dee0dc119d4e&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-200"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-200"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-200 ng-star-inserted"&gt;#&lt;span class="hljs-meta-keyword"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-200"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-200" data-test-id="code-content" role="text"&gt;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; &lt;span class="hljs-title"&gt;main&lt;/span&gt;&lt;span class="hljs-params"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-comment"&gt;// Square Pattern&lt;/span&gt;
    &lt;span class="hljs-keyword"&gt;int&lt;/span&gt; n1 = &lt;span class="hljs-number"&gt;4&lt;/span&gt;;
    &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; i &amp;lt;= n1; i++) {
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; j &amp;lt;= n1; j++) {
            &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n"&lt;/span&gt;);
    }

    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n"&lt;/span&gt;);

    &lt;span class="hljs-comment"&gt;// Triangle Pattern&lt;/span&gt;
    &lt;span class="hljs-keyword"&gt;int&lt;/span&gt; n2 = &lt;span class="hljs-number"&gt;4&lt;/span&gt;;
    &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; i &amp;lt;= n2; i++) {
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n"&lt;/span&gt;);
    }

    &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; &lt;span class="hljs-number"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="9"&gt;As you can see, this approach creates repetitive code blocks, clutters your workspace, and makes debugging difficult if something goes wrong.&lt;/p&gt;&lt;h2 data-path-to-node="11"&gt;2. What is Modular Design?&lt;/h2&gt;&lt;p data-path-to-node="12"&gt;Modular design is the practice of breaking a large program down into smaller, self-contained, and manageable pieces—known as &lt;b data-index-in-node="125" data-path-to-node="12"&gt;functions&lt;/b&gt;.&lt;/p&gt;&lt;p data-path-to-node="13"&gt;Instead of forcing &lt;code data-index-in-node="19" data-path-to-node="13"&gt;main()&lt;/code&gt; to handle everything, you isolate specific tasks:&lt;/p&gt;&lt;ul data-path-to-node="14"&gt;&lt;li&gt;&lt;p data-path-to-node="14,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="14,0,0"&gt;The Logic Isolator:&lt;/b&gt; Each pattern gets its own dedicated function (e.g., &lt;code data-index-in-node="72" data-path-to-node="14,0,0"&gt;printSquare()&lt;/code&gt;, &lt;code data-index-in-node="87" data-path-to-node="14,0,0"&gt;printTriangle()&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="14,1,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="14,1,0"&gt;The Driver (&lt;code data-index-in-node="12" data-path-to-node="14,1,0"&gt;main&lt;/code&gt;):&lt;/b&gt; The &lt;code data-index-in-node="23" data-path-to-node="14,1,0"&gt;main()&lt;/code&gt; function simply acts as a coordinator, calling these functions whenever needed.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="16"&gt;3. Refactoring a Pattern into a C Function&lt;/h2&gt;&lt;p data-path-to-node="17"&gt;Let's take our right-angled triangle logic and wrap it inside a clean, reusable function.&lt;/p&gt;&lt;h3 data-path-to-node="18"&gt;Code Implementation&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-201 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-201 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQiAg" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_d0003d63ba0e3283&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_33b2dee0dc119d4e&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-201"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-201"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-201 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-201 ng-star-inserted"&gt;#&lt;span class="hljs-meta-keyword"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-201"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-201" data-test-id="code-content" role="text"&gt;
&lt;span class="hljs-comment"&gt;// Function definition to print a right-angled triangle&lt;/span&gt;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;printTriangle&lt;/span&gt;&lt;span class="hljs-params"&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; rows)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; i &amp;lt;= rows; i++) {
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n"&lt;/span&gt;);
    }
}

&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; &lt;span class="hljs-title"&gt;main&lt;/span&gt;&lt;span class="hljs-params"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword"&gt;int&lt;/span&gt; height = &lt;span class="hljs-number"&gt;5&lt;/span&gt;;
    
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"Printing a Triangle of height %d:\n"&lt;/span&gt;, height);
    printTriangle(height); &lt;span class="hljs-comment"&gt;// Calling the function with an argument&lt;/span&gt;
    
    &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; &lt;span class="hljs-number"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="20"&gt;Why This is Better:&lt;/h3&gt;&lt;ul data-path-to-node="21"&gt;&lt;li&gt;&lt;p data-path-to-node="21,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="21,0,0"&gt;Encapsulation:&lt;/b&gt; The pattern logic is completely hidden inside &lt;code data-index-in-node="61" data-path-to-node="21,0,0"&gt;printTriangle()&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="21,1,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="21,1,0"&gt;Parameterization:&lt;/b&gt; By passing &lt;code data-index-in-node="29" data-path-to-node="21,1,0"&gt;int rows&lt;/code&gt; as an argument, we can generate a triangle of &lt;i data-index-in-node="84" data-path-to-node="21,1,0"&gt;any&lt;/i&gt; size dynamically without rewriting loop boundaries.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="23"&gt;4. Building a Multi-Pattern Modular Program&lt;/h2&gt;&lt;p data-path-to-node="24"&gt;Now let's combine multiple pattern functions into a single modular program. This demonstrates the true power of code reusability.&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-202 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-202 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQiQg" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_d0003d63ba0e3283&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_33b2dee0dc119d4e&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-202"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-202"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-202 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-202 ng-star-inserted"&gt;#&lt;span class="hljs-meta-keyword"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-202"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-202" data-test-id="code-content" role="text"&gt;
&lt;span class="hljs-comment"&gt;// Function declarations (Prototypes)&lt;/span&gt;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;printSquare&lt;/span&gt;&lt;span class="hljs-params"&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; n)&lt;/span&gt;&lt;/span&gt;;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;printTriangle&lt;/span&gt;&lt;span class="hljs-params"&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; n)&lt;/span&gt;&lt;/span&gt;;

&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; &lt;span class="hljs-title"&gt;main&lt;/span&gt;&lt;span class="hljs-params"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword"&gt;int&lt;/span&gt; size = &lt;span class="hljs-number"&gt;4&lt;/span&gt;;
    
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"--- Square Pattern ---\n"&lt;/span&gt;);
    printSquare(size);
    
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n--- Triangle Pattern ---\n"&lt;/span&gt;);
    printTriangle(size);
    
    &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; &lt;span class="hljs-number"&gt;0&lt;/span&gt;;
}

&lt;span class="hljs-comment"&gt;// Function definitions&lt;/span&gt;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;printSquare&lt;/span&gt;&lt;span class="hljs-params"&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; n)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; j &amp;lt;= n; j++) {
            &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n"&lt;/span&gt;);
    }
}

&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;printTriangle&lt;/span&gt;&lt;span class="hljs-params"&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; n)&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"\n"&lt;/span&gt;);
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="27"&gt;Benefits of Modularizing Your Pattern Code&lt;/h2&gt;&lt;ol data-path-to-node="28" start="1"&gt;&lt;li&gt;&lt;p data-path-to-node="28,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="28,0,0"&gt;Reusability:&lt;/b&gt; Write your pattern logic once, and call it multiple times with different parameters.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="28,1,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="28,1,0"&gt;Readability:&lt;/b&gt; Your &lt;code data-index-in-node="18" data-path-to-node="28,1,0"&gt;main()&lt;/code&gt; function stays clean, short, and easy to read at a glance.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="28,2,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="28,2,0"&gt;Maintainability:&lt;/b&gt; If you need to fix a bug or optimize loop performance, you only have to update the code in one specific function rather than digging through a massive &lt;code data-index-in-node="168" data-path-to-node="28,2,0"&gt;main()&lt;/code&gt; block.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-path-to-node="29"&gt;By adopting modular design, you take a major step forward from writing simple scripts to engineering clean, professional C software!&lt;/p&gt;&lt;p data-path-to-node="29"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI-df9EKhrBRdR3WxxW7Bhi5yyBk7x1VCLLRMz533-kogJ5AesiXio0mgmTpoRuMrbns0gBJ7Rgkvz0bEyyHSdoe857znDL0MciO2jbRmexWbPUuQuFujBsQ9LZbw_zkCqEBfllt_6_k6QCnFHXU_OKQ41tdWMM_zYrW-6RujnQ_9n7qC_YEAs-Sl6TRRI/s72-w400-h219-c/8051MT-PPIC-FunsArticles-A01_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Warehouse Revenue Calculation || C Lab Programs</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-CLabPgms-A11-WarehouseRevenueCalculation.html</link><category>CCode</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Fri, 14 Aug 2026 16:03:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-8753609783878581476</guid><description>&lt;p&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-weight: 700; white-space: pre-wrap;"&gt;Program 11: Calculate total warehouse revenue per branch.&lt;/span&gt;&lt;/p&gt;&lt;span id="docs-internal-guid-ff6f27c8-7fff-351e-ba0c-667ff837d581"&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Statement::&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; A small warehouse tracks many units of different products shipped from multiple branches. Another dataset shows how much revenue each product generates per unit. Develop a C program that combines these datasets to calculate the total revenue generated by each branch.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Description:&lt;/span&gt;&lt;/p&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Input:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Number of branches, number of products, a 2D array of units shipped, and a 1D array of revenue per product unit.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The total revenue calculated for each branch.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Constraints:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; All counts, units, and revenue values must be non-negative integers.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Method:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Store shipment data in a &lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;2D array&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; and product revenue in a &lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;1D array&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;; multiply and accumulate to find totals.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Pgm Logic:&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Start.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input the number of branches and products.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Declare a 2D array &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;units[branches][products]&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; and a 1D array &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;revenue[products]&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input shipment units for each branch and product.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input revenue per unit for each product.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For each branch &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;i&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Initialize &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;total = 0&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For each product &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;j&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="3" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: square; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Calculate &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;total += units[i][j] * revenue[j]&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Print the &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;total&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; revenue for branch &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;i&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Stop.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Code:&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;// Purpose: To combine shipment and revenue datasets using arrays to calculate total revenue per branch.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;int main() {&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int branches, products, i, j;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter number of branches: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d", &amp;amp;branches);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter number of products: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d", &amp;amp;products);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int units[branches][products];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int revenue[products];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("\nEnter number of units shipped by each branch for each product:\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i = 0; i &amp;lt; branches; i++) {&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Branch %d:\n", i+1);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(j = 0; j &amp;lt; products; j++)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d", &amp;amp;units[i][j]);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("\nEnter revenue per unit for each product:\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(j = 0; j &amp;lt; products; j++) {&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Product %d revenue: ", j+1);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d", &amp;amp;revenue[j]);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Total revenue per branch:\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (i = 0; i &amp;lt; branches; i++) {&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int total = 0;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (j = 0; j &amp;lt; products; j++)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;total += units[i][j] * revenue[j];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Branch %d: %d\n", i + 1, total);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter number of branches: 3&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter number of products: 2&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;(Enter units: 20, 10; 20, 30; 50, 20)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;(Enter revenue: 20, 30)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Total revenue per branch: Branch 1: 700 Branch 2: 1300 Branch 3: 1600&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;RESULT:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Thus the program has been executed and the output was verified.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Remarks:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Compiled and run in &lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Code::Blocks&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;. This program illustrates the practical application of matrix-like data processing in business scenarios.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Explanation:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The 2D array acts as a table where rows are branches and columns are products. The program iterates through each branch (row) and multiplies each shipment count by its corresponding unit price from the 1D revenue array to derive a sum for that branch.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published C Lab Program posts Index page: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/08/CLabProgrampostsIndex.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published articles list: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/01/8051MT01022026PublishedArticlesIndexPage.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Interview Special: Top 10 Pattern-Based Coding Questions in C</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-LoopsArticles-A06.html</link><category>Article</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Fri, 14 Aug 2026 11:01:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-2372926611053588214</guid><description>&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl4h2hHGhS7pU086CzgRJsWx18AkL6-xJ4numVB-vD01An9Coi7gXEYOn0rIMmY1z3K2yUc1fBhDvQLxwzS73awxBmttDzOMKe68QwZEJzUlGVBMnkQgqoZ-0VDD2M7J_dDkmbeGGQSSoaxVxlqK-9WiALFnIXLzga41EcNR0agT2C08rG9tMLm_fFcP4d/s1408/8051MT-PPIC-LoopsArticles-A06_Im01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Interview Special: Top 10 Pattern-Based Coding Questions in C" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl4h2hHGhS7pU086CzgRJsWx18AkL6-xJ4numVB-vD01An9Coi7gXEYOn0rIMmY1z3K2yUc1fBhDvQLxwzS73awxBmttDzOMKe68QwZEJzUlGVBMnkQgqoZ-0VDD2M7J_dDkmbeGGQSSoaxVxlqK-9WiALFnIXLzga41EcNR0agT2C08rG9tMLm_fFcP4d/w400-h219/8051MT-PPIC-LoopsArticles-A06_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;When you walk into a technical interview for a software engineering role, the interviewer isn't just looking for whether you memorized syntax. They want to evaluate your &lt;/span&gt;&lt;b data-index-in-node="170" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;logic-building skills, spatial reasoning, and ability to handle edge cases&lt;/b&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Among junior and mid-level coding rounds, &lt;b data-index-in-node="42" data-path-to-node="3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;pattern-based questions&lt;/b&gt; remain a favorite screening tool. Why? Because solving them requires precise command over nested loops, variable scope, boundary conditions, and control flow.&lt;/p&gt;&lt;p data-path-to-node="4" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;In this special interview guide, we will break down the top 10 pattern-based coding questions in C that frequently appear in technical assessments, complete with explanations and code implementations.&lt;/p&gt;&lt;h2 data-path-to-node="6" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Why Do Interviewers Ask Pattern Questions?&lt;/h2&gt;&lt;ul data-path-to-node="7" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="7,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="7,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Loop Mastery:&lt;/b&gt; They test whether you truly understand how inner and outer loops interact.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Algorithmic Thinking:&lt;/b&gt; They measure your ability to map mathematical relationships (rows vs. columns) to code.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="7,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="7,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Attention to Detail:&lt;/b&gt; Small off-by-one errors or mismanaged spaces instantly break a pattern, revealing your debugging discipline.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="9" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Top 10 Pattern Coding Questions&lt;/h2&gt;&lt;h3 data-path-to-node="10" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1. Solid Square Matrix&lt;/h3&gt;&lt;ul data-path-to-node="11" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="11,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="11,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Challenge:&lt;/b&gt; Print a solid square of stars.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="11,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="11,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation:&lt;/b&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-166 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-166 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQqgc" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_750d9dc88c323b75&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_d490b94c29e382d4&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-166" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-166" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-166 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-166 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-166" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-166" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= n; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="13" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;2. Right-Angled Triangle&lt;/h3&gt;&lt;ul data-path-to-node="14" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="14,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="14,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Challenge:&lt;/b&gt; Print stars increasing row by row.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="14,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="14,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation:&lt;/b&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-167 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-167 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQqwc" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_750d9dc88c323b75&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_d490b94c29e382d4&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-167" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-167" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-167 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-167 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-167" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-167" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="16" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;3. Inverted Right-Angled Triangle&lt;/h3&gt;&lt;ul data-path-to-node="17" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="17,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="17,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Challenge:&lt;/b&gt; Print a triangle that starts wide and shrinks.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="17,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="17,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation:&lt;/b&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-168 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-168 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQrAc" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_750d9dc88c323b75&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_d490b94c29e382d4&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-168" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-168" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-168 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-168 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-168" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-168" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= (n - i + &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="19" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;4. Numeric Right-Angled Triangle&lt;/h3&gt;&lt;ul data-path-to-node="20" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="20,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="20,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Challenge:&lt;/b&gt; Print numbers instead of stars in a triangle format (&lt;code data-index-in-node="68" data-path-to-node="20,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/code&gt;, &lt;code data-index-in-node="71" data-path-to-node="20,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1 2&lt;/code&gt;, &lt;code data-index-in-node="76" data-path-to-node="20,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1 2 3&lt;/code&gt;, etc.).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="20,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="20,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation:&lt;/b&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-169 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-169 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQrQc" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_750d9dc88c323b75&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_d490b94c29e382d4&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-169" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-169" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-169 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-169 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-169" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-169" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%d "&lt;/span&gt;, j);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="22" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;5. Repeated Row Number Triangle&lt;/h3&gt;&lt;ul data-path-to-node="23" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="23,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="23,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Challenge:&lt;/b&gt; Print the row number repeatedly across each row (&lt;code data-index-in-node="64" data-path-to-node="23,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/code&gt;, &lt;code data-index-in-node="67" data-path-to-node="23,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;2 2&lt;/code&gt;, &lt;code data-index-in-node="72" data-path-to-node="23,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;3 3 3&lt;/code&gt;, etc.).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="23,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="23,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation:&lt;/b&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-170 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-170 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQrgc" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_750d9dc88c323b75&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_d490b94c29e382d4&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-170" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-170" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-170 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-170 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-170" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-170" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%d "&lt;/span&gt;, i);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="25" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;6. Floyd's Triangle&lt;/h3&gt;&lt;ul data-path-to-node="26" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="26,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="26,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Challenge:&lt;/b&gt; Print consecutive numbers continuously across rows (&lt;code data-index-in-node="67" data-path-to-node="26,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/code&gt;, &lt;code data-index-in-node="70" data-path-to-node="26,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;2 3&lt;/code&gt;, &lt;code data-index-in-node="75" data-path-to-node="26,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;4 5 6&lt;/code&gt;, etc.).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="26,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="26,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation:&lt;/b&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-171 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-171 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQrwc" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_750d9dc88c323b75&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_d490b94c29e382d4&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-171" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-171" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-171 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-171 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-171" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-171" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;, num = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"%d "&lt;/span&gt;, num++);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="28" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;7. Centered Pyramid Pattern&lt;/h3&gt;&lt;ul data-path-to-node="29" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="29,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="29,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Challenge:&lt;/b&gt; Print a symmetrical centered pyramid using spaces and stars.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="29,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="29,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation:&lt;/b&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-172 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-172 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQsAc" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_750d9dc88c323b75&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_d490b94c29e382d4&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-172" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-172" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-172 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-172 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-172" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-172" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; space = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; space &amp;lt;= (n - i); space++) &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; star = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; star &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * i - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); star++) &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"*"&lt;/span&gt;);
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="31" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;8. Diamond Pattern&lt;/h3&gt;&lt;ul data-path-to-node="32" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="32,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="32,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Challenge:&lt;/b&gt; Combine an upright pyramid and an inverted pyramid to form a complete diamond.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="32,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="32,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation:&lt;/b&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-173 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-173 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQsQc" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_750d9dc88c323b75&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_d490b94c29e382d4&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-173" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-173" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-173 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-173 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-173" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-173" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;;
    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Upper Pyramid&lt;/span&gt;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; s = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; s &amp;lt;= (n - i); s++) &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; st = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; st &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * i - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); st++) &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"*"&lt;/span&gt;);
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Lower Inverted Pyramid&lt;/span&gt;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = n - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;gt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i--) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; s = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; s &amp;lt;= (n - i); s++) &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; st = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; st &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * i - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); st++) &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"*"&lt;/span&gt;);
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="34" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;9. Binary 0-1 Triangle&lt;/h3&gt;&lt;ul data-path-to-node="35" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="35,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="35,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Challenge:&lt;/b&gt; Alternate &lt;code data-index-in-node="25" data-path-to-node="35,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/code&gt; and &lt;code data-index-in-node="31" data-path-to-node="35,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/code&gt; values in a triangular grid based on row/column parity.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="35,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="35,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation:&lt;/b&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-174 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-174 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQsgc" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_750d9dc88c323b75&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_d490b94c29e382d4&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-174" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-174" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-174 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-174 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-174" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-174" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {
            &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; ((i + j) % &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; == &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;) &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"1 "&lt;/span&gt;);
            &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;else&lt;/span&gt; &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"0 "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="37" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;10. Hollow Square Border Pattern&lt;/h3&gt;&lt;ul data-path-to-node="38" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="38,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="38,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Challenge:&lt;/b&gt; Print a square where only the outer border contains stars, and the inside is hollow (spaces).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="38,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="38,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation:&lt;/b&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-175 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-175 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQswc" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_750d9dc88c323b75&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_d490b94c29e382d4&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-175" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-175" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-175 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-175 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-175" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-175" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= n; j++) {
            &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;if&lt;/span&gt; (i == &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt; || i == n || j == &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt; || j == n) {
                &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"* "&lt;/span&gt;);
            } &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;else&lt;/span&gt; {
                &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"  "&lt;/span&gt;); &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Inner empty space&lt;/span&gt;
            }
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="41" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Interview Success Tips&lt;/h2&gt;&lt;ol data-path-to-node="42" start="1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="42,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="42,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Talk Through Your Logic:&lt;/b&gt; Interviewers love candidates who verbalize their thought process. Explain &lt;i data-index-in-node="99" data-path-to-node="42,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;why&lt;/i&gt; you are setting your inner loop boundary or handling whitespace.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="42,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="42,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Dry Run with Small Inputs:&lt;/b&gt; Before finalizing your code, manually trace your loops on paper using &lt;span class="math-inline" data-index-in-node="97" data-math="N = 3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$N = 3$&lt;/span&gt; to catch potential fencepost errors.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="42,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="42,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Keep Code Clean:&lt;/b&gt; Use meaningful loop counters (&lt;code data-index-in-node="47" data-path-to-node="42,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;row&lt;/code&gt;, &lt;code data-index-in-node="52" data-path-to-node="42,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;col&lt;/code&gt;) when tackling multi-layered patterns to avoid confusion.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-path-to-node="43" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Mastering these 10 patterns guarantees that you will walk into your next coding interview with the confidence and logic-building agility required to ace loop-based challenges!&lt;/p&gt;&lt;p data-path-to-node="43" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl4h2hHGhS7pU086CzgRJsWx18AkL6-xJ4numVB-vD01An9Coi7gXEYOn0rIMmY1z3K2yUc1fBhDvQLxwzS73awxBmttDzOMKe68QwZEJzUlGVBMnkQgqoZ-0VDD2M7J_dDkmbeGGQSSoaxVxlqK-9WiALFnIXLzga41EcNR0agT2C08rG9tMLm_fFcP4d/s72-w400-h219-c/8051MT-PPIC-LoopsArticles-A06_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Race Score Sorting || C Lab Programs</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-CLabPgms-A10-RaceScoreSorting.html</link><category>CCode</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Thu, 13 Aug 2026 16:00:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-477229838782069061</guid><description>&lt;p&gt;&amp;nbsp;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-weight: 700; white-space: pre-wrap;"&gt;Program 10: Sort race scores in descending order using Bubble Sort.&lt;/span&gt;&lt;/p&gt;&lt;span id="docs-internal-guid-f52e977a-7fff-3a31-eef6-9eadcaa5ead3"&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Statement::&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; A sports teacher has recorded the scores of students in a 100-meter race. To prepare the result sheet, the teacher wants the scores arranged in descending order (highest to lowest). Develop a C program to sort these scores using the Bubble Sort technique.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Description:&lt;/span&gt;&lt;/p&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Input:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Number of students (&lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;) and their respective race scores.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The list of scores displayed in descending order.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Constraints:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Number of students must be &amp;gt; 0; scores are integers.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Method:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Implement the &lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Bubble Sort&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; algorithm to arrange the elements.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Pgm Logic:&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Start.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input the number of students &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; scores into the array &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;scores[]&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Perform nested loops for sorting:&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Outer loop (&lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;i&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;) from 0 to &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n-2&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Inner loop (&lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;j&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;) from 0 to &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n-i-2&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;If &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;scores[j] &amp;lt; scores[j+1]&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;, swap the two elements.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Print the sorted scores.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Stop.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Code:&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;// Purpose: To sort student race scores in descending order using the Bubble Sort algorithm.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;int main()&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int n, i, j, temp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter number of students: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d", &amp;amp;n);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int scores[n];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter the scores:\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i = 0; i &amp;lt; n; i++)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d", &amp;amp;scores[i]);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Bubble Sort (Descending Order)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i = 0; i &amp;lt; n-1; i++)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(j = 0; j &amp;lt; n-i-1; j++)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(scores[j] &amp;lt; scores[j+1])&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;temp = scores[j];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scores[j] = scores[j+1];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scores[j+1] = temp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Scores in descending order:\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i = 0; i &amp;lt; n; i++)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("%d ", scores[i]);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter number of students: 4&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter the scores: 12 45 32 10&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Scores in descending order: 45 32 12 10&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;RESULT:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Thus the program has been executed and the output was verified.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Remarks:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Tested in the &lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;onlineGDB tool&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;. Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Explanation:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The logic compares adjacent scores. If the current score is smaller than the next one, they are swapped. Through multiple passes, the smallest values "bubble" to the end of the array, leaving the largest values at the front.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published C Lab Program posts Index page: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/08/CLabProgrampostsIndex.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published articles list: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/01/8051MT01022026PublishedArticlesIndexPage.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Beyond the Basics: Complex Pattern Designs and Loop Optimization in C</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-LoopsArticles-A05.html</link><category>Article</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Thu, 13 Aug 2026 10:56:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-4238290448281331508</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYU71eenyMurfoQPm5qk3eESX6nldIZ1H4Imuog99F4vge-LO9zGTNu8RDza5q9WcvMIsaE3CxoMyRpMQOF1sR18nRSPBBK1sxugiFVm7whnddtgj78lxLaXIBjNYtpVXDfZlx2u6DDH0VtA-1J5tYRGVsvwTNd3MnqLmcyigmpp5era3GFsUM-wAwTTCa/s1408/8051MT-PPIC-LoopsArticles-A05_Im01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Beyond the Basics: Complex Pattern Designs and Loop Optimization in C" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYU71eenyMurfoQPm5qk3eESX6nldIZ1H4Imuog99F4vge-LO9zGTNu8RDza5q9WcvMIsaE3CxoMyRpMQOF1sR18nRSPBBK1sxugiFVm7whnddtgj78lxLaXIBjNYtpVXDfZlx2u6DDH0VtA-1J5tYRGVsvwTNd3MnqLmcyigmpp5era3GFsUM-wAwTTCa/w400-h219/8051MT-PPIC-LoopsArticles-A05_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;You have mastered the square, built right-angled triangles, and learned how to make your inner loops dependent on outer counters. Welcome to the next level of C programming.&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;While simple patterns are fantastic for building initial logic, real-world development and advanced coding interviews demand more. You need to handle complex geometric designs—like centered pyramids and diamonds—while keeping your code clean and performant. In this post, we will explore advanced pattern design techniques and dive into essential loop optimization strategies for C developers.&lt;/p&gt;&lt;h2 data-path-to-node="5" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1. Tackling Complex Patterns: Pyramids and Diamonds&lt;/h2&gt;&lt;p data-path-to-node="6" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;To create symmetrical patterns like pyramids, simple row-and-column logic isn't enough. You have to introduce whitespace management. Every centered star pattern requires managing &lt;b data-index-in-node="179" data-path-to-node="6" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;three distinct elements&lt;/b&gt; per row:&lt;/p&gt;&lt;ol data-path-to-node="7" start="1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="7,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="7,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Leading spaces&lt;/b&gt; that push the stars toward the center.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Stars (&lt;code data-index-in-node="7" data-path-to-node="7,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;*&lt;/code&gt;)&lt;/b&gt; that form the shape itself.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="7,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="7,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Trailing spaces or newlines&lt;/b&gt; to wrap up the row.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 data-path-to-node="8" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Example: Building a Centered Pyramid&lt;/h3&gt;&lt;p data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;To print a pyramid of height &lt;span class="math-inline" data-index-in-node="29" data-math="N" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$N$&lt;/span&gt;, for any given row &lt;code data-index-in-node="50" data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/code&gt;, you typically need to print &lt;code data-index-in-node="81" data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;N - i&lt;/code&gt; spaces followed by &lt;code data-index-in-node="106" data-path-to-node="9" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;2 * i - 1&lt;/code&gt; stars.&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-122 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-122 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQ4QY" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_d26a520bf8f0fa65&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_161e36c93e402602&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-122" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-122" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-122 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-122 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-122" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-122" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;; &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Height of the pyramid&lt;/span&gt;
    
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// 1. Print leading spaces&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; space = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; space &amp;lt;= (n - i); space++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;" "&lt;/span&gt;);
        }
        
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// 2. Print stars&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; star = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; star &amp;lt;= (&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt; * i - &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); star++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"*"&lt;/span&gt;);
        }
        
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// 3. Move to the next line&lt;/span&gt;
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="11" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Output&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-123 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-123 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQ4gY" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_d26a520bf8f0fa65&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_161e36c93e402602&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-123" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-123" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-123 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-123 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;nbsp; &amp;nbsp;*&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-123" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-123" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;  ***
 *****
*******
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="13" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;By combining multiple inner loops inside a single outer iteration, you can construct complex multi-part shapes like diamonds, hourglasses, and hollow borders.&lt;/p&gt;&lt;h2 data-path-to-node="15" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;2. The Cost of Repetition: Why Loop Optimization Matters&lt;/h2&gt;&lt;p data-path-to-node="16" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;As your loops grow more complex—such as nesting multiple loops to handle matrices or multi-dimensional pattern grids—performance becomes a critical factor.&lt;/p&gt;&lt;p data-path-to-node="17" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;In computer science, nested loops can quickly escalate your &lt;b data-index-in-node="60" data-path-to-node="17" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Time Complexity&lt;/b&gt; to &lt;span class="math-inline" data-index-in-node="79" data-math="O(N^2)" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$O(N^2)$&lt;/span&gt; or &lt;span class="math-inline" data-index-in-node="89" data-math="O(N^3)" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$O(N^3)$&lt;/span&gt;. If you are processing large datasets or rendering high-frequency graphics, inefficient loop structures can bottleneck your application.&lt;/p&gt;&lt;p data-path-to-node="18" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Let's look at how you can optimize your loops in C to keep your code blazing fast.&lt;/p&gt;&lt;h2 data-path-to-node="20" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;3. Top Loop Optimization Techniques for C Developers&lt;/h2&gt;&lt;h3 data-path-to-node="21" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;A. Loop Unrolling&lt;/h3&gt;&lt;p data-path-to-node="22" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Modern processors use pipelining to execute instructions simultaneously. However, loop control overhead (checking conditions and incrementing counters) can disrupt this flow. &lt;b data-index-in-node="175" data-path-to-node="22" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Loop unrolling&lt;/b&gt; reduces the overhead of the branch instruction by manually expanding the loop body.&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-124 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-124 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQ4wY" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_d26a520bf8f0fa65&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_161e36c93e402602&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-124" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-124" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-124 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-124 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Standard Loop&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-124" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-124" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;; i &amp;lt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;; i++) {
    process(arr[i]);
}

&lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Unrolled Loop (Reduces condition checks and jumps)&lt;/span&gt;
process(arr[&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;]);
process(arr[&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;]);
process(arr[&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;]);
process(arr[&lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;]);
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="24" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;i data-index-in-node="0" data-path-to-node="24" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;(Note: Compilers like GCC often handle this automatically with optimization flags like &lt;code data-index-in-node="87" data-path-to-node="24" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;-O2&lt;/code&gt; or &lt;code data-index-in-node="94" data-path-to-node="24" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;-O3&lt;/code&gt;, but understanding the concept helps when writing performance-critical embedded code.)&lt;/i&gt;&lt;/p&gt;&lt;h3 data-path-to-node="25" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;B. Hoisting Loop-Invariant Code&lt;/h3&gt;&lt;p data-path-to-node="26" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;If a calculation inside your loop results in the exact same value every single iteration, calculate it &lt;b data-index-in-node="103" data-path-to-node="26" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;outside&lt;/b&gt; the loop. Don't force the CPU to recompute invariant data repeatedly.&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-125 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-125 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQ5AY" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_d26a520bf8f0fa65&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_161e36c93e402602&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-125" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-125" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-125 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-125 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// INADVERTENTLY SLOW: strlen() is recalculated on every iteration&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-125" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-125" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;; i &amp;lt; &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;strlen&lt;/span&gt;(str); i++) {
    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// code&lt;/span&gt;
}

&lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// OPTIMIZED: Length is calculated once and stored&lt;/span&gt;
&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; len = &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;strlen&lt;/span&gt;(str);
&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;; i &amp;lt; len; i++) {
    &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// code&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="28" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;C. Minimize Function Calls Inside Loops&lt;/h3&gt;&lt;p data-path-to-node="29" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Calling functions (like &lt;code data-index-in-node="24" data-path-to-node="29" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/code&gt; or custom utilities) inside deep nested loops adds massive overhead due to stack frame allocation. Whenever possible, batch your data processing or minimize I/O calls inside critical loops.&lt;/p&gt;&lt;h3 data-path-to-node="30" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;D. Optimize Loop Condition Boundaries&lt;/h3&gt;&lt;p data-path-to-node="31" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Keep your loop termination conditions simple. Avoid placing complex function calls or heavy arithmetic expressions directly inside the conditional check portion of your loop header.&lt;/p&gt;&lt;h2 data-path-to-node="33" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Summary&lt;/h2&gt;&lt;p data-path-to-node="34" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;Advanced pattern design proves that you truly understand how inner and outer execution flows interact across multi-dimensional spaces. By coupling that spatial awareness with smart optimization practices—like avoiding redundant calculations and keeping time complexity in check—you write code that is not only visually creative, but structurally enterprise-ready.&lt;/p&gt;&lt;p data-path-to-node="34" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYU71eenyMurfoQPm5qk3eESX6nldIZ1H4Imuog99F4vge-LO9zGTNu8RDza5q9WcvMIsaE3CxoMyRpMQOF1sR18nRSPBBK1sxugiFVm7whnddtgj78lxLaXIBjNYtpVXDfZlx2u6DDH0VtA-1J5tYRGVsvwTNd3MnqLmcyigmpp5era3GFsUM-wAwTTCa/s72-w400-h219-c/8051MT-PPIC-LoopsArticles-A05_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Binary Search for Book Availability || C Lab Programs</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-CLabPgms-A09-BinarySearchforBookAvailability.html</link><category>CCode</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Wed, 12 Aug 2026 15:56:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-3541109395970804472</guid><description>&lt;p&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-weight: 700; white-space: pre-wrap;"&gt;Program 09: Find book availability using Binary Search.&lt;/span&gt;&lt;/p&gt;&lt;span id="docs-internal-guid-1e0c2e6f-7fff-d51e-168a-040f17ce645d"&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Statement::&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; A college library has a digital bookshelf system where each book is assigned a unique Book ID. The bookshelf is organized in ascending order of Book IDs. Develop a C Program to quickly find whether a book with a specific Book ID is available in the shelf using the binary search algorithm.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Description:&lt;/span&gt;&lt;/p&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Input:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Total number of books (&lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;), a sorted list of Book IDs, and the specific Book ID (key) to be searched.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; A message indicating whether the book is "Available" or "Not available".&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Constraints:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The number of books must be greater than zero; the input Book IDs must be provided in ascending order; IDs are assumed to be valid integers.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Method:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Utilize the &lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Binary Search&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; algorithm to efficiently locate the key within the sorted array.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Pgm Logic:&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Start.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input the total number of books &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;n&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Book IDs into an array &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;books[]&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; in ascending order.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input the &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;key&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; ID to be searched.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Initialize &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;low = 0&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;, &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;high = n-1&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;, and &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;found = 0&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Repeat while &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;low &amp;lt;= high&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Calculate &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;mid = (low + high) / 2&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;If &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;books[mid] == key&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;, set &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;found = 1&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; and exit the loop.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Else if &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;books[mid] &amp;lt; key&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;, set &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;low = mid + 1&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Else, set &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;high = mid - 1&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;If &lt;/span&gt;&lt;span style="font-size: 11pt; font-style: italic; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;found == 1&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;, print "Book is available".&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Else, print "Book is not available".&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Stop.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Code:&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;// Purpose: To find if a specific Book ID is available in a sorted digital bookshelf using Binary Search.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;int main()&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int n, i, key, low, high, mid, found = 0;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter number of books: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d", &amp;amp;n);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int books[n];&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter %d Book IDs in ascending order:\n", n);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i = 0; i &amp;lt; n; i++)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d", &amp;amp;books[i]);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter Book ID to search: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d", &amp;amp;key);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;low = 0;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;high = n - 1;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(low &amp;lt;= high)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mid = (low + high) / 2;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(books[mid] == key)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;found = 1;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else if(books[mid] &amp;lt; key)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;low = mid + 1;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;high = mid - 1;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(found)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Book is available.\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Book is not available.\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter number of books: 4&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter 4 Book IDs in ascending order: 101 105 110 115&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter Book ID to search: 110&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Book is available.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;RESULT:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Thus the program has been executed and the output was verified.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Remarks:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; This program was compiled and run in the &lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Code::Blocks IDE&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;. Note that the Binary Search algorithm &lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;requires the input array to be sorted&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; to function correctly.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Explanation:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The program divides the search area in half during each iteration. By comparing the middle element to the key, it determines if the target is in the lower or upper half, drastically reducing the number of comparisons compared to a linear search.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published C Lab Program posts Index page: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/08/CLabProgrampostsIndex.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published articles list:&lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/01/8051MT01022026PublishedArticlesIndexPage.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Introduction to Nested Loops for Patterns in C: A Hands-On Guide</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-LoopsArticles-A04.html</link><category>Article</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Wed, 12 Aug 2026 10:50:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-454240590066002093</guid><description>&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOUWYJC_YR6yRLwLHmYL7hgYhuaGG7iTUUOB9Qj2zom3sUGMgxBTUNiW2q9q9DD1X1Z7Eq8tj4JCFH8f9LcUpaGEdLAKKlO2IDwgSqgkriml62XS3FKXBRfj9RWB0gWVTd6mHKM2TpWsQRRJJtb0tmXEnp7fCAhWrQLaTu7fJi-_aw6uzJzwJnKFLgz_lZ/s1408/8051MT-PPIC-LoopsArticles-A04_Im01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Introduction to Nested Loops for Patterns in C: A Hands-On Guide" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOUWYJC_YR6yRLwLHmYL7hgYhuaGG7iTUUOB9Qj2zom3sUGMgxBTUNiW2q9q9DD1X1Z7Eq8tj4JCFH8f9LcUpaGEdLAKKlO2IDwgSqgkriml62XS3FKXBRfj9RWB0gWVTd6mHKM2TpWsQRRJJtb0tmXEnp7fCAhWrQLaTu7fJi-_aw6uzJzwJnKFLgz_lZ/w400-h219/8051MT-PPIC-LoopsArticles-A04_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;Now that you have mastered the fundamentals of inner and outer loops, it is time to put that two-dimensional thinking into practice. If you want to build strong logic-building skills and ace your upcoming programming interviews, there is no better exercise than &lt;/span&gt;&lt;b data-index-in-node="262" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;pattern printing&lt;/b&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;Pattern programs are the ultimate litmus test for understanding how outer and inner loops coordinate. In this hands-on guide, we will bridge the gap between abstract nested loop mechanics and concrete geometric shapes using C.&lt;/p&gt;&lt;h2 data-path-to-node="5" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1. The Anatomy of a Pattern Program&lt;/h2&gt;&lt;p data-path-to-node="6" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Before writing code, let’s look at how a geometric shape translates into code coordinates. Every star (&lt;code data-index-in-node="103" data-path-to-node="6" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;*&lt;/code&gt;) or number pattern is essentially a grid of &lt;b data-index-in-node="149" data-path-to-node="6" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;rows&lt;/b&gt; and &lt;b data-index-in-node="158" data-path-to-node="6" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;columns&lt;/b&gt;.&lt;/p&gt;&lt;ul data-path-to-node="7" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="7,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="7,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Outer Loop (&lt;code data-index-in-node="16" data-path-to-node="7,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/code&gt;):&lt;/b&gt; Manages the vertical axis (how many &lt;b data-index-in-node="56" data-path-to-node="7,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;rows&lt;/b&gt; to print).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Inner Loop (&lt;code data-index-in-node="16" data-path-to-node="7,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j&lt;/code&gt;):&lt;/b&gt; Manages the horizontal axis (how many &lt;b data-index-in-node="58" data-path-to-node="7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;columns&lt;/b&gt; or characters to print per row).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="7,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="7,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Print Statement &amp;amp; Newline (&lt;code data-index-in-node="31" data-path-to-node="7,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;\n&lt;/code&gt;):&lt;/b&gt; Prints characters across the row, then breaks to the next line once the inner loop completes.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="9" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;2. Building a Solid Square Pattern&lt;/h2&gt;&lt;p data-path-to-node="10" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Let’s start with the simplest foundational shape: a solid square matrix of stars. If we want a &lt;span class="math-inline" data-index-in-node="95" data-math="4 \times 4" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$4 \times 4$&lt;/span&gt; grid, both our rows and columns will run 4 times.&lt;/p&gt;&lt;h3 data-path-to-node="11" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-94 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-94 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQoQY" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_f31f8f1b44c3d998&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_f27a9bf91b123b8a&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-94" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-94" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-94 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-94 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-94" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-94" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;; &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Size of the square&lt;/span&gt;
    
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {          &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Outer loop for rows&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= n; j++) {      &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Inner loop for columns&lt;/span&gt;
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;); &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Move to the next line after each row&lt;/span&gt;
    }
    
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="13" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Output&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-95 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-95 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQogY" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_f31f8f1b44c3d998&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_f27a9bf91b123b8a&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-95" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-95" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-95 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-95 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;* * * *&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-95" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-95" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;* * * * 
* * * * 
* * * * 
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="16" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;3. Creating Right-Angled Triangle Patterns&lt;/h2&gt;&lt;p data-path-to-node="17" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;To make things more interesting, we can make our inner loop &lt;b data-index-in-node="60" data-path-to-node="17" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;dependent&lt;/b&gt; on the outer loop variable (&lt;code data-index-in-node="98" data-path-to-node="17" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/code&gt;). This is the secret to building triangular shapes.&lt;/p&gt;&lt;p data-path-to-node="18" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Instead of running the inner loop a fixed number of times, we run it up to the current row number (&lt;code data-index-in-node="99" data-path-to-node="18" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j &amp;lt;= i&lt;/code&gt;).&lt;/p&gt;&lt;h3 data-path-to-node="19" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-96 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-96 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQowY" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_f31f8f1b44c3d998&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_f27a9bf91b123b8a&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-96" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-96" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-96 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-96 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-96" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-96" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;; &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Number of rows&lt;/span&gt;
    
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {          &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Outer loop tracks rows&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= i; j++) {      &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Inner loop runs 'i' times&lt;/span&gt;
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;); &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Newline after row completion&lt;/span&gt;
    }
    
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="21" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Output&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-97 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-97 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQpAY" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_f31f8f1b44c3d998&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_f27a9bf91b123b8a&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-97" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-97" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-97 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-97 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;*&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-97" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-97" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;* * 
* * * 
* * * * 
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="23" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Why Does This Work?&lt;/h3&gt;&lt;ul data-path-to-node="24" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="24,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;When &lt;code data-index-in-node="5" data-path-to-node="24,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i = 1&lt;/code&gt;, the inner loop runs for &lt;code data-index-in-node="36" data-path-to-node="24,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j = 1&lt;/code&gt; (prints 1 star).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="24,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;When &lt;code data-index-in-node="5" data-path-to-node="24,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i = 2&lt;/code&gt;, the inner loop runs for &lt;code data-index-in-node="36" data-path-to-node="24,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j = 1, 2&lt;/code&gt; (prints 2 stars).&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="24,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;When &lt;code data-index-in-node="5" data-path-to-node="24,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i = 4&lt;/code&gt;, the inner loop runs for &lt;code data-index-in-node="36" data-path-to-node="24,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j = 1, 2, 3, 4&lt;/code&gt; (prints 4 stars).&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="26" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;4. Inverted Right-Angled Triangles&lt;/h2&gt;&lt;p data-path-to-node="27" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;What if we want the triangle upside down, starting with a full row and shrinking down? We can reverse our condition by starting high and decrementing, or by setting the inner loop boundary relative to total rows minus &lt;code data-index-in-node="218" data-path-to-node="27" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/code&gt;.&lt;/p&gt;&lt;h3 data-path-to-node="28" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Code Implementation&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-98 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-98 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQpQY" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_f31f8f1b44c3d998&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_f27a9bf91b123b8a&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-98" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-98" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-98 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-98 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-98" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-98" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; n = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;4&lt;/span&gt;;
    
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= n; i++) {
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Inner loop prints decreasing stars as 'i' increases&lt;/span&gt;
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= (n - i + &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;); j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"* "&lt;/span&gt;);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;);
    }
    
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="30" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Output&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c3788586330="" class="ng-tns-c3788586330-99 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block ng-tns-c3788586330-99 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwib8YTizPmVAxUAAAAAHQAAAAAQpgY" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_f31f8f1b44c3d998&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_f27a9bf91b123b8a&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c3788586330="" class="formatted-code-block-internal-container ng-tns-c3788586330-99" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="animated-opacity ng-tns-c3788586330-99" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c3788586330-99 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c3788586330="" class="buttons ng-tns-c3788586330-99 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;* * * *&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c3788586330="" class="ng-tns-c3788586330-99" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c3788586330="" class="code-container formatted ng-tns-c3788586330-99" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;* * * 
* * 
* 
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="33" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Pro-Tips for Designing Patterns&lt;/h2&gt;&lt;ol data-path-to-node="34" start="1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="34,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="34,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Break It Into Columns:&lt;/b&gt; Always look at a pattern as a table. Ask yourself: &lt;i data-index-in-node="74" data-path-to-node="34,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;How many rows do I need? For a given row &lt;code data-index-in-node="115" data-path-to-node="34,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/code&gt;, how many columns or spaces do I need to print?&lt;/i&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="34,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="34,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Handle Spaces Separately:&lt;/b&gt; For centered pyramids or diamonds, you will often need a &lt;i data-index-in-node="83" data-path-to-node="34,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;third&lt;/i&gt; inner loop specifically dedicated to printing leading whitespace before your stars.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="34,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="34,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Dry Run on Grid Paper:&lt;/b&gt; If your logic gets tangled, map out your &lt;code data-index-in-node="64" data-path-to-node="34,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/code&gt; and &lt;code data-index-in-node="70" data-path-to-node="34,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j&lt;/code&gt; values on grid paper before coding.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-path-to-node="35" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Pattern programming transforms loops from boring math counters into creative tools. Practice these basic squares and triangles, and you'll easily conquer more complex geometric designs next!&lt;/p&gt;&lt;p data-path-to-node="35" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOUWYJC_YR6yRLwLHmYL7hgYhuaGG7iTUUOB9Qj2zom3sUGMgxBTUNiW2q9q9DD1X1Z7Eq8tj4JCFH8f9LcUpaGEdLAKKlO2IDwgSqgkriml62XS3FKXBRfj9RWB0gWVTd6mHKM2TpWsQRRJJtb0tmXEnp7fCAhWrQLaTu7fJi-_aw6uzJzwJnKFLgz_lZ/s72-w400-h219-c/8051MT-PPIC-LoopsArticles-A04_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>From One Dimension to Two: Understanding Inner and Outer Nested Loops in C</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-LoopsArticles-A03.html</link><category>Article</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Tue, 11 Aug 2026 17:52:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-5414432610582587393</guid><description>&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTafvjYP2U7dW-rKsZLG07Zjh6sDQ1k957rNKnpj1ghJJFiOznqPSInDhI48cVz3c6d6462y7AQMB6WDwS09t_pM5rLkUEzuXgCNdQRXYUjSQF7HDy26NsAojmPNh5_MWqEw-G9vxmmfJCIGwxc3N75S36E7k6CioXNnwQaqlNb6kTfYfH-S18fCO0ifoM/s1408/8051MT_PPIC_LoopsArticles_A03_Im01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="From One Dimension to Two: Understanding Inner and Outer Nested Loops in C" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTafvjYP2U7dW-rKsZLG07Zjh6sDQ1k957rNKnpj1ghJJFiOznqPSInDhI48cVz3c6d6462y7AQMB6WDwS09t_pM5rLkUEzuXgCNdQRXYUjSQF7HDy26NsAojmPNh5_MWqEw-G9vxmmfJCIGwxc3N75S36E7k6CioXNnwQaqlNb6kTfYfH-S18fCO0ifoM/w400-h219/8051MT_PPIC_LoopsArticles_A03_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;When you first learn how to use &lt;/span&gt;&lt;code data-index-in-node="32" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/code&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;, &lt;/span&gt;&lt;code data-index-in-node="37" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;while&lt;/code&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;, and &lt;/span&gt;&lt;code data-index-in-node="48" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;do-while&lt;/code&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt; loops, you are operating in a &lt;/span&gt;&lt;b data-index-in-node="87" data-path-to-node="2" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; line-height: 1.15 !important; margin-top: 0px !important;"&gt;one-dimensional world&lt;/b&gt;&lt;span style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif;"&gt;. Your code moves in a single direction—either forward or backward—processing data sequentially line by line. But what happens when you need to solve multi-dimensional problems, like representing a grid, checking a matrix, or printing structured geometric shapes?&lt;/span&gt;&lt;/p&gt;&lt;p data-path-to-node="3" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;This is where &lt;b data-index-in-node="14" data-path-to-node="3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;nested loops&lt;/b&gt; come into play. By placing one loop inside another, you step into a two-dimensional programming paradigm. In this post, we will demystify how inner and outer loops interact, examine their execution flow, and learn how to trace them step by step without getting lost.&lt;/p&gt;&lt;h2 data-path-to-node="5" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;1. What is a Nested Loop?&lt;/h2&gt;&lt;p data-path-to-node="6" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;A nested loop is simply a loop inside the body of another loop. We refer to them as:&lt;/p&gt;&lt;ul data-path-to-node="7" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="7,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="7,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Outer Loop:&lt;/b&gt; The primary loop that controls the broader repetition.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Inner Loop:&lt;/b&gt; The secondary loop that executes completely during &lt;i data-index-in-node="67" data-path-to-node="7,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;each single iteration&lt;/i&gt; of the outer loop.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-path-to-node="8" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Basic Syntax Structure&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-62 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-62 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQ2AQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_cb86d783f4183171&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_866d6275d9e266c5&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-62" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-62" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-62 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-62 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;; i++) {          &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Outer Loop&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-62" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-62" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;; j++) {      &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Inner Loop&lt;/span&gt;
        &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Code executed on each inner cycle&lt;/span&gt;
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="10" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;The Golden Rule of Execution&lt;/h3&gt;&lt;p data-path-to-node="11" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;To master nested loops, you must memorize this fundamental rule: &lt;b data-index-in-node="65" data-path-to-node="11" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;For every single iteration of the outer loop, the inner loop runs from start to finish.&lt;/b&gt;&lt;/p&gt;&lt;p data-path-to-node="12" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;If the outer loop runs 3 times and the inner loop runs 3 times, the inner block of code will execute a total of &lt;span class="math-inline" data-index-in-node="112" data-math="3 \times 3 = 9" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$3 \times 3 = 9$&lt;/span&gt; times.&lt;/p&gt;&lt;h2 data-path-to-node="14" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;2. Tracing the Execution: Step-by-Step&lt;/h2&gt;&lt;p data-path-to-node="15" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Let's look at a concrete C code snippet and trace its exact behavior in memory.&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-63 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-63 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQ2QQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_cb86d783f4183171&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_866d6275d9e266c5&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-63" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-63" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-63 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-63 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-63" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-63" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;
&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; i &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;2&lt;/span&gt;; i++) {
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"Outer Loop Iteration: i = %d\n"&lt;/span&gt;, i);
        
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; j = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; j &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;; j++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"   -&amp;gt; Inner Loop: j = %d\n"&lt;/span&gt;, j);
        }
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="17" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;How the Trace Unfolds:&lt;/h3&gt;&lt;ol data-path-to-node="18" start="1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Outer Loop Starts (&lt;span class="math-inline" data-index-in-node="19" data-math="i = 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$i = 1$&lt;/span&gt;):&lt;/b&gt;&lt;/p&gt;&lt;ul data-path-to-node="18,0,1" style="line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,0,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The condition &lt;code data-index-in-node="14" data-path-to-node="18,0,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i &amp;lt;= 2&lt;/code&gt; is true.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,0,1,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Prints: &lt;code data-index-in-node="8" data-path-to-node="18,0,1,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Outer Loop Iteration: i = 1&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,0,1,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Control enters the &lt;b data-index-in-node="19" data-path-to-node="18,0,1,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;inner loop&lt;/b&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Inner Loop Runs Completely for &lt;span class="math-inline" data-index-in-node="31" data-math="i = 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$i = 1$&lt;/span&gt;:&lt;/b&gt;&lt;/p&gt;&lt;ul data-path-to-node="18,1,1" style="line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,1,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,1,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="math-inline" data-index-in-node="0" data-math="j = 1" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$j = 1$&lt;/span&gt;:&lt;/b&gt; Prints &lt;code data-index-in-node="14" data-path-to-node="18,1,1,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;   -&amp;gt; Inner Loop: j = 1&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,1,1,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,1,1,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="math-inline" data-index-in-node="0" data-math="j = 2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$j = 2$&lt;/span&gt;:&lt;/b&gt; Prints &lt;code data-index-in-node="14" data-path-to-node="18,1,1,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;   -&amp;gt; Inner Loop: j = 2&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,1,1,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,1,1,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="math-inline" data-index-in-node="0" data-math="j = 3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$j = 3$&lt;/span&gt;:&lt;/b&gt; Prints &lt;code data-index-in-node="14" data-path-to-node="18,1,1,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;   -&amp;gt; Inner Loop: j = 3&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,1,1,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Inner loop terminates because &lt;span class="math-inline" data-index-in-node="30" data-math="j" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$j$&lt;/span&gt; exceeds 3.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Outer Loop Advances (&lt;span class="math-inline" data-index-in-node="21" data-math="i = 2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$i = 2$&lt;/span&gt;):&lt;/b&gt;&lt;/p&gt;&lt;ul data-path-to-node="18,2,1" style="line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,2,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Control returns to the outer loop. &lt;span class="math-inline" data-index-in-node="35" data-math="i" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$i$&lt;/span&gt; increments to 2.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,2,1,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Prints: &lt;code data-index-in-node="8" data-path-to-node="18,2,1,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Outer Loop Iteration: i = 2&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,2,1,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Control enters the &lt;b data-index-in-node="19" data-path-to-node="18,2,1,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;inner loop&lt;/b&gt; &lt;i data-index-in-node="30" data-path-to-node="18,2,1,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;again&lt;/i&gt; (resetting &lt;span class="math-inline" data-index-in-node="47" data-math="j" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$j$&lt;/span&gt; to 1).&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,3,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Inner Loop Runs Completely for &lt;span class="math-inline" data-index-in-node="31" data-math="i = 2" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$i = 2$&lt;/span&gt;:&lt;/b&gt;&lt;/p&gt;&lt;ul data-path-to-node="18,3,1" style="line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,3,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,3,1,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="math-inline" data-index-in-node="0" data-math="j = 1, 2, 3" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$j = 1, 2, 3$&lt;/span&gt;:&lt;/b&gt; Prints the respective inner loop statements.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,3,1,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Inner loop terminates.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="18,4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="18,4,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Program Ends:&lt;/b&gt; Outer loop condition &lt;code data-index-in-node="35" data-path-to-node="18,4,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i &amp;lt;= 2&lt;/code&gt; becomes false when &lt;span class="math-inline" data-index-in-node="61" data-math="i" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$i$&lt;/span&gt; increments to 3.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2 data-path-to-node="20" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;3. Visualizing 2D Space: Rows and Columns&lt;/h2&gt;&lt;p data-path-to-node="21" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;The most intuitive way to think about nested loops is through a grid structure. Typically:&lt;/p&gt;&lt;ul data-path-to-node="22" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="22,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The &lt;b data-index-in-node="4" data-path-to-node="22,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Outer Loop (&lt;code data-index-in-node="16" data-path-to-node="22,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/code&gt;)&lt;/b&gt; represents the &lt;b data-index-in-node="34" data-path-to-node="22,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;rows&lt;/b&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="22,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;The &lt;b data-index-in-node="4" data-path-to-node="22,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Inner Loop (&lt;code data-index-in-node="16" data-path-to-node="22,1,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j&lt;/code&gt;)&lt;/b&gt; represents the &lt;b data-index-in-node="34" data-path-to-node="22,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;columns&lt;/b&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-64 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-64 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQ2gQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_cb86d783f4183171&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_866d6275d9e266c5&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-64" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-64" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-64 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-64 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;br /&gt;&lt;gem-icon-button _ngcontent-ng-c4093682955="" _nghost-ng-c3018762685="" aria-describedby="cdk-describedby-message-ng-1-20" arialabel="Copy code" cdk-describedby-host="ng-1" class="mat-mdc-tooltip-trigger copy-button ng-tns-c4093682955-64 gem-button gem-button-badge-size-small gem-button-size-small gem-button-type-on-surface lm-enabled ng-star-inserted" data-test-id="gem-copy-button" fonticonname="copy" gemtooltip="Copy code" size="small" style="line-height: 1.15 !important; margin-top: 0px !important;" tabindex="-1" theme="lm" type="onSurface"&gt;&lt;!----&gt;&lt;!----&gt;&lt;/gem-icon-button&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;/div&gt;&lt;!----&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-64" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-64" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// Printing a simple 3x3 grid of coordinates&lt;/span&gt;
&lt;span class="hljs-meta" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;#&lt;span class="hljs-meta-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class="hljs-function" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; &lt;span class="hljs-title" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;main&lt;/span&gt;&lt;span class="hljs-params" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; row = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; row &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;; row++) {
        &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;int&lt;/span&gt; col = &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;1&lt;/span&gt;; col &amp;lt;= &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;3&lt;/span&gt;; col++) {
            &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"(%d,%d) "&lt;/span&gt;, row, col);
        }
        &lt;span class="hljs-built_in" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;"\n"&lt;/span&gt;); &lt;span class="hljs-comment" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;// New line after each row completes&lt;/span&gt;
    }
    &lt;span class="hljs-keyword" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;return&lt;/span&gt; &lt;span class="hljs-number" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="24" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="24" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Output:&lt;/b&gt;&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-65 enable-luminous-code-block ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-65 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQ2wQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_cb86d783f4183171&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_866d6275d9e266c5&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-65" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-65" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-65 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-65 ng-star-inserted" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;(1,1) (1,2) (1,3)&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-65" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-65" data-test-id="code-content" role="text" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;(2,1) (2,2) (2,3) 
(3,1) (3,2) (3,3) 
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;p data-path-to-node="26" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Notice how the &lt;code data-index-in-node="15" data-path-to-node="26" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;printf("\n")&lt;/code&gt; is placed outside the inner loop but inside the outer loop. This ensures that a line break only happens after an entire row of columns has finished printing.&lt;/p&gt;&lt;h2 data-path-to-node="28" style="font-family: &amp;quot;Google Sans&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;Best Practices for Working with Nested Loops&lt;/h2&gt;&lt;ol data-path-to-node="29" start="1" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; padding-inline-start: 32px;"&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="29,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="29,0,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Use Clear Variable Names:&lt;/b&gt; Avoid generic variables like &lt;code data-index-in-node="55" data-path-to-node="29,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/code&gt; and &lt;code data-index-in-node="61" data-path-to-node="29,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j&lt;/code&gt; if your logic is complex. Instead, use descriptive names like &lt;code data-index-in-node="125" data-path-to-node="29,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;row&lt;/code&gt; and &lt;code data-index-in-node="133" data-path-to-node="29,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;col&lt;/code&gt;, or &lt;code data-index-in-node="141" data-path-to-node="29,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;i&lt;/code&gt; and &lt;code data-index-in-node="147" data-path-to-node="29,0,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;k&lt;/code&gt;, to keep track of scopes easily.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="29,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="29,1,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Watch Your Time Complexity:&lt;/b&gt; Nested loops multiply your iterations. If both loops scale with user input (&lt;span class="math-inline" data-index-in-node="104" data-math="N" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$N$&lt;/span&gt;), your time complexity becomes &lt;span class="math-inline" data-index-in-node="137" data-math="O(N^2)" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;$O(N^2)$&lt;/span&gt;. Be mindful of performance when handling large datasets.&lt;/p&gt;&lt;/li&gt;&lt;li style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;p data-path-to-node="29,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;&lt;b data-index-in-node="0" data-path-to-node="29,2,0" style="line-height: 1.15 !important; margin-top: 0px !important;"&gt;Trace on Paper First:&lt;/b&gt; If your inner loop depends on the outer loop’s variable (e.g., &lt;code data-index-in-node="85" data-path-to-node="29,2,0" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important;"&gt;j &amp;lt;= i&lt;/code&gt;), always draw a small matrix or trace table on paper to see how many times the inner loop runs per cycle.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-path-to-node="30" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;Transitioning from single loops to nested loops opens the door to matrices, game boards, data analysis, and pattern matching. Take your time tracing execution steps, and you'll find that two-dimensional logic soon becomes second nature!&lt;/p&gt;&lt;p data-path-to-node="30" style="font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif !important; line-height: 1.15 !important; margin-top: 0px !important; text-align: justify;"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTafvjYP2U7dW-rKsZLG07Zjh6sDQ1k957rNKnpj1ghJJFiOznqPSInDhI48cVz3c6d6462y7AQMB6WDwS09t_pM5rLkUEzuXgCNdQRXYUjSQF7HDy26NsAojmPNh5_MWqEw-G9vxmmfJCIGwxc3N75S36E7k6CioXNnwQaqlNb6kTfYfH-S18fCO0ifoM/s72-w400-h219-c/8051MT_PPIC_LoopsArticles_A03_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>ATM Balance Swapping || C Lab Programs</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-CLabPgms-A08-ATMBalanceSwapping.html</link><category>CCode</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Tue, 11 Aug 2026 15:52:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-885761230281288122</guid><description>&lt;p&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program 08: ATM account balance swap using pointers.&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;span id="docs-internal-guid-a7f85228-7fff-00ca-c255-fe93dd94902a"&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Statement::&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; In an ATM system, two account balances need to be swapped temporarily for validation. Develop a C program that accepts two balances and uses a function with pointers to swap them.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Description:&lt;/span&gt;&lt;/p&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Input:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Two floating-point numbers representing account balances.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The balances displayed both before and after the swap operation.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Constraints:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Use pointers in the swap function to modify the original variables in the main memory.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Method:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Implement a &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;swap()&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; function that accepts memory addresses (pointers).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Pgm Logic:&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Start.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input two balances: &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;balance1&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; and &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;balance2&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Display the balances before swapping.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Call the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;swap&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; function, passing the &lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;addresses&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; of the balances (&lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;amp;balance1, &amp;amp;balance2&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;).&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Inside the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;swap&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; function:&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Use a temporary variable to hold the value at the first pointer.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Assign the value at the second pointer to the first.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Assign the temporary value to the second pointer.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Display the updated balances in the main program.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Stop.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Code:&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;// Purpose: To swap two account balances in an ATM simulation using a function with pointers.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;void swap(float *a, float *b)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;float temp = *a;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*a = *b;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*b = temp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;void main()&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;float b1, b2;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter balance for Account 1: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%f", &amp;amp;b1);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter balance for Account 2: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%f", &amp;amp;b2);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("\nBefore Swapping:\nAccount 1: %.2f, Account 2: %.2f\n", b1, b2);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;swap(&amp;amp;b1, &amp;amp;b2);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("\nAfter Swapping:\nAccount 1: %.2f, Account 2: %.2f\n", b1, b2);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter balance for Account 1: 1000.50&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter balance for Account 2: 2000.75&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Before Swapping: Account 1: 1000.50, Account 2: 2000.75&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;After Swapping: Account 1: 2000.75, Account 2: 1000.50&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;RESULT:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Thus the program has been executed and the output was verified.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Remarks:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; This program was compiled and run in &lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;onlineGDB&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;. It illustrates the concept of "Call by Reference," which is essential for functions that need to update original variables.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Explanation:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; In standard C functions, variables are usually copied (Call by Value). By using pointers (&lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;*a&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; and &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;*b&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;) and passing addresses (&lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;amp;b1&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;), the function gains direct access to the variables in the main memory, allowing it to swap their actual values.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published C Lab Program posts Index page: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/08/CLabProgrampostsIndex.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published articles list:&lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/01/8051MT01022026PublishedArticlesIndexPage.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Building Logic &amp; Avoiding Pitfalls: How to Master Repetition in C</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-LoopsArticles-A02.html</link><category>Article</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Mon, 10 Aug 2026 18:00:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-4740062875735021428</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmIydENsIHOD-CCJYZS_ZljPzcJnNFXvkXiwaYDm9QKOZ3g5l2Z-D2y5df_YQ26PzxaJ9YrhYZ1fS4zRUphXa5WZwfk8zvVyYcCW5Z3qdKXOxqq_sj0m4fjdjfg2Ns6lrF0lOZuSXfrF9ML9n67Len0XWfi8n6FtupI0hxBY9L_HPz4I12_b9zkLwNI0N1/s1408/8051MT_PPIC_LoopsArticles_A02_Im01.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Building Logic &amp;amp; Avoiding Pitfalls: How to Master Repetition in C" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmIydENsIHOD-CCJYZS_ZljPzcJnNFXvkXiwaYDm9QKOZ3g5l2Z-D2y5df_YQ26PzxaJ9YrhYZ1fS4zRUphXa5WZwfk8zvVyYcCW5Z3qdKXOxqq_sj0m4fjdjfg2Ns6lrF0lOZuSXfrF9ML9n67Len0XWfi8n6FtupI0hxBY9L_HPz4I12_b9zkLwNI0N1/w400-h219/8051MT_PPIC_LoopsArticles_A02_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;When learning to program, writing the syntax for a loop is only half the battle. The true art of programming lies in &lt;b data-index-in-node="117" data-path-to-node="2"&gt;logic building&lt;/b&gt;—learning how to translate a repetitive real-world problem into clean, efficient, and safe executable code.&lt;/p&gt;&lt;p data-path-to-node="3" style="text-align: justify;"&gt;While loops allow us to automate tasks, they also introduce unique challenges. If you don't design your logic carefully, your program can freeze, crash, or run forever. In this post, we will explore how loops work under the hood, how to build strong mental models for loop logic, and how to protect your code from the dreaded infinite loop.&lt;/p&gt;&lt;h2 data-path-to-node="5"&gt;1. Under the Hood: How Loops Execute in Memory&lt;/h2&gt;&lt;p data-path-to-node="6"&gt;To build better logic, it helps to understand what your computer is actually doing when a loop runs.&lt;/p&gt;&lt;p data-path-to-node="7"&gt;At the hardware and compiler level, a loop is not much different from a &lt;code data-index-in-node="72" data-path-to-node="7"&gt;goto&lt;/code&gt; statement combined with a conditional branch. When your C code is compiled into machine code:&lt;/p&gt;&lt;ol data-path-to-node="8" start="1"&gt;&lt;li&gt;&lt;p data-path-to-node="8,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="8,0,0"&gt;The Instruction Pointer (IP)&lt;/b&gt; points to the beginning of the loop block.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="8,1,0"&gt;The processor evaluates the &lt;b data-index-in-node="28" data-path-to-node="8,1,0"&gt;condition flag&lt;/b&gt; stored in the CPU registers.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="8,2,0"&gt;If the condition evaluates to true, the instruction pointer continues executing the block.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="8,3,0"&gt;If the condition evaluates to false, the CPU executes a &lt;b data-index-in-node="56" data-path-to-node="8,3,0"&gt;conditional jump instruction&lt;/b&gt; that bypasses the loop block entirely and moves to the code immediately following it.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-path-to-node="9"&gt;Understanding this helps demystify why updating your control variable is so critical. If your variable never changes, the CPU register holding your condition flag never updates, resulting in an unescapable trap.&lt;/p&gt;&lt;h2 data-path-to-node="11"&gt;2. Building Programming Logic: Step-by-Step&lt;/h2&gt;&lt;p data-path-to-node="12"&gt;Effective logic building is about breaking down a problem before you write a single line of code. Follow this framework when designing a loop:&lt;/p&gt;&lt;ul data-path-to-node="13"&gt;&lt;li&gt;&lt;p data-path-to-node="13,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="13,0,0"&gt;Identify the Starting Point (Initialization):&lt;/b&gt; What is the exact state of your program before repetition begins? What variable tracks your progress?&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="13,1,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="13,1,0"&gt;Define the Boundary (Condition):&lt;/b&gt; At what exact point should the repetition stop? Always test your boundary conditions (what happens at the very first iteration? What happens right before the loop ends?).&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="13,2,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="13,2,0"&gt;Determine the Step Size (Update):&lt;/b&gt; How does the program move closer to the termination condition with every cycle? Is it incrementing by 1, multiplying, or reacting to user input?&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 data-path-to-node="15"&gt;3. The Ultimate Danger: Avoiding Infinite Loops&lt;/h2&gt;&lt;p data-path-to-node="16"&gt;An &lt;b data-index-in-node="3" data-path-to-node="16"&gt;infinite loop&lt;/b&gt; occurs when the loop's termination condition can &lt;i data-index-in-node="66" data-path-to-node="16"&gt;never&lt;/i&gt; be met. While intentional infinite loops are sometimes used in embedded systems or game servers (e.g., &lt;code data-index-in-node="175" data-path-to-node="16"&gt;while(1)&lt;/code&gt;), an accidental infinite loop will freeze your application, consume 100% of your CPU, or cause a stack/memory overflow.&lt;/p&gt;&lt;p data-path-to-node="17"&gt;Here are the three most common causes of infinite loops and how to avoid them:&lt;/p&gt;&lt;h3 data-path-to-node="18"&gt;A. Forgetting to Update the Control Variable&lt;/h3&gt;&lt;p data-path-to-node="19"&gt;This is the classic beginner mistake. If you increment your condition variable inside your head but forget to write it in code, the loop will never end.&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-59 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-59 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQ1QQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_8bf376143c061406&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_abab800380a4bb54&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-59"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-59"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-59 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-59 ng-star-inserted"&gt;// BAD: 'i' never changes, resulting in an infinite loop&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-59"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-59" data-test-id="code-content" role="text"&gt;&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number"&gt;1&lt;/span&gt;;
&lt;span class="hljs-keyword"&gt;while&lt;/span&gt; (i &amp;lt;= &lt;span class="hljs-number"&gt;10&lt;/span&gt;) {
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"%d\n"&lt;/span&gt;, i);
    &lt;span class="hljs-comment"&gt;// Missing: i++;&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="21"&gt;B. Off-by-One Errors and Incorrect Operators&lt;/h3&gt;&lt;p data-path-to-node="22"&gt;Using the wrong comparison operator (like &lt;code data-index-in-node="42" data-path-to-node="22"&gt;&amp;lt;&lt;/code&gt; instead of &lt;code data-index-in-node="55" data-path-to-node="22"&gt;&amp;lt;=&lt;/code&gt;, or accidentally using &lt;code data-index-in-node="81" data-path-to-node="22"&gt;=&lt;/code&gt; assignment instead of &lt;code data-index-in-node="105" data-path-to-node="22"&gt;==&lt;/code&gt; equality) can break your termination logic.&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-60 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-60 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQ1gQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_8bf376143c061406&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_abab800380a4bb54&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-60"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-60"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-60 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-60 ng-star-inserted"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-60 ng-star-inserted"&gt;// BAD: Using assignment (=) instead of comparison (==)&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-60"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-60" data-test-id="code-content" role="text"&gt;&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; status = &lt;span class="hljs-number"&gt;1&lt;/span&gt;;
&lt;span class="hljs-keyword"&gt;while&lt;/span&gt; (status = &lt;span class="hljs-number"&gt;0&lt;/span&gt;) { &lt;span class="hljs-comment"&gt;// This assigns 0 to status and evaluates to false immediately, or vice versa&lt;/span&gt;
    &lt;span class="hljs-comment"&gt;// ...&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h3 data-path-to-node="24"&gt;C. Floating-Point Precision Traps&lt;/h3&gt;&lt;p data-path-to-node="25"&gt;Never use floating-point variables (&lt;code data-index-in-node="36" data-path-to-node="25"&gt;float&lt;/code&gt; or &lt;code data-index-in-node="45" data-path-to-node="25"&gt;double&lt;/code&gt;) as loop counters for exact conditions. Due to how computers store decimals in binary, rounding errors can cause your loop to skip your exact target value entirely, running forever.&lt;/p&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-61 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-61 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQ1wQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_8bf376143c061406&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_abab800380a4bb54&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-61"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-61"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-61 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-61 ng-star-inserted"&gt;// BAD: Floating-point inaccuracy can cause infinite loops&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-61"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-61" data-test-id="code-content" role="text"&gt;&lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;float&lt;/span&gt; f = &lt;span class="hljs-number"&gt;0.0f&lt;/span&gt;; f != &lt;span class="hljs-number"&gt;1.0f&lt;/span&gt;; f += &lt;span class="hljs-number"&gt;0.1f&lt;/span&gt;) {
    &lt;span class="hljs-comment"&gt;// 0.1 might not add up cleanly to 1.0 due to binary precision!&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="28"&gt;Best Practices for Bulletproof Loops&lt;/h2&gt;&lt;ol data-path-to-node="29" start="1"&gt;&lt;li&gt;&lt;p data-path-to-node="29,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="29,0,0"&gt;Dry Run Your Code:&lt;/b&gt; Before running your program, trace it on paper with a small data set (e.g., assume 2 or 3 iterations). Track the values of your variables line by line.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="29,1,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="29,1,0"&gt;Favor &lt;code data-index-in-node="6" data-path-to-node="29,1,0"&gt;for&lt;/code&gt; Loops for Counters:&lt;/b&gt; If you know how many times something needs to run, use a &lt;code data-index-in-node="87" data-path-to-node="29,1,0"&gt;for&lt;/code&gt; loop. Bundling the initialization, condition, and update together makes it much harder to forget to update your variable.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="29,2,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="29,2,0"&gt;Build Safe Exits:&lt;/b&gt; For &lt;code data-index-in-node="22" data-path-to-node="29,2,0"&gt;while&lt;/code&gt; loops driven by user input, always provide a clear, easy-to-reach escape mechanism (like typing &lt;code data-index-in-node="124" data-path-to-node="29,2,0"&gt;-1&lt;/code&gt; or &lt;code data-index-in-node="130" data-path-to-node="29,2,0"&gt;'q'&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-path-to-node="30"&gt;By mastering the mechanics under the hood and adopting disciplined logic-building habits, you'll write cleaner C code that runs predictably every single time.&lt;/p&gt;&lt;p data-path-to-node="30"&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmIydENsIHOD-CCJYZS_ZljPzcJnNFXvkXiwaYDm9QKOZ3g5l2Z-D2y5df_YQ26PzxaJ9YrhYZ1fS4zRUphXa5WZwfk8zvVyYcCW5Z3qdKXOxqq_sj0m4fjdjfg2Ns6lrF0lOZuSXfrF9ML9n67Len0XWfi8n6FtupI0hxBY9L_HPz4I12_b9zkLwNI0N1/s72-w400-h219-c/8051MT_PPIC_LoopsArticles_A02_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Student Marks Validation || C Lab Programs</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-CLabPgms-A07-StudentMarksValidation.html</link><category>CCode</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Mon, 10 Aug 2026 15:32:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-3304032227695810931</guid><description>&lt;p&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program 07: Student subject pass/fail check.&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;span id="docs-internal-guid-5b8c631b-7fff-0994-a0aa-b8b770c1184e"&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Statement::&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Develop a C program that takes marks for three subjects as input. Use a function to check if the student has passed (minimum 40 marks in each subject). Display the average and whether the student passed or failed.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Description:&lt;/span&gt;&lt;/p&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Input:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Three integers representing marks in three subjects.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The average marks and a "Passed" or "Failed" status message.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Constraints:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Marks should be in the range 0 to 100; passing requires &lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;at least 40 marks in every subject&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Method:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Implement a custom function &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;isPassed()&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; to handle the validation logic.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Pgm Logic:&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Start.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input marks for three subjects.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Calculate the average: &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;average = (m1 + m2 + m3) / 3.0&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Call the function &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;isPassed(m1, m2, m3)&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Inside the function:&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;If all three marks are $\ge$ 40, return 1 (Pass).&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="2" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: circle; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Else, return 0 (Fail).&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;In the main program, display the average.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;If the function returned 1, print "Passed", otherwise print "Failed".&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Stop.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Code:&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;// Purpose: To check subject pass status and calculate average marks using a custom function.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;int isPassed(int m1, int m2, int m3)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (m1 &amp;gt;= 40 &amp;amp;&amp;amp; m2 &amp;gt;= 40 &amp;amp;&amp;amp; m3 &amp;gt;= 40)&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 1;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;void main()&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int s1, s2, s3;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;float average;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter marks for three subjects: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%d %d %d", &amp;amp;s1, &amp;amp;s2, &amp;amp;s3);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;average = (s1 + s2 + s3) / 3.0;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Average Marks: %.2f\n", average);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (isPassed(s1, s2, s3))&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Result: Passed\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Result: Failed\n");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter marks for three subjects: 50 60 70&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Average Marks: 60.00 Result: Passed&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;RESULT:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Thus the program has been executed and the output was verified.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Remarks:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Compiled and run in &lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Code::Blocks&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;. This program demonstrates modular programming by separating the logic for "passing" into its own reusable function.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Explanation:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The main function handles data entry and math, while the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;isPassed&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; function acts as a "gatekeeper" that checks the specific criteria for passing. Even if the average is high, the student fails if any single subject is below 40.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published C Lab Program posts Index page: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/08/CLabProgrampostsIndex.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published articles list:&lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/01/8051MT01022026PublishedArticlesIndexPage.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Looping 101: A Beginner's Guide to for, while, and do-while Loops in C</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-PPIC-LoopsArticles-A01.html</link><category>Article</category><category>PatternProgramsInC</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Sun, 9 Aug 2026 18:01:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-1512954279196144213</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGzz-vBLtoC7KJOh9G7warsJzpVbqZp-c3x4-c7qD7_uP0icbff19PYeD5GtLxuIe-tIfIBjiEuvBWZHDthYlMwcp__04VtwVUZs3AYY_EoNollkgaaSa_ANY7mLQezAFX5t3ylqTLwooanZ8ZqTqOhDh1h7LQhjePnSKVKqe8mtImxRxk3Puc9j4oD9k9/s1408/8051MT_PPIC_LoopsArticles_A01_Im01.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Looping 101: A Beginner's Guide to for, while, and do-while Loops in C" border="0" data-original-height="768" data-original-width="1408" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGzz-vBLtoC7KJOh9G7warsJzpVbqZp-c3x4-c7qD7_uP0icbff19PYeD5GtLxuIe-tIfIBjiEuvBWZHDthYlMwcp__04VtwVUZs3AYY_EoNollkgaaSa_ANY7mLQezAFX5t3ylqTLwooanZ8ZqTqOhDh1h7LQhjePnSKVKqe8mtImxRxk3Puc9j4oD9k9/w400-h219/8051MT_PPIC_LoopsArticles_A01_Im01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p data-path-to-node="2" style="text-align: justify;"&gt;If you have ever found yourself writing the same line of code over and over again, you already understand the problem that loops were invented to solve. In programming, repetition is inevitable. Whether you are processing a list of user inputs, reading files, or rendering graphics, you need a way to tell your computer to execute a block of code multiple times without rewriting it.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;In C programming, loops are the foundational control structures that make this automation possible. In this guide, we will break down the mechanics of iteration, explore the three primary loop types—&lt;code data-index-in-node="199" data-path-to-node="3"&gt;for&lt;/code&gt;, &lt;code data-index-in-node="204" data-path-to-node="3"&gt;while&lt;/code&gt;, and &lt;code data-index-in-node="215" data-path-to-node="3"&gt;do-while&lt;/code&gt;—and look at their syntax and execution flows.&lt;/p&gt;&lt;h2 data-path-to-node="5"&gt;What is a Loop? (The Core Mechanics)&lt;/h2&gt;&lt;p data-path-to-node="6"&gt;At its core, a loop is a programming construct that repeats a block of code as long as a specified &lt;b data-index-in-node="99" data-path-to-node="6"&gt;condition&lt;/b&gt; evaluates to true (non-zero).&lt;/p&gt;&lt;p data-path-to-node="7"&gt;Every standard loop relies on three critical components:&lt;/p&gt;&lt;ol data-path-to-node="8" start="1"&gt;&lt;li&gt;&lt;p data-path-to-node="8,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="8,0,0"&gt;Initialization:&lt;/b&gt; Setting up a counter or control variable.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="8,1,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="8,1,0"&gt;Condition:&lt;/b&gt; The test expression evaluated before or after each iteration. If false, the loop terminates.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p data-path-to-node="8,2,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="8,2,0"&gt;Update:&lt;/b&gt; Modifying the control variable so the loop eventually ends (preventing an infinite loop).&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p data-path-to-node="9"&gt;Let's dive into how the three C loops implement these mechanics.&lt;/p&gt;&lt;h2 data-path-to-node="11"&gt;1. The &lt;code data-index-in-node="7" data-path-to-node="11"&gt;while&lt;/code&gt; Loop: Entry-Controlled Repetition&lt;/h2&gt;&lt;p data-path-to-node="12"&gt;The &lt;code data-index-in-node="4" data-path-to-node="12"&gt;while&lt;/code&gt; loop is best used when you &lt;b data-index-in-node="37" data-path-to-node="12"&gt;don't know in advance&lt;/b&gt; how many times the loop will run, and execution depends entirely on an external condition (like user input or a flag).&lt;/p&gt;&lt;h3 data-path-to-node="13"&gt;Syntax &amp;amp; Execution Flow&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-53 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-53 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQzQQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_8947582caa71f84f&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7fb5797e36bec985&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-53"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-53"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-53 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-53 ng-star-inserted"&gt;&lt;span class="hljs-keyword"&gt;while&lt;/span&gt; (condition) {&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-53"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-53" data-test-id="code-content" role="text"&gt;    &lt;span class="hljs-comment"&gt;// Code to be executed repeatedly&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;ul data-path-to-node="15"&gt;&lt;li&gt;&lt;p data-path-to-node="15,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="15,0,0"&gt;Mechanics:&lt;/b&gt; The condition is checked &lt;b data-index-in-node="36" data-path-to-node="15,0,0"&gt;before&lt;/b&gt; the code block runs. If the condition is false initially, the code inside the loop will never execute.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3 data-path-to-node="16"&gt;Example&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-54 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-54 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQzgQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_8947582caa71f84f&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7fb5797e36bec985&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-54"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-54"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-54 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-54 ng-star-inserted"&gt;#&lt;span class="hljs-meta-keyword"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-54"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-54" data-test-id="code-content" role="text"&gt;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; &lt;span class="hljs-title"&gt;main&lt;/span&gt;&lt;span class="hljs-params"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword"&gt;int&lt;/span&gt; count = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; &lt;span class="hljs-comment"&gt;// Initialization&lt;/span&gt;
    
    &lt;span class="hljs-keyword"&gt;while&lt;/span&gt; (count &amp;lt;= &lt;span class="hljs-number"&gt;5&lt;/span&gt;) { &lt;span class="hljs-comment"&gt;// Condition&lt;/span&gt;
        &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"Count is: %d\n"&lt;/span&gt;, count);
        count++; &lt;span class="hljs-comment"&gt;// Update&lt;/span&gt;
    }
    
    &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; &lt;span class="hljs-number"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="19"&gt;2. The &lt;code data-index-in-node="7" data-path-to-node="19"&gt;do-while&lt;/code&gt; Loop: Guaranteed Execution&lt;/h2&gt;&lt;p data-path-to-node="20"&gt;The &lt;code data-index-in-node="4" data-path-to-node="20"&gt;do-while&lt;/code&gt; loop is a variation of the &lt;code data-index-in-node="40" data-path-to-node="20"&gt;while&lt;/code&gt; loop with one major difference: it is an &lt;b data-index-in-node="87" data-path-to-node="20"&gt;exit-controlled&lt;/b&gt; loop.&lt;/p&gt;&lt;h3 data-path-to-node="21"&gt;Syntax &amp;amp; Execution Flow&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-55 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-55 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQzwQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_8947582caa71f84f&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7fb5797e36bec985&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-55"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-55"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-55 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-55 ng-star-inserted"&gt;&lt;span class="hljs-keyword"&gt;do&lt;/span&gt; {&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-55"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-55" data-test-id="code-content" role="text"&gt;    &lt;span class="hljs-comment"&gt;// Code to be executed at least once&lt;/span&gt;
} &lt;span class="hljs-keyword"&gt;while&lt;/span&gt; (condition);
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;ul data-path-to-node="23"&gt;&lt;li&gt;&lt;p data-path-to-node="23,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="23,0,0"&gt;Mechanics:&lt;/b&gt; The code block executes &lt;b data-index-in-node="35" data-path-to-node="23,0,0"&gt;first&lt;/b&gt;, and &lt;i data-index-in-node="46" data-path-to-node="23,0,0"&gt;then&lt;/i&gt; the condition is checked at the end. This guarantees that the loop body runs &lt;b data-index-in-node="128" data-path-to-node="23,0,0"&gt;at least once&lt;/b&gt;, regardless of whether the condition is true or false.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-path-to-node="24"&gt;Example&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-56 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-56 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQ0AQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_8947582caa71f84f&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7fb5797e36bec985&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-56"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-56"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-56 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-56 ng-star-inserted"&gt;#&lt;span class="hljs-meta-keyword"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-56"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-56" data-test-id="code-content" role="text"&gt;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; &lt;span class="hljs-title"&gt;main&lt;/span&gt;&lt;span class="hljs-params"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-keyword"&gt;int&lt;/span&gt; choice;
    
    &lt;span class="hljs-keyword"&gt;do&lt;/span&gt; {
        &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"Enter 1 to Play, 0 to Exit: "&lt;/span&gt;);
        &lt;span class="hljs-built_in"&gt;scanf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"%d"&lt;/span&gt;, &amp;amp;choice);
    } &lt;span class="hljs-keyword"&gt;while&lt;/span&gt; (choice == &lt;span class="hljs-number"&gt;1&lt;/span&gt;); &lt;span class="hljs-comment"&gt;// Condition checked after execution&lt;/span&gt;
    
    &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"Game Over.\n"&lt;/span&gt;);
    &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; &lt;span class="hljs-number"&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;h2 data-path-to-node="27"&gt;3. The &lt;code data-index-in-node="7" data-path-to-node="27"&gt;for&lt;/code&gt; Loop: Counter-Controlled Precision&lt;/h2&gt;&lt;p data-path-to-node="28"&gt;The &lt;code data-index-in-node="4" data-path-to-node="28"&gt;for&lt;/code&gt; loop is the most commonly used loop in C. It is designed specifically for situations where you &lt;b data-index-in-node="103" data-path-to-node="28"&gt;know the exact number of iterations&lt;/b&gt; you need beforehand.&lt;/p&gt;&lt;h3 data-path-to-node="29"&gt;Syntax &amp;amp; Execution Flow&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-57 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-57 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQ0QQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_8947582caa71f84f&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7fb5797e36bec985&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-57"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-57"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-57 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-57 ng-star-inserted"&gt;&lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (initialization; condition; update) {&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-57"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-57" data-test-id="code-content" role="text"&gt;    &lt;span class="hljs-comment"&gt;// Code to be executed repeatedly&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/code-block&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;/response-element&gt;&lt;ul data-path-to-node="31"&gt;&lt;li&gt;&lt;p data-path-to-node="31,0,0"&gt;&lt;b data-index-in-node="0" data-path-to-node="31,0,0"&gt;Mechanics:&lt;/b&gt; All three essential components (initialization, condition, and update) are neatly packed into a single line inside the parentheses, making your code cleaner and easier to maintain.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 data-path-to-node="32"&gt;Example&lt;/h3&gt;&lt;response-element class="no-md" ng-version="0.0.0-PLACEHOLDER"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;code-block _nghost-ng-c4093682955="" class="ng-tns-c4093682955-58 enable-luminous-code-block ng-star-inserted"&gt;&lt;!----&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block ng-tns-c4093682955-58 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahgKEwjPzu7R5_eVAxUAAAAAHQAAAAAQ0gQ" decode-data-ved="1" jslog="223238;track:impression,attention;BardVeMetadataKey:[[&amp;quot;r_8947582caa71f84f&amp;quot;,&amp;quot;c_863d44700e87b757&amp;quot;,null,&amp;quot;rc_7fb5797e36bec985&amp;quot;,null,null,&amp;quot;en&amp;quot;,null,1,null,null,1,0]]"&gt;&lt;!----&gt;&lt;div _ngcontent-ng-c4093682955="" class="formatted-code-block-internal-container ng-tns-c4093682955-58"&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-58"&gt;&lt;div _ngcontent-ng-c4093682955="" class="code-block-decoration header-formatted gds-emphasized-body-m ng-tns-c4093682955-58 ng-star-inserted"&gt;&lt;div _ngcontent-ng-c4093682955="" class="buttons ng-tns-c4093682955-58 ng-star-inserted"&gt;#&lt;span class="hljs-meta-keyword"&gt;include&lt;/span&gt; &lt;span class="hljs-meta-string"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre _ngcontent-ng-c4093682955="" class="ng-tns-c4093682955-58"&gt;&lt;code _ngcontent-ng-c4093682955="" class="code-container formatted ng-tns-c4093682955-58" data-test-id="code-content" role="text"&gt;
&lt;span class="hljs-function"&gt;&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; &lt;span class="hljs-title"&gt;main&lt;/span&gt;&lt;span class="hljs-params"&gt;()&lt;/span&gt; &lt;/span&gt;{
    &lt;span class="hljs-comment"&gt;// Initialization; Condition; Update are bundled together&lt;/span&gt;
    &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i = &lt;span class="hljs-number"&gt;1&lt;/span&gt;; i &amp;lt;= &lt;span class="hljs-number"&gt;5&lt;/span&gt;; i++) {
        &lt;span class="hljs-built_in"&gt;printf&lt;/span&gt;(&lt;span class="hljs-string"&gt;"Iteration %d\n"&lt;/span&gt;, i);
    }
    
    &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; &lt;span class="hljs-number"&gt;0&lt;/span&gt;;
}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-58"&gt;&lt;table data-path-to-node="36" style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; color: #1f1f1f; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; font-family: &amp;quot;Google Sans Text&amp;quot;, sans-serif; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 32px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px 0px 32px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;thead style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;tr style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;strong style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;Loop Type&lt;/strong&gt;&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;strong style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;Control Type&lt;/strong&gt;&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;strong style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;When to Use&lt;/strong&gt;&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;strong style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;Key Characteristic&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;tr style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;for&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;span data-path-to-node="36,1,1,0" style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;Counter-controlled&lt;/span&gt;&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;span data-path-to-node="36,1,2,0" style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;When the number of iterations is known.&lt;/span&gt;&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;span data-path-to-node="36,1,3,0" style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;Compact syntax; variables can be scoped locally.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;while&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;span data-path-to-node="36,2,1,0" style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;Entry-controlled&lt;/span&gt;&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;span data-path-to-node="36,2,2,0" style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;When iterations depend on a dynamic condition.&lt;/span&gt;&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;span data-path-to-node="36,2,3,0" style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;May skip execution entirely if the condition is false.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;do-while&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;span data-path-to-node="36,3,1,0" style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;Exit-controlled&lt;/span&gt;&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;span data-path-to-node="36,3,2,0" style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;When code must run at least once (e.g., menus).&lt;/span&gt;&lt;/td&gt;&lt;td style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 1px solid rgb(196, 199, 197); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: 0px; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 8px 12px; page: auto; perspective: none; position: relative; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;&lt;span data-path-to-node="36,3,3,0" style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;Evaluates the condition &lt;i data-index-in-node="24" data-path-to-node="36,3,3,0" style="animation: auto ease 0s 1 normal none running none; appearance: none; background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto; border: 0px rgb(31, 31, 31); clear: none; clip: auto; columns: auto; contain: none; container: none; content: normal; cursor: auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; fill: rgb(0, 0, 0); filter: none; flex-direction: row; flex: 0 1 auto; float: none; gap: normal; hyphens: manual; inset: auto; interactivity: auto; isolation: auto; line-height: 1.15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; margin: 0px; marker: none; mask-clip: border-box; mask-composite: add; mask-image: none; mask-mode: match-source; mask-origin: border-box; mask-repeat: repeat; mask-size: auto; mask: none; offset: normal; opacity: 1; order: 0; outline: rgb(31, 31, 31) none 3px; overlay: none; padding: 0px; page: auto; perspective: none; position: static; quotes: auto; r: 0px; resize: none; rotate: none; rule: 3px rgb(31, 31, 31); rx: auto; ry: auto; scale: none; speak: normal; stroke: none; transform: none; transition: all; translate: none; visibility: visible; x: 0px; y: 0px; zoom: 1;"&gt;after&lt;/i&gt; execution.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Mastering these three constructs is your first major milestone in becoming a proficient C programmer. Practice writing small programs with each loop type, pay close attention to your loop conditions to avoid infinite loops, and you'll build rock-solid coding logic in no time!&lt;/div&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c4093682955="" class="animated-opacity ng-tns-c4093682955-58"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;For all Pattern Programs list &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2024/12/PPICILA202412S00-00Article.html" style="text-decoration: none;"&gt;&lt;span face="Arial, sans-serif" style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span face="Arial, sans-serif" style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code-block&gt;&lt;/response-element&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGzz-vBLtoC7KJOh9G7warsJzpVbqZp-c3x4-c7qD7_uP0icbff19PYeD5GtLxuIe-tIfIBjiEuvBWZHDthYlMwcp__04VtwVUZs3AYY_EoNollkgaaSa_ANY7mLQezAFX5t3ylqTLwooanZ8ZqTqOhDh1h7LQhjePnSKVKqe8mtImxRxk3Puc9j4oD9k9/s72-w400-h219-c/8051MT_PPIC_LoopsArticles_A01_Im01.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Course Description Keyword Search || C Lab Programs</title><link>http://8051microcontrollertutorial.blogspot.com/2026/08/8051MT-CLabPgms-A06-CourseDescriptionKeywordSearch.html</link><category>CCode</category><author>noreply@blogger.com (belgaumboy)</author><pubDate>Sun, 9 Aug 2026 15:28:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4851956796326782150.post-6536617354072459373</guid><description>&lt;p&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program 06: Search keyword in course description.&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;span id="docs-internal-guid-c68425b1-7fff-031b-f8a9-8b497f83d34e"&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt; text-align: justify;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Statement::&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Develop a C program that accepts a course description string and a keyword from the user. Search whether the keyword exists within the course description using appropriate string functions.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Problem Description:&lt;/span&gt;&lt;/p&gt;&lt;ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Input:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; A string representing the course description (multiple words) and a string representing the keyword to search for.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; A message confirming if the keyword was found or not.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Constraints:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Keyword search is case-sensitive; assume input strings are less than 256 characters.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Method:&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Use the standard C string function &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;strstr()&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; to check if the keyword is a substring of the description.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Pgm Logic:&lt;/span&gt;&lt;/p&gt;&lt;ol style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Start.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input the course description string (using a method that supports spaces).&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Input the keyword to search for.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Use the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;strstr()&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; function to search for the keyword within the description.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;If &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;strstr()&lt;/span&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; returns a non-NULL pointer, display: "Keyword '' found in the course description.".&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Otherwise, display: "Keyword '' not found in the course description.".&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li aria-level="1" dir="ltr" style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; list-style-type: decimal; vertical-align: baseline; white-space: pre;"&gt;&lt;p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Stop.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Code:&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;// Purpose: To search for a keyword within a multi-word course description string.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;#include &amp;lt;string.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;void main()&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;char *description;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;char *keyword;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter the course description: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Using [^\n] to read the entire line including spaces until Enter is pressed&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf(" %[^\n]s", description);&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Enter the keyword to search: ");&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scanf("%s", keyword);&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// strstr returns the address of the first occurrence or NULL if not found&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (strstr(description, keyword))&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Keyword '%s' found in the course description.\n", keyword);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("Keyword '%s' not found in the course description.\n", keyword);&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Output:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter the course description: Introduction to Computer Science&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Enter the keyword to search: Computer&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;Keyword 'Computer' found in the course description.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;RESULT:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; Thus the program has been executed and the output was verified.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Remarks:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; The key fix is using &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;scanf(" %[^\n]s", description);&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; or &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;fgets()&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;. The original manual code failed because standard &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;%s&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; stops at the first space, meaning "Introduction to Computer" would be truncated to just "Introduction". This corrected version was verified using the &lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;onlineGDB tool&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 12pt;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;"&gt;Program Explanation:&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; This program utilizes the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;string.h&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; library. The &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;strstr()&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; function is the core of the logic; it performs a linear search for the keyword inside the larger description string. If the keyword is present anywhere in the description, the function returns a pointer to its start, which evaluates to "true" in the &lt;/span&gt;&lt;span style="color: #188038; font-family: &amp;quot;Roboto Mono&amp;quot;, monospace; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;if&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt; condition.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 11pt; font-variant: normal; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published C Lab Program posts Index page: &lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/08/CLabProgrampostsIndex.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;For all 2026 published articles list:&lt;/span&gt;&lt;a href="https://8051microcontrollertutorial.blogspot.com/2026/01/8051MT01022026PublishedArticlesIndexPage.html" style="text-decoration: none;"&gt;&lt;span style="color: #1155cc; font-size: 11pt; font-variant: normal; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline;"&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: right;"&gt;&lt;span style="font-size: 11pt; font-variant: normal; vertical-align: baseline;"&gt;…till the next post, bye-bye &amp;amp; take care&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>