bsc

Comprehensive codebase and cou...
Log | Files | Refs | README | LICENSE

commit cfc83a0e862a2ae363994d1f79f538c5c4fcbc49
parent a98c7a9de8617a6f8cdb0ceffeafa5b5b772e741
Author: Amit Dutta <amitdutta4255@gmail.com>
Date:   Fri, 28 Nov 2025 18:25:28 +0530

update -28112025 .\assignment\assignment01-04 _Problem Statement Added

Diffstat:
Massignment/assignment01.c | 5++++-
Massignment/assignment02.c | 6+++++-
Massignment/assignment03.c | 6+++++-
Massignment/assignment04.c | 4+++-
Mdocs/index.html | 25650+++++++++++++++++++++++++++++++++++--------------------------------------------
5 files changed, 11497 insertions(+), 14174 deletions(-)

diff --git a/assignment/assignment01.c b/assignment/assignment01.c @@ -1,4 +1,7 @@ -/* Author: Amit Dutta, Date: 27-11-2025*/ +/* Write a C program that includes a user-defined function named isPrime with the signature +int isPrime(int num); The function should take an integer as a parameter and return 1 if +the number is prime and 0 otherwise. */ + #include <stdio.h> #include <math.h> diff --git a/assignment/assignment02.c b/assignment/assignment02.c @@ -1,4 +1,8 @@ -/* Author: Amit Dutta, Date: 27-11-2025*/ +/* Write a C program that includes a user-defined function named isArmstrong with the +signature int isArmstrong(int num);. An Armstrong number is a number that is equal to +the sum of its own digits each raised to the power of the number of digits. For example, +153 is an Armstrong number because 1^3 + 5^3 + 3^3 = 153 */ + #include <stdio.h> #include <math.h> diff --git a/assignment/assignment03.c b/assignment/assignment03.c @@ -1,4 +1,8 @@ -/* Author: Amit Dutta, Date: 27-11-2025*/ +/* Write a C program that includes a user-defined function named isPerfect with the signature +int isPerfect(int num);. A perfect number is a positive integer that is equal to the sum of +its proper divisors, excluding itself. For example, 28 is a perfect number because the sum +of its divisors (1, 2, 4, 7, 14) equals 28. */ + #include <stdio.h> int isPerfect(int); diff --git a/assignment/assignment04.c b/assignment/assignment04.c @@ -1,4 +1,6 @@ -/* Author: Amit Dutta, Date: 27-11-2025*/ +/* Write a C program that takes an integer input representing a month (1 to 12) and a year. +Use a switch statement to display the number of days in that month, considering leap years. */ + #include <stdio.h> int main() diff --git a/docs/index.html b/docs/index.html @@ -1,14170 +1,11480 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="UTF-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title>notamitgamer/bsc Repository File Index</title> - <script src="https://cdn.tailwindcss.com"></script> - <link - href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" - rel="stylesheet" - /> - <link - rel="stylesheet" - href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" - /> - <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> - - <style> - body { - font-family: "Inter", sans-serif; - } - .chevron.rotated { - transform: rotate(180deg); - } - - /* --- Enhanced Code Viewer Modal Styles --- */ - #code-modal .modal-content-area { - /* Ensure the code viewer takes up maximum available height */ - height: 90vh; - max-height: 90vh; - } - #modal-code-container { - /* Remove default padding from the outer container */ - padding: 0; - flex-grow: 1; /* Allow the container to fill space */ - display: flex; /* Flex context for pre element */ - } - #modal-code-container pre { - /* Full width and height inside its container */ - width: 100%; - height: 100%; - margin: 0; - padding: 1rem; /* Padding inside the code block */ - overflow: auto; - /* Custom background and border to look more like a proper viewer */ - background-color: #1e1e1e; /* Darker background for code */ - border-radius: 0 0 0.5rem 0.5rem; - line-height: 1.4; - } - /* --- End Code Viewer Modal Styles --- */ - - /* Animation for success feedback */ - .btn-success-pulse { - background-color: #10b981 !important; /* Tailwind green-500 */ - box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); /* green-500 with opacity */ - animation: pulse-success 0.5s ease-out; - } - @keyframes pulse-success { - 0% { - box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); - } - 50% { - box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); - } - 100% { - box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); - } - } - /* Ensure code display is readable */ - .code-match-line { - background-color: #f3f4f6; - padding: 0.75rem; - border-radius: 0.5rem; - font-size: 0.75rem; /* text-xs */ - font-family: monospace; - white-space: pre-wrap; - word-break: break-all; - box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05); - } - - /* Active state for search results */ - .search-file-item.active { - background-color: #dbeafe; /* Blue-100 */ - border-color: #60a5fa; /* Blue-400 */ - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), - 0 2px 4px -1px rgba(0, 0, 0, 0.06); - } - </style> - </head> - <body class="bg-gray-100"> - <div class="container mx-auto px-4 py-8 md:py-16"> - <div - class="max-w-4xl mx-auto bg-white rounded-2xl shadow-lg overflow-hidden" - > - <div class="p-4 md:p-8"> - <div class="text-center mb-8"> - <h1 class="text-3xl md:text-4xl font-bold text-gray-800"> - notamitgamer/bsc Repository Contents - </h1> - <p class="text-gray-500 mt-2 text-sm md:text-base"> - A quick navigation guide to the files in the repository. <br /> - <b - >For optimal viewing and experience, please use a desktop - browser.</b - > - </p> - <p class="text-gray-500 mt-2 text-sm md:text-base"> - GitHub Repository URL: - <a - href="https://github.com/notamitgamer/bsc" - class="text-blue-600 hover:underline" - >https://github.com/notamitgamer/bsc</a - > - </p> - </div> - - <!-- SEARCH BAR (Enhanced with Icon and Clear Button) --> - <div class="mb-8 relative"> - <div - class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" - > - <!-- Search Icon --> - <svg - class="w-5 h-5 text-gray-400" - fill="none" - stroke="currentColor" - viewBox="0 0 24 24" - xmlns="http://www.w3.org/2000/svg" - > - <path - stroke-linecap="round" - stroke-linejoin="round" - stroke-width="2" - d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" - ></path> - </svg> - </div> - <input - type="text" - id="search-input" - placeholder="Search files by name or content keywords (Press '/' to focus)" - class="w-full p-3 pl-10 pr-10 border-2 border-gray-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500 transition duration-150" - oninput="handleSearch()" - autocomplete="off" - /> - <!-- Clear Button --> - <button - id="clear-search-btn" - onclick="clearSearch()" - class="absolute inset-y-0 right-0 pr-3 flex items-center focus:outline-none hidden" - title="Clear Search" - > - <svg - class="w-5 h-5 text-gray-400 hover:text-gray-600 transition-colors" - fill="none" - stroke="currentColor" - viewBox="0 0 24 24" - xmlns="http://www.w3.org/2000/svg" - > - <path - stroke-linecap="round" - stroke-linejoin="round" - stroke-width="2" - d="M6 18L18 6M6 6l12 12" - ></path> - </svg> - </button> - </div> - <!-- END SEARCH BAR --> - - <!-- SEARCH RESULTS SECTION (Mobile responsive layout) --> - <div id="search-results-container" class="hidden mb-8"> - <h2 class="text-lg font-semibold text-gray-700 border-b pb-2 mb-4"> - Search Results (<span id="result-count">0</span> files) - </h2> - <div - class="flex flex-col md:flex-row space-y-4 md:space-y-0 md:space-x-4" - > - <!-- 1. File List (Wider on mobile, 1/3 on desktop) --> - <div - id="result-file-list" - class="w-full md:w-1/3 space-y-2 border rounded-xl p-4 bg-gray-50 max-h-[50vh] md:max-h-[60vh] overflow-y-auto" - > - <p id="search-placeholder" class="text-sm text-gray-500"> - Start typing to see file matches... - </p> - </div> - <!-- 2. Code Match Display (Wider on mobile, 2/3 on desktop) --> - <div - id="result-code-matches" - class="w-full md:w-2/3 border rounded-xl p-4 bg-white shadow-inner max-h-[50vh] md:max-h-[60vh] overflow-y-auto relative" - > - <p id="code-match-placeholder" class="text-sm text-gray-500"> - Select a file from the left to view matching code lines, or - refine your search. - </p> - </div> - </div> - </div> - <!-- END SEARCH RESULTS SECTION --> - - <!-- INITIAL FILE LIST (Hidden when searching) --> - <div id="initial-file-list"> - <div class="space-y-4"> - <h2 class="text-lg font-semibold text-gray-700 border-b pb-2"> - Files and Folders - </h2> - <ul class="space-y-3"> - - <li class="border rounded-lg overflow-hidden"> - <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('assignment')"> - <div class="flex items-center justify-between"> - <div class="flex items-center"> - <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> - <span class="font-medium text-gray-800">assignment</span> - <span class="ml-2 text-sm text-gray-500">(6 files)</span> - </div> - <div class="flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/tree/main/assignment" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <div class="chevron" id="chevron-assignment"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> - </div> - </div> - </div> - <div class="folder-content hidden bg-white" id="folder-assignment"> - <ul class="divide-y divide-gray-200"> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">Assignment.docx</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/assignment/Assignment.docx" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-assignment-Assignment_docx', 'Assignment.docx')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-assignment-Assignment_docx" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/assignment/Assignment.docx"> - <pre><code class="language-plaintext">PK-i$VܜBUV4f#ĵp}Ʒ;bD-- ^[x-f?3-޲]Tꓸ2j),l0/%b -zʼn, /|f\Z?6!Y_o]A-fi%l6B:ΊCE*/%WA9j_A5q~ -Dcc~-n5&quot;ș%O4+˘/`o&amp;H/&quot;O&lt;1]nG ̦_ߜILTö[F&quot;uυe{g s8Yt-*뢸%ӥ`Wk%S4,JV#(Èc}) N)2&#x27;W}NϘ֯A:oiz&lt;{ܴk|[1|aʿږbR9yGzR[LЄTu M&lt;-iqEG`?m0Uri_i)]}u)Y&lt;?ˌ&lt;g%l[dKZܧ;&quot;(AEP( -}3-~k @^kB&quot;C\u=/]YMt&gt;taa-83)cǧU= 2pgR}p;bnwoYY{~ 4V?2^u۵U&lt;d:תU&lt;tVv9H-hK+wVa}QO=|.T!)z0Z5tCl;.tUA0Mx. -CӑTCkAVwȹ`?:FW0K;,1{3s;^2-ֺ)&lt;KnfPsna^f{WkC俤kc @3ߔf9ȾV&#x27;(k;w7L:R9}Ƣ-r!oī)_O-@ -JU {XL&amp;1@v7a-W=dh*}[3 6Z6l=o2?A*AEa/p$&gt; -z#տ@}߷}w &lt;V!;P}c5#:PH}A0z*;iJ8?6 &gt;vVQ T~@ -JD &gt;DTI /5&lt;@U^ix}&quot; -`n|a/kv|a57 ׋Ƅ؜Ih3 g+YT,&#x27;zgc$[ynJ; kab LL0q섥7`U*P:YVR]H@Ea}nd@YsA\]w&lt;dyr/{&gt;kó1Hvrv +Sq}GܱcCA uLli:g:{mVMDz=o鲿,?٢ic8*_ȹĮϭa@MQo#m&amp;RնmKvYĤokӻ#:yپF`o?=f&gt;&#x27;&amp;nέ=UV^= -|YK[sL3|1RT R޺Q iv9YEpf|&quot;+4*&quot;eRo5DD2J^dxqPEW7L4Kҩ8 ?Sܲd5[V wW\d\LY1t&quot;c&quot;3+|m5YUQj_d( yՃ813yG\ހkE -n6+iu꺡 -D4@/4~#2tC&#x27;K -+~΄*CZ*fU/YaKkֲ&quot;[@FYMiY\dyN]5q&quot;&#x27;쉸hDJ&lt;R1(ň/c*Z򻡷khPYxQb,4HBQOo~,B`/p &amp;M&amp;%7i9 F&#x27;q.hYNSV6ˊ$c17c 6wg΂)*ʜq |]W@Ae=-u&gt;qT{&#x27;Iz:@rk33,&lt;G-s٢BEVf4̒q6E!m`#f uE5ełp3{&amp;AuU -}]02+5c%k&quot;a}7~Yx5A4b_m_q*ڝѴ uFR[㺦nHlMן3ޔ_=?\+yXM9亷&lt;06An -u?V]o#t]UQ7]?HlqtVu?5l&quot;~x!NO)6rIúht S+3z&#x27;Al8EQښ#K#WxqB҉e}8UpwpApk| -zý括yd\r59Mnߕ8:߱&lt;o(fMkflѝ=ytJ :`c4,*ʒ9p w8ۖ_.dML3Na؝){ -SC)|V^t³zdika1ۛ? --ůf˴-$*UURHF`IN?hapaM&gt;jp0M&#x27; -t}N -GT3!pbD}Cˁ]ºBܫclϬ5W5Jph&amp;L=2f8s4&lt;ydpSi:^$%7]m9w_x;99nm ;I3 P&#x27;إ=u=2]R^Q^drcn8E*oK~+|P&gt;-, -5ו&gt;t6z:,[G;wgxdZ -45Rx\xQL)kg#͗ͥ\on y Wsg&lt;JN2&#x27;cz9:q4˰n|)= Q|ȣ&amp;DD_`bA4pNIB|˅rRbq;95cɓ$B1Cw,·&lt;&quot;C&lt;(x&lt;&gt;nUCz]!nke);g:ϽDuix4쬟!HQbE -Rr3 #&#x27;+;;Tхt U^_T_}o{\B&#x27; eHPEhڞ&#x27;eGʎX߸gaz+&amp;cK%9\˜_3[D -WNI fT]H,Kr$eSZE0vAϢ7 w0 ҫU-+rxZ ӌg?}cb`Eʐ^G5W _nNEmy֑Y-|1}(}&quot;Yr,x&gt;F -[z -gINn3hг7Ɠ[-یQ7na6ݲʗդ(a`3 ]6M;_yF4 -aFަEpf|&quot;+4*&quot;eRoF1{&lt;y,$EVw UtE| HT(Y(^3Gpdk~Ov2 8~wE8EuΤnз|AZ^@QmK|ڜAd.E|k+$ʨUs&quot;KFIP̣&lt;=&gt;OX\#E/jpwYIs* -ZHMO]&#x27; Y -Me D,k0 -+~τ*õZ&quot;%cn5kE- {gˬZ|[ .&lt;KrͰ|aCPDm w&gt;~6J12UJH򻡷khPYxQtCB7 aV&quot; -Kjs1 -&amp;69on$8-*%󓓠&lt;rYV$AQ$cq0i,R?7~u -TX@54fԣWgHm\;8(9&lt; - M.L3;+ݛjR5A - B&#x27; -u2~CO&#x27;Aοymf% v&quot;[dHlVY2f(-!lBZEڿ ֲb!Z=Ϊ@T&gt;.| ˚ѱ5j% 7jkEYJ#(k hp[ھ³T;iAEvցuMM~dDٚ0?sEf){w~̹W#Vsȕo=ynalܶ pf Su7&#x27;U\|y&quot;(yZT -S1;biHˤGn|!G|:%*=}d&quot;]&#x27;I0tM3 K%1[`ۧXbDvˡ^wCoK풘`$]A$]=%C$\tIK&amp;:cW=l -Fߘغ7FH -LKݛܵ7EǪr3d6d=Q{/&amp;2 8/WչEplvPY uLB&lt;n@ 29jj3?j?¶ܓQ;j)OcwjC@-:O$QKtLt?xiŸs՗8} aM@*n|,2A^2 D 7F!L̊5_3WbN,76m~][GĪ5_D~S2p,i:2].&amp;Di8|AXKӊgO&lt;-􉅡hZX6}^1õǭ(I39DⴿGJ]YMt(h{&#x27;Ly:-G -.QiJ:lY?^&gt;vN#Tx^4Xڹ[ i=怯cy0[[Ǟj9Q*2׭S4d{&gt;Bg7`8z)䙞TCkAVwy`?:F^ZLW=EsVZ -`t8 RiX^$!=BǺ -1.`4};O.]۰zԀ\v驊&gt;J&#x27;`]. s縯;)_MuފS *Cu~-gw&#x27; -łX=w(c[rࢰ8fL A`={7 -CQjZhh wvð -wBa0z:;iJH? &gt;vHq\64l~RS/am/sc{Qn O 9Kw̓ %0N|GQuhu!Um˷_Cѳ8č(;\3OR8Aq)cX-v [x.4qN&gt;tKݲʗd![3M:w^!؞hԩJCi\Y2DiLș)R*fZ3 -pb$4tSsx 4;#.]tN|¤0 -¯i41X4ۀ՘*^J1N @8‹D1H1M1ß.P$W÷WAB`/pbZΛ,\reLIp6ZTU&gt;pA&lt;rYV$Ad1ژߐ&gt;9 -y͚qQd42)-F,:R\.=A=Q-iKFfj -j&amp;k$^-DEӸk`MѴZ &lt;06An -uWalt&#x27;* -[僇v6KN&lt;1خv˅f)xsHntY~qN5Pgh7)M -y&lt;?R -&gt;x1 h:^0 h4,*VVY29^*:ߚlf1V`g)-&quot;+37Ed ?%ֈM{{X? -$-r9~hac0l_) -4Ga0TCt$/c)T -r =nϤcyvfQR;oj!)&lt;NP=1%h坽8[,xFxJ,Reg#.bȂг??r&lt;Gt9C?tӥHu1+EgxΗQIE*5jF}QзK - 54J%gwk9JgtvRM!M4]m8:qI:Ӆ`g6mJew8&amp;A3 5(,5jFMiC4K#GF?bPz݈UW##G --?A -) 2Aヂz`ҫ26]4]t=TJx\uϵMtIE)M4]mJ?tav钦4]lKlqkcXTR;Kc - )&lt;r}X6=OSI&amp;9Q.f %]MU\fTK&quot;;./VW@&amp;?&amp;Oo!~[x FlS(t -B-y4#)mгy&#x27;#eFz^qeA3zM{tLxD4GE&lt;*IʌqIe8mRlo᪺AA)3[k6&lt;_7m)@h\0+eSXWAÑ5A - -r59ptfCd=!y?+C4($w):ej!&quot;Kn&lt;G!.Lkzܺ.{# Z-tr[X&gt;] - ~i&gt;!!շF&lt;󨔻p(&quot;CHFC4}L.84K,֤&#x27;{Ejw(,,B1dOx4=aړŤ&quot;z8.%7R&gt;Ϙ4Ҝ@X#fY#feӛ2 8ݼmNZϒ ]-%^lAw~lӯ[%3\ 7y&amp;ϊO nX=-kK -YQY}VXU -c.&quot; -l&lt;Q&quot;+Ż*hH ^EN,/YrAbk~O93#qvq YBaelSm/Ө&gt;id.E|k۷&lt;+*V,9YLҺ:{lV2?5 -:-ώS,-Kq5՗Z 656uEekҼ5i5y0&amp;^hZ-j˿&lt;06An -uVnڕo{Ji=A--3ye\&#x27;@,1cAd!is -_)&lt;U;i3h JIF3uuQꅲK@3L1&#x27;lJ ($Y.$m$41aEǼ.8uJtquӘ_B\-R[NI\xHQ_&gt;:0J%L:?Wԉ=SYfU]Zmg8 Un^Gļq${KY91;V}$C3voW1;2 .Y6Prec8&gt;:4{\ocCUnC\V9hcMFZc/8 )D&gt;X znr蛌9|Tśm]98ܾ--ۖ(w^hw] X84Tˆ|a p&lt;ԅ]C5|u[6IYܻ&quot;$Vt?L ?%$&quot;̟}*&gt;B`~-̼o! #&gt;&quot;&quot;X8gcX gX~-- --IHDR-&quot;K[DʇdB)͛jiKzV^tO^QRCkfȌEy0Gf3 Zg}&gt;3g&gt;gK.kjj m ܹrTTT -fflrt?8Mg;۴&#x27;V g\J?9T*X*9gORn6ơXJJWWWcǎҥ :t-Z -? &#x27;қ7o^Gaa!nܸ;wm=2t=z ٳ&#x27;w[&quot;pႹ׮]ӧ[n=u놐&lt;-1DDDԀBTTT05ō7~MUUU{XODDD -{.f^zXߠ޽{#((ݺuCn?СCvBDŋC矛:j5^yL&gt;nnnpuuEv0Gq}b۶mHIIC!h&quot;޺--&amp;Ob6Y:*lCrrU2 )&gt;Ѕ -4\[L3Ҷbƌ[cǎ?bʔ)سg - ?0`-e2Luaʔ)b1Lu։DxNT&lt;glN&quot;iV+u - -0ydh4h434Cqq1rssFN^-g]Q}}زe 4 - - -L&lt;qLeЇ&gt;#&lt;&lt;%ѐ|VVSxb[`&quot;&quot;&quot;)S XK,5Tג$*idv%jUUUVICfsjooo (,,Daa!.]$&#x27;iӦ!!!Xn&lt;&lt;&lt;oooTVVbϞ=ׯ$&quot;##ѵkW&quot;11W\CPRR&quot;37]u - -/ -D݊+p-V|7ذa &lt;m۶!..-+qMDEETJQQQyN 8p΅QvdddOkq .D%R2]pXfIM555\@R94+-))ԩS1`-̙aСV1-???7N.w`~ --(f jvqqJҌTo;qu:uJKKKѣb -ׯ_^GϞ=1cիVwjgm:/[!b}?w%ņ ;;oÅgf͚5򗇆0sLDFF7ĴiP\\,I_PP4СC6/,ijjUb1#T)j1foR2&gt;}:兤$e؝;w˖cǎѣq1 6 %%%2={oFҥKѧO1aׯOB/ĝ;wİ:ƌ&gt;} iii@bb&quot;Ǝ ///DFF68Ȑcׇ5kʕ+Xby;w֭[h0aO.ڬ:IT燄Ր.#_j޸qX.&gt;Μ9#$-*Jg ,, ذaXEdz -ڵ[T׮]{&quot;js:-MZ&amp;Er1i$1J#Urzik -I-oZDkCӉUCeoo:)ÇXvJD0YQubQ3:_DJl[XvV&#x27;`($Nw/;~R %&quot;rϑF,3a[vi-- - mg&quot;눾N}C:GhX8|д١O_xzvOˏM(++QAVqDD2~byh4޽{0r]Mx1i=q) 󨨨NJhQAP-œO /&lt;? G7E8y*GC7ww,7Ŷ;ip6ѭ;ތN:aDDMv)fXޠ]S6[ߘ7gE%=*W-Z&quot;= hHMށٳ;ӧ Dzo/A\&lt;Xk0(=;4?B&#x27;-7\35ii7+fO_ZO:% - -h4Y-nظ-+VaDD{F nnnbQÇݕl=):LIx}EMbkܒrgw&quot;F -ٳyu5FRAR2gЧOo-_GɸRJe0 \.]@ӢȈ -?gLm۾@*_Ӥ|LHI݋wpOM(%u/-HUk׮5ĈDDD-H7-r.àI#%&quot;&quot;09KDD ^lDDD-0 -&amp;S&amp;R&quot;&quot;4HyC&quot;&quot;&quot;19LDDD`&quot;%&quot;&quot;r-{BKʌ &#x27; -b]d?Ӭ˖Jƥ8уD --KѦu-+Va -:w `XzeoLRצ~~y+&gt;ڼ$йs&#x27;sbUٴa-2l/6UAU&amp;%bi&amp;WV^.+ 9bY| jLD5K&quot;mbĢf/GQJ -0m1sgwo?~ -&gt;3Žg$쁷w/ ؿYvbT8iaX2 -wW.5*0MbUއMakqуb\tLO-={z}h4.-_};vER3|/ -D-OX(Wi\FXCΝpA./++ǫ&quot;&quot;~Z,ul`dwݿXN4w@|gZ||&quot;f,lJ|mž:]c(x}iu$JƮD-kw*JPH Ւac3J:&quot;.vظgNΝ;S۴,)zoXlc&lt;^ADDm_3R&quot;&quot;&quot;jJ%vgljaVTN9ѣivPTT$Qhvqqh뉈&amp; j`0D!&quot;&quot;&quot;JJJp)oF;l@ -Z_{b&lt;{⧟~BRUUUFyy9~CբGxvwō7`4qItnnnpuu+T;v0WUUAJ/ -555&amp;UVfY,IiuvU;esPOqh+mmF,Gm*6Xq#ViZ(mSiQOjZ\]]Ѯ];oڵ+\\\+dGH-- --IHDR-޽;ܠV%_~TUU+WĉHMMEII&quot;&quot;^.]z -=BII N8۷3ա۷olj&#x27;PRR*޽?b&lt;Y|ܽ{7oBs$JDDPII ~gܼy겲21DDDTKW^뉈W^H|֭[o!ѦWٳ&#x27;OC.]FII 믿b޽&quot;z@-X-b,88iiibqUWWC-ѵkWٳ&#x27;)JÇرcOZ]ƎÇ5UVaVipp0/^UVUvQWWWev-U8;;=T*)Z=攚ZTJqqq3-7Uԩk%bZ5V```(Fĕ+WVzøRnCKsuK/U-^GTTEYBBt:4 -&amp;Mb&amp;\:&quot;ABBE2y.ЩBꈚts{51c`عs&#x27; - - -5k &#x27;&#x27; ?\~bT7dDWɓbL&lt;WZxzT&quot;=ʃR7//&amp;MFFAhh&lt;&quot;KIIA~hЯ_?#&#x27;&#x27;h4t-O?k׮Ν;jƍhԴgҤI&gt;A&gt;&gt;&gt; &amp;$bj.\(jy!,,&quot;N&lt;aaa7oE,=x&lt;&lt;&lt;&quot;Y}uILJ&amp; /vSըH:j2j%W[xzz^@AA - - -p9yL6 -(//իxxzz;wD~M&quot;&lt;&lt;;wFAAp%17n@aa!FUzΝHȗ-FkT\\,MZܗT&lt;hUb -qU]v -r2hDD]&amp;$==wua޽jnDJŋP[,wɄj6PTvJoܸSbtnܸ-qqqHLLDTTl777s߃hiKFkf~N4&amp;&amp;9SLL7|EQo51cXMT~djjyi&gt;&quot;n4!!K,Add$~ׯ#((z111عs&#x27;\]]+WZl-ejׯ#..&quot;%g[&lt;3T6-җ-nܸ!OÚ۹s&#x27;~&#x27;h4,^zC&#x27;}F~7oa5 -zRRR8=wd.Ǩ -+WĥKl2s΅mۆM6A`ܸqp})&lt;&lt;V 66V,n1 刨֭[g2BTQQ&#x27;OVIӷJnRh% - -&#x27;֮]+V&#x27;Xܬ:w,OQ=G*%D%O72.osIQ3ݙ&#x27;aDDD&lt;^ZZB$ 0@oFDDTK&lt;Eaa!qY7N !r8~5&quot;R1Q)Q#qDJDDd&#x27;bd2{b1@z\eK[_Gj2&gt;w4hy,G=hݜ&lt;\WWWDGGDdECLD(ǘ&gt;GB777 4/ƣ&gt;jQGD3,D_L %uDDDԀuAa)PRvoo=,{~}B,#&quot;&quot;&quot;S&lt;+|D b)PYY u۶mr&quot;&quot;&quot;RM6%&quot;&quot;)Q#L&amp;j҆DFGbqVV҇eMbx2~&amp;?Qj-=T/b˗_a&gt;Q&quot;j-^^ŰzI(zUj-=T={[M͉tZK01Io!~EXEDtߙL&amp;V^mjSr[EFGii)B[6_&amp;i߰ w$̷ _&#x27;|-Gf/&gt;2tZT*E9&quot;C =p-πZg!;$:thC F߾}{SCE~r,efСѣؼet:E?OPL&amp;^w$Y,+5wfϊKa@]-S0Vнܺ`w$…K8s l8,2ꑜӹg`4AR̙s&gt;٢(ٯڬ2}$Ξ.\DB?iQXhĝ;epu}gLm޲ -@u(iqy / -c ߯4bĤ]8$ -wdy;ax;腽KofP8u*-aS0|,BB&#x27;PTt -pp?Q^/$t,\)ˀa-B/N@H/CB&#x27;X~v}(#-&lt;={ ?[mi3jm%KI?=MK?pχ75w*|V `Ĉ@ktg&gt; N -دg֮IiS(--Ю];E 7_n QoB/Ϟ8r$+?3}#!q&#x27;&lt;={`WzGJlߑ;pCa{K,4t_NW&gt;7X$Vb=Fώ/Y%RgFe&quot;EE׬nz -:)gJC8r4%HJڅ” -|}2nܼN:&quot;Xpu}ׯx5~8GrJܿ* -gΜu:-~tرܵv?[oM&amp;2j&gt;N DD}GDDDT)*J,#&quot;&quot;&quot;lG -DD QT*MDD(--7&quot;uqqAaaXODDD(,,F FQ&#x27;&quot;&quot;zAVCݦM ܸqC!&quot;&quot;&quot;+nܸLiވT`~3$&quot;&quot;&quot;ѦM8;;CVѮ];c׮]~ODDD-ڶm J՗_~iDUUܹ?~~~j֭:u$nq-\zFǎC۶mѮ];8;;[*++!%ӊ -矨@ee%Ed - -J`C_6Tgֲ֠5&lt;)ڨtJltJ`C84Nv -nSiQ6j8;;mڴ ggg\-- --IHDR-cTQJ)V,kxA QJ(u#}:*J -XEh -pBbEy&gt;k9&#x27;dsr--&lt;xK.al8ÔeC [˗/cl@AA^nݺ%x={lkcL]Yr)x1[駟p)AY&gt;}uu-h}/Kg[}*//g2eYD&quot;a/&gt;EޏclFC1~ -* -111̙3--jjjB!q͖ -B!D&lt;JՒH&#x27;.B޽ǏC2j(mmm-[oK/_4vBwnqE:tC!ϗ HR)}]DEEG֭0BÇh4غu+vɆBCχ\._wyz5B$+++X[[8|ǎBm&lt;y2F{ Axx8[EyI&lt;-$*B]RoEBPń(gq)ٞżnss3bBH3iȑ?~&lt;^y1rHvnڵHHH0LCBBkײUf677ef~[*f֭]&quot;5DB&lt;&quot;);;VK\]jCF֭- - -һNAAAl&quot;-//g7= -ظq#y)((@ll,##d2e -#B$S..X-fj)v߈N&gt;lqs1|ӧOcԩصkQ\\߂ -___9r7nĚ5k:dgL - -(2֭[SŘ:u*֭[)Dk4x`H&lt;x{ۛ{nee%LYVV -LAOFXXd2\]]QPP- &#x27;&#x27;&gt;&gt;&gt; #&quot;##q-Z˭ l[v8Y/8qbK!!!^ŋYͶ`DDDԩS b͍-{$yR&gt;?-J#DPV\M!oո|2v-]Guu5VZ -6wAMM -ƌ -ޞAhh(kxrr2--6޽{z-MMM%gSP6- 1a9[p{A[6*e@7 -{ -H%x)C#;Kɒr^rq .++ Gѿ\~۷/0fTUU =6eZʤIJ nBl ظؐӨk#7|~zcɒ%qwSLAVV׿PWW/ןccc -???na -%YYYx:tE\2U*򮮱l1!])P-?fCj%Ө(888 -ɂaد:;v,Fcǎaذads? k׮]8p-!bEZJJJBMM -pywbit{&quot;&#x27;ӑ!T{%-#BZ` !&quot;OhZۗ-&amp;{\egB?}!roj;K!s+[?qqql5!K,%SBS?\FEBBz-#NR!99&#x27;OY~G{B&amp;&amp;&amp;%e!Ҏߖ}D !ҕ&lt;GB!] %RB! H !3H_ΖB!D7n@ĖB!D&#x27;&#x27;&#x27;%BAB V iUU[N! uwwg !&quot;B~hhW؅1r&lt;[{^׋B~OҦ&amp; CдisnT^~6mNåKlSCڦV -##4l&quot;R&gt;-7^Ӣf /@z/ F|| -\]]RץgʠPxb|Ƞ-GF2l|3-*Z0pAؘy^u=nCS?M]/1g(sqI| 񖠮cF#`^刉!H^f˞=zEzcezAo{hآ1{~ՖXJ8;;!Ou={ڡ -@$Lx 55-P[-ݧɟÅ -Cbr7V&amp;k;&amp;nWҊ5-|[;G EqŎt%*+ExxzC!c=RIr&lt;` ! --k׮5GJ!#54K!qGJ!A -e!&quot;H !_!BوB1H !3H2B!#HmllrB!`ccCCBHG]Bܟ!BiR)H !sP&quot;%B@B1%RB! @B! #%B@B z !b&amp; eBIz5[F!{eBa.tB1X%-/-{#0zT- -D)&amp;TA0 2[eQGr&quot;/P(&lt;4&lt;θ},!2щtR[53#--HW-&#x27; -l^s -aC^{88sIv㧽sٔ @s=&gt;v*wۇ[ 1ԄN(U=7&amp;` abF!&lt;&lt;ju-&gt;IOxor -O-&#x27;0d`TjŵYRc/@xx(T*xUk1&#x27;f4 hp@ľ}Ĵ}i\/ϨԵ8t`0vvݗ%Xl_3rںM@xx(~&gt;^_v&amp;T͢ϝY3Q*6scg&quot;&gt;n.&quot;4B6̠1kf4&lt;-7Nn -2CkPxi}%.-OlL]Y!aY7sc8-6U[Ǐ鮗gZJߎ9646 -bad;b&#x27;HFG=$}NHAwC&amp; &quot;BMM5Tw~c,%t8| Ιr0-j*Zqڰ),/wd^&gt;:ڃ=t(v+#]  -f/,}:3SCrG0+W,ӛk{jTo&#x27;Z]kWҿ--{?H$Xp_/r7K~BNehjz=?doW(;{9z`S\|?o!`붯ac#T*EfV}% Νpt-;wEE%8# DmgNn$LիL:IRXX(G{4;ҕ}eYG&gt;&#x27;gO&amp;lmmxQcc,z?[pvvEqpvvž=j_M??7qwێŋ`ggJTVP#&amp;F n;HW -0HWLF -%8s;g&amp;jjTXlu;^?wct)(=s8}!`:b#=bE{&#x27;.ϯJVa{.ǥGm7WW,^w\mдb3={٥cYuH&gt;S&#x27;&amp;&amp;v!JK&gt;!Ȣʼn8VxKBLS||RkQz r;[E)!]NnlڜMqjLjyBGAHW&#x27;H$l!9V[[_?,=s -/O\ !D&lt;D?y$BH׷H5wouB1BѴ=ҍPu2?&amp;Bd2H5_GRB!FjHRHLl !B sN8H i;SJBHW t -RT6W}l&lt;!B-VVVl߾]{XTv^ZT\܈;=Wl.`Y[ 65B}.7~j(W^9^GZ-T+pƷ QvW&quot;|x{tcȿu k|4 -gsz u&amp;%EױlRX!~LVE:C8Z -ְ5u+++t -0v0-- --IHDR-zKsΙ9IsΜ$yyyp˯Ǐ^^GS԰I&amp;5}Lim6`6)+Fsoz!Hؤ6i)+Vso3)(+H H`aa.]ݻwGΝ!H J!J!iqq14 -ӡhhvۄBK[nP(P(6l -lll~ G?{ ŸuT*JJJB!/=kkkxzz_ -:t-=bB!ĄG~Ǐ!2BǃPQQ&lt;&gt;|&#x27;BH=&gt;|&lt;VWW-.B&lt;yjH}tt4_&gt;} :?֖-BKѣG&gt;nݺSN޽{lB jҥ߿_駟y&amp;IR{5kt tؑ-FK -UUU(--޽{!,YGg}]t JH;r .Ě5k葆jjj!??aԩS1m4XXXYׯ4 -nݺfB^ ! - cӍyL&gt;ԗbL*?\.gL{l!z=l&quot;Kl!$$KT 8p La)!n޼MP*l2!DS %֭[qz[d&lt;___$&#x27;&#x27;ɍVSSEtٓM&amp;ЧO -]o\ƏooovVi&amp;DDD Mج&amp;11{K,tm$ RnZSRR֭[gL nݺfkg&amp;5A-is-K$&lt;{L^dzgZGz6dT*UAQQbcc6cliRSS-Kjj*i&quot;`ڒAy{hnkr -ܰ{n6Du@`ZTTA!et}]H;Ҭ=R&lt;sT\\\clVR*HBL&amp;QTTė&gt;|8d2d2&quot;##! -)D-Z@vN} -#皺fڜ?3R={66W\3p!&lt;x- -N\ƍݻw#44aOKg{ - -ԡ7nDDD_ߍ7&quot;99􄝝q -..^j -555m.ܿ555H$Mꕖ`̙4hQRR-۷|dpss-&quot;&amp;&amp;- -ƍ{uK)..ƺuPYY/\p6ǛoeǏ -,c„ k&gt;ǵ̙3xzzuUd|ee%[15$&lt;x)b //Ҿ}MJ`HH޽ xxx1zhZ -}RЫW/DEEa̘1s`{6˔)Sg-/_fMo&lt;H&quot;=Vj[GGG!!Mocǎlr !GAڜO&gt;qärMNNԩSbB@&lt;&quot;P빥-Q-!RfD`{FJܸqlWB}iϨBkd;BHC=RB!GJ!4QTףW^l2! *` 5YBxnnna !/ipõAXXM1aeeEdvnnn@=yiZDGGҥK?}Կ| !mG}&lt;Xf!R;v@p!-@B!eBBiu76B!bIҔ|B!Qz=!%BB!M@Bi$^iUUN!!ܹ3N!:uDCb.HlrB~OR5ܵ-^*ܵ٬VCꖛ{3gH ]AY1ʖ -:j=?.NW(!4D*)65hqvWNu8YՇ3rxE`(΂ko8u::b-B^7?&#x27;$t1fΚef^-k9H;2ʯ]|igU󟌍sr{lrΪڃ_t(++Q^rҐǏ_IHLVӧOVgKkkenEEEFp(H[yˤQQQBDVѣ0l;A9x䷳yK 0m?Νte-ƎcP(-9lmm!ddd@z8/XL]Wx&lt; -&#x27;1z - -- -=$r9@t߯!b1laSgsԵ1y &amp;-4T1~:Nhb-&lt;lYJ$vv8t I7Vg!5&lt;|(Ϊ9ס HpM&#x27;s4T1jby/: Y.ƍ[˻PȡhQ^^8}&amp;0w~(\n/Hg?O\L臀oi]~q6ܨFq񇑖v&#x27;-u%ܽ{iwG ɰ#5ߞ;&gt;GkP*B^bL^pĬ6^d㑓s-V/{X4 =qHXf%qt*_VZ&lt;@!;;-ʦB!DVK!u)!B~CBi -BH#zH` !&quot;4Q%F!3tg!&quot;B!4M6&quot;B)!H@B!(B!M@Bi -BHP %B)!Ҁ@d BP)!R^_o0@J!ԣ@!g?tB!$4B!$F!)!tBiwoo6igU7l2!-.$t1Fzg !&amp;H{uŦ}L-% -;wAnm6K79kFzGHbΪ̖ -:j=?.NW(ؖ96DoƗ{FY&amp;mܼ -#2kcᾃ&#x27;W;wH!E#H gn2nLѣ-lMNu8Y&lt;u_(l6O- h2fۏ -Ql6 -”I|ފ%زi=7Danp7Dѱ7Χ_lΜ -Qf9/vŌLi]Z23/YV&quot;|MkŘ9k2?i7Uf9HHgh0:p0-|:ff^νڽ:j=&#x27;2O vFC$$&amp;~:j`ܰ?4c(8l c~`=e iϚ;HI=&#x27;`(/dg`]Fe-Fĉ~ -}F_8;ĴP*-V\-fWvpc&gt;P@MrpXR uJgĠA&#x27;Vc&gt;}0qZ -1?dJKˠVgm (--Sg-hu8u:U -sx{j6, -gα&#x27; -+V?ׄdԶs-ˆCb3!]R&#x27;~r{AgOCEEAuvl‡3cOL !s-/Ysq6иX:]!} -? u-/NWhԷo-lJLۛ05{5:P{-[ O?:rkb;-&lt;lYJ$ˁC}vqGPvvx .\PCy wCj9|d2,ǰHM=oB#5(`Tm$Ouh:&lt;}ju***лkعkRMHH¹s!&amp;M‘ (yݺuEεs}23/Dep4OwrꇽS&#x27;R)H$\~߿-PVV.X!I[~-&gt;޽_kccC~{џn͛8я?ᲳHHLB^^&gt;짦ßEỶ?Ѹwgf&amp;Łl~1ߚ 9-}O9Шpjuk: L-۪.\T떕c-5ߚW -\17ȐR#pᆀbm{}džMGeg*r9&lt;8Gfe -P -4D^{\sMc0-ˌትkV򳙹eePأkW+כ%H&gt;ȘΡ䥶tY$Χ_!w=RBH -}5,BH;D;w]{:j=fz &lt;@H% FiFנ쌵kVD _&gt;LpB֭[!^hl!BQZZ/ܽB!2 C=O!zt:HRH;uZb !BL())AFF:uGGW]:f&amp;B^6IIIx):w Iغ0g `@8~z?By?AJJ -߿nݺJ_]]gϞ+&lt;&lt;&lt; +[nv!Ɠ&#x27;OChZ\x;wF.]`aa&lt;byV}.UUUFMM -LեF~X᧻)&amp;s+=L@Ɠ4=Z\Sl]?(:A:Jabt~6rrܹ*^=O}&quot;c?{x=0ա];p`;Cm,-- --IHDR-bj - - -x|DG,,i%u:JWi&#x27; -LƆ:%[ӒYRףG-4 -~vBwpssO?QFpqqq3gMMMBYY&gt;۷o!Bx}Epp0?gd-3B!D3f3 cq_WF.!B?3y899~0-!O[nƍqa\vBZt)d|&gt;55-38@=`oo!O444;v@FF[;{knnf o߾k!z Rŋcݺu\6!Ofpl5ӧO\BiݻwGpp0&amp;OB~8)?`ԗ&quot;q}](J$)Ć!ݵ^`ٓ-&quot; AAA$H%2;1d6L`)!3izl&quot;a(.飏&gt;ٳgۜ&gt;#v.77lX\6neqf׏ -B$pwwDJ@L8/iĉ dg{6oތ+VLXb6oY} -YTdooO׆L&amp;DJ*6$hq -)D7l؀&lt;ϟ-BCCE1B+ &quot;;.Oq¶m믳ENAAEtB.c̙A.C.#&gt;&gt;^4Bzz(Itɒ%ggyua[e&lt;nùڊiW1gNɓOϥ5k݋* 񨯯_M6`ieL - -(2lقYfa̚5 [laÄt -5Q)Neo&amp;NJ̜9Su -=l &lt;rFMM -JKK -\WWW!r -넆O+((\. -WWW_$m߾B {:|-&quot;::ZԆ$%%aŊB{ÇcԨQpqqAxx8&lt;-/^޽{-pe -ܹFqBwrrʢ&quot;-nݺ%;==]t3 Z\رqqqذa-6^l_~Ywb:hI&amp;L@yy(oѣGEm5jʿ -0___VrLXd$(x7)b\G9&#x27;JdHH^ -gggƍ8sPcb͚58p nܸ 7n\&quot;ZިQ={-(**BiiԩSȂgZfgg &#x27;FXZ?GGG#99&gt;&gt;&gt;GHeeQO+:|d340!O&lt;N.1/eo1ϴz444+FDDnnnHLL -ڵK:?~&lt;Ǝ&#x27;Obȑs0 kh޽8x r9VXUuV &gt;/r9kܽ{fdܸq8p ܄Da?nnnzϟGxx8r9^ulذᨩCqeaС8~8-wy&quot; -qtMM)il6/@Jj~[XttX!S8!SVtբz)i K8G.GQQ!؂Ì&amp;!l6W`LTݼ==4#càRc,|z)iؽ&#x27;J̘cp46&amp;~ Z!؂ʼntH(!6PCoaXEb[f( -+c/lKތ&quot;:~9&amp;OV^)!ĦlBX̎}[Tt啒ؽ&#x27;-s-_Eg oh=Rl%y AȤ -Ķ; *rwVTfiͱvZp]t_eEE%xۧP`Z!6a#3bWp/yhXBѳףG6do/֯[e4 -[jR#ofVmm-jSǹ])**PC&gt;r cC~ -Gm=|_(K!d2d26,-NWm4^-ƍvZ]: P&#x27;Y|ju1Ν;/Y9׿JQuSgˠVп\\@!de˨-Q=o ?aM}4Tjn,=&gt;׮]oF 6!A8:|F硺eePk8_\wDl!^o&lt;{)p#ᶱ7ޓ -Z~X4 -E?ߟ%,?z֯[a8|P~W@hk&#x27;)̵G -smo/N7f-gj̗B!Bȓ)!bJBH;.!b%وBH !+PBH !+P&quot;%Bډ%BDB%RB! -H !+p(;!&quot;NlB!z6F!m%Q- `a\|=F_FTY#|qr%VZgk YٹHn93a:F{#Y`]o8U^F F+|6)e] r:+d&quot;#s_?q괚 -[D¨NBm=:|TTE;+Wh;&lt;Àcz.Eq1[ j&amp;&quot;1c-׵:~9Rm--% ˗ ?-Ϲ0ju19ÿ/vC!2H;Bmm-B=P`P(!91c/f-EK2i)@; - `Sa0r{P`ǐV{R=SukWFbUFSGܕluW&amp;di֘:5M[B4-^32Mt-KbCrG5y&#x27;-{϶Pô)X;1yrEw/@e,+ mMlh -D=j-Rc3o ?aᇒc܇v:Ə b yJ;{2q1-o{2QVV jum9uZ-KACyhXjc&#x27;B_]]-Vs9&amp;^KfN{^`n]h[~#}q}~hY8X1,J,[EBscꪀc/($w}wXM -B?PzB!(B!Vd2#B2C߄B~O8Lf !&#x27;Emm4 -[N!6h4rpvvvjl9!BڠqnݺAVΝ;lB!p9sݺu{#8zToB!Ĵ&lt;t -8C=p -۷ofB!۷ׯ_G! /􍍍hjjCBT駟F޽B!O_~7oބVӧѽ{wlΝFɴ&gt;DCC,L,SHِIR J eGN,UttD.Sj=KH]zzzgH]6er&#x27;Lppp@n-- --IHDR-H ؈*-1[REϞ=*BH+,--#(IҗTB.AtĈl1!DÇ JK֛\Vё-&amp;0j(JKqV}3 -___lݞ^lԆ&amp;ߟ-&amp;`ooOtIޘ4i^}UˤI&gt;[v-&amp;S___DGGcڵlQ oK,tn&lt;D&quot;%Revꞥ,$$$4K\MHH0_;t!- - -[Z-gggxxx8|0-{-D-{쁕&quot;&quot;&quot;&lt;(GBBKΆx7l-nnnsΜ9effbܸqXr% ;w@.cqMyxx -w4#6uʔ)S@@;!Kl\/QXXq-?`l^D&quot;~Ī=Z  sW_EngҒ&#x27;lڛs QݍqӤLfggcԩl!CПQ3sKgH-!Қ6 ..eee˗ґGHg?F=B:B!V!޲e [N!}[SzozN]egB?}!tZ=GVw&quot; L33BH7rõŋjB-[^zQ2%9%ꫯ...F߾}u!S*HLLٳgtQ㏟&amp;R}B!۰aioH!H:Bȋ)!bJB)!NjzB!444@ܣGB!уΑB!EB1X,\J!H$wy~B_I_]}M)lxrظ)W^gҲWc1#t6&lt;&#x27;!&lt;&quot; -JU⾀dxzOd$}*U9J!F3xD:mjPa֪Kص;UDgkiّǰe e-&#x27;H kx`ǴH\V-&#x27;HZxD$-g&gt;6/,D[}ŰSeyr~0_fSۚ:yf!&quot;7OOǰaCacӟ-1%]8;Sfk+R)#S08nܔ%%7s&lt;oaX/c7-D}/&gt;[R0Df@(*~{mNKm&gt;4RUQ] -ECu#9zL&#x27;L@TYW!eȱ(+STJþ`LgB1%ZfZkw΢&#x27; a0]qcPRr-1a&amp;-pE={&quot;#3 ^Ο/BQ-E -Ξ˿ڵHM/lm(+SVV}\8 W7uN8 F=kʕ GӠm헡&quot;-}/V%ocxMi{ &#x27;-kM,]66_Q8qQ#@ -EE-[`[$ՌҸJtbD-Bcakk޽{Fھb&lt;T6=m[u#[ }B4Җ^ -KPO[N!-sn@!&lt;)˖B!V[M ʇl!B4ZKj&#x27;H !!#}2B!$؝)!^+O&quot;B!%%g&quot;7OmۿgI&#x27;&#x27;njOIX4 -yGD{[L GKl~ܛFɱqS -^V vul=!Ɇ@*gq_?`2&lt;&#x27;?`2\ -luزurlUc~6}%Kc -5Y65..oaF3E?s%mxzO5BH$]o165z-bC2ŗkw:Jc;rl݁lI3Bg M -Lf3}Oy0b+lUc~657n.cUF%8x-RƏi;:-w:ezqS -N:|Tj:q-{›n.7wll^h&gt;G9୷|9ƃ -mUK!G(*-h;n 3i?kNJeW/]ƽNǍ© --=TMʍRPVDY}SȶTt?ګWOڝ&amp;ghNpIrGP( -vc:qf꼗c?m B:;s&gt;Y0Æ -N=-6?K--?RRrEEJmڏF`ذu~,?s!7Oﻩ3%]lݶi{*F9DN0 --Fхb -?=-&gt;nB8i?ugJm+jԴ)^C57܄ل VͤEn/(.Duw(p8;w:3BQ .e\L7JS!GcpX[BQqov:R [[)ʔk9-E&quot;nv@EE%u?ůFݻ/]BQ-?YM)8 /YH$Q UHȱDE~&#x27;OAEE%&quot;aTys]]=ЧOo_u_}+c}ŲCYGknҥ+P( -p&lt;MɑHKǛ}{ߗjs[-sPVDxlٺoamcj -c&lt;*~92GO#w!w nk[Ќ ?h7:51ї&quot;Ռ(vJtbD-^Ǵ? [[ 6f 5k֨?ô;@B!ߑB!/JB&quot;-#B-3DWYgWnmNqNq0 Vh &#x27;vB)hab_ѭ[7tݺu9`nnY3-- --IHDR-*!&amp;̀6`2?ssf |^u.̙y&gt;9~e_&lt;3s&amp;Rht[So_1L]0^- -V⓿ѯ(φ#*~rϝtGHU&#x27;=E,N/[ӒX!l؆H$so-GGs;u8PF;GXBgy?8QUUիoo&gt;s!3k,!_8B!PPP:߸q sB!nj޸q7oC!3qMϝ;:E&#x27;B1ΝX&amp;_O!3ZZZ mٲ_o+??8!׸z*GO?!&lt;/_G}{u&amp;bˈƀ`gg;; -ZYYYB@:%]p_gRZZ^z% 8}5{,Bz&gt;}o߾r9=jc!~&#x27;&amp;EEEWB AAA WB0O&gt;$BncattM@b:U&amp; ҠAw!kt:mmmrN &lt;C*B -B@@$I\Άju:ńF%(BzNvu:&lt;&lt;&lt;ńƌCH|Μ9cvO - /f_lv|2d&quot;+%R#M&lt;3fO?mr1c&amp;O}yfYd2 - -š5kyf~Ue]\[*dsC&amp;(}OHII1JLMII_;tH-agg-k֬aۛBxzzW_}Ů HIIa:jˮ] HR-طОlرnD_pgggUVe˗/GDD&#x27;Ι3X|9&#x27;&lt;x\\\E,su?2V2tgdd˻L,֭[DPNg\-! /p-jkk!~:0uT#Au a-kKJJ -rrrݻw_5-{VJvZܹs_&quot;99׮]C@@-Nyo҂~1!^u sS۷oCfU2\\\iӦaʔ)8q&amp;NDׯð8 -k֬!]uVxzz⩧D&quot;7nÌL:Ç 닔L6 -...Գ-**bgtԖ4&quot;)) pppҥK1vX|̄D&quot;App0~gK8FI1vX$&#x27;&#x27; -C}v|mmm8s $fVݍD&quot;c5vHOOWb~}W -b !{l{z&amp;! -}y7faBDEE!AFRBnX,!Bѣk*?s!#6E`Obs#t?1Y3َҽAܿ~9!B߿ϑB!D裏 !`nWٝХ/؎X,8t:%[^fF&gt;b)s?\X_MիaooOɔhm۶q -5kGB,VӧO7.Q -Xy,YN&quot;5uYB!k.&quot;BM- !ބ)!b/DJ!X&lt;#%B]B! JBHWP&quot;%B(B!)?rH{o+ʯrX|_Mt_q&lt;_+z5F̋^m8x0_ݫ,GY{1/z ݎL~y mٲE˯2j~1-cٷ_- -U(9^ʉ}k}Fv]L -Qo (r9L -wGv1B~J&quot;$4ܪ킕)B&gt;?Zm3&amp;N)&gt;-Ɣ@TUUc -UUF_&quot;&quot;*0qiMJ7afċ.&#x27;NpGUU5b1 -jj}o}6! %E9 lJu j&lt;=b5unhok - - Nm -Gΰ=c?ܶ Օ׷5K-)mN03E~5G~ M#vq񈍋g{*%~h1q&quot;wXP-&quot;;gmJ.fkt]܇h##WC.wEڻt(;Yx)TKX-&quot;gįlC~Y&quot;tfGF&amp;nѸz -R=vť˗٣nv̋^ ^SsK V,e/g~+GlKυL”@eCBbۅ -🄃OQ䢱5yll9mV(+Tj1nP|,VS&amp;qL wI - CmƧٟA.5vΛ#G&#x27;ʱrU&quot;\]0b(k/Aօ&gt;բ߄E.ҷegKO:b{! .#]u -{7,,^*&amp;UHW-rrU+Wic䋷7cgR2*̇Vg6RHtZпUݹARj~hlByzDo(+7Vkǖm6k|fYߝE.6Ծm;2r-Y5֮ۀ&quot;` ɠVkQy:ÜO;QV}ˇY -13j -Fv]&amp;dNJl]/Ғ!?Zaa!pv綊!둊6oެrWh4HJgV;w-Gz7oB&amp;sFd?,_&#x27;4rg_MH&amp;55[^^QZZnRBlx)+AGT Þ0B=s=ҭ[Z~BJHR9z.%Q)!bH !Ī_!r@B!AA=RB! GJ!tH !.DJ!XfB!]DBJBHP&quot;%B)!H !NݐB1&lt;I=RB! Ng6R&quot;%B0H BHQ&quot;%B)!H !.DJ!tALq&lt;_c/ż&lt;~g`D~EvddA!2In|–1?%K9RykmFӈ̊׳^Gi - -G{[4rvdd&quot;&quot;r. D&lt;͉!B$ OcE%&quot;bC--&lt;tlgBb~xqVT&lt;Ƹb$%oIfGF&amp;vddA5xGF9Iqh1&lt;&lt;1+**%9Zì̊o/\Ua -l2&quot;R{&lt;2- -jxx/bcGF&amp;VJDYY.&lt;B)s۱w7O-wT ^ɼCy-wvxs{f~FE c۷-lJ}PRyzNNC;#G Zm3;,M!ݍUsL+5LMECd-QOo/gEɐ0.-g/Ju KbDBjEER=;pr/PdEXXH3Fh##WC.wEڻ|B&gt;ӦMKaz4υ-n_@XX4p/?Ԣ{TVBq7/E^~!ZH$BMxd 8:6زΉD&quot;|Sze&#x27;+t -E.w̝ʼn&#x27;K8:F4{&gt;Ass3[y~ylykEKM&lt;X@+=W&amp;Ԫ~ij朓ܑopL*+O!/-&gt;s3YG&amp;sƪ+.~|u Z&amp;Y߃a&amp;- Nvڷ_1%I]݇+ Ô@~[ - -j]eEs*Sj -F&lt; -r-$J!w%PROވy -r0,Z#bbH/#=\uu -NWB*s&#x27;k&#x27;?B -D&quot;-$BH&gt;;=R[4B-Z흿Gڷo_444 !bFCC$ }ZB! FX q~PYYׯc!bQQQ~J$;[B1b @]]rssq5~&lt;!B-p- mN--]8K]8X+4 -m=FtNX.vvv۷/뇾}}􁝝?;b]H --- --IHDR- -JiOAUeJ*آtZ_Ҫue!Km RD$ c~f&amp;!@T9{?33d[[[,j{.ݻ?z /_ --/Nɓ&#x27;1zh&lt;y- - -x&quot;̉mŋ9&gt;~?ckwf}oߎEJO=C- --(((ܹsMlC-ONG}vL&gt;5/&quot;8mݾyRx{{޸pȨ=^J 6h[WVVhJMMŜq`47--Nm&gt;{$͛-Df\^4,[ h&quot;vvvٳ&#x27;z&#x27;&#x27;&#x27;888\ -qU)DJM7oDuu5 - Q]]j_Byb2 2 cƌL&amp;ԩSq.u -X҂k׮ 999y&amp;B!쌉&#x27;ba;nBYY -%QB!7oބB@&gt;}P[߂VP]]~&lt;!BLhmm&quot;%B\WWBB!D&quot;{_ {P]]͏!BkP&quot;%B:Fu8߽ąBNhlh׮]M68p  /+!q -\z;rrrC!)}͛7Lx^z=zijjBSSZ-vڅt~!1$ 6wK)_Xh^zQ%M=лwoHR,Y֭|KCBH75!&quot;&quot;pppWB SLAHH 9j_ 0!b1{=HR~IB&gt;Էo_~!z^ǔ)Sлwo~!Č}&quot;00PPTB/ASc 2DP&quot;%t_vz=ń -FtK9N&gt;mvO{䲳1e~1kʔ)wXkkikk+/&amp;0p@J[?~&lt;N^z2uT?GnƍXjd:eZ -7nWu_B 淥B{{{:7Dk&quot;)鶮]/b{&gt;d$ф&gt;|θp--oGLL ,-- -2 3gDmm--J3g`Æ -2ba2ϧ$ʳi&amp;̚5_YfڿE?&#x27;?gjkd~Yٱӷ:{J̙3!H H̎Ȳ0dH$ 28s !H h0&amp;88~~~^~~&gt;$ v LLƞ;c꒒غ;w&quot;&amp;&amp;H)H$k[# 88111&gt;&quot;)) Vblx{{cرpqqAxx8~&#x27;Z#!!-k/;wD&quot;J5sLĶOvgÇW_}@v$:eE*XN[t)8t֬Y ҥK93`-~~~l_{};w.&amp;OիW#-- -زe T*x -|Whll˻\Zv[tÇ_,jڨAB **MLBMM -?&lt;Frssq! СC?[|Qe0tNlCף okk+D&quot;QFoƜ9sၪ*ܾ}-0`-rÇɓrkĠ~~~8{,-?&quot;&gt;&gt;7oD`` 111HJJWWWyܼy hlld&amp;9[cȑܹooo-%3&quot;e;:&quot;r -닫WĉvZ 4W^E~~&gt;}YcҤI|2c@հM[&gt;}:RRRiii&amp;c;e(J9smu - -xرc-YYYrrrL^X$SB)ף_L扔)󖖖~z=:L### 113 -߲ӕ*&amp;N3ofa -߿?$ VZAC:m˖-Ƌ/Dw4i - ++ cǎEBB^}U 0-I-&lt;&lt;&lt;T~;v,?B1&quot; -GU||&lt;؈saڴiBlBHקm?&quot;%ӑ!] !)!If^dz&gt;/&amp;X]eWB?}!vufnTMw&quot;Z[8 !be˖ !VXr%)mڴI_r -]\\UV駟BVR]wsB7B!KiB阫WjB!߿?%RB!3(B! VT2B!p%B͍v !?I? -&#x27;BlICܣG~9!B]H+2$}_DJWdؽg/4~5!G*Ptr/~&quot;z5̉_$L~dQ -DCfV6۞b! ѧ~Fc_ -LwRu=į3zTV^D/82&lt;mFNPVYn߉E%juprrĄ 3dž-Z)34f(h:seEv]C8XzomQzZ? N9G6-}vS/;!D&gt;C;^&gt;5EH;e˓0-NC&amp;sNa2t޽{!b#sj4xoBN7b{r -orZ?iA*u&quot;d(vRWJu݋a^wQPX P&lt;&quot;hdlH &gt;gt`h0TV^l uJlNzY -m-3+joXs t,+C{ -eeG/Nf/Ԅ 8p M+*ɑLY/kAr7&lt;p;J&gt;vRW(T&lt;v[z[zgΜ/7+/g8afH!TVkةS#VSG膉f֍B89N} Kΰ?ڶ u3oklC[R*KŶ0=M~5HEtrD,gG*e~h -f1cFq -0E.wCo:EvYlqg?B&lt;&gt;{yySq xHlBn#,-%9WB.O?(&lt;Y̙&quot;D&gt;TX=c(Z?Bbҥ+rkH5 -Z(.VA&amp;&gt;;Z/&gt;٧ik{9&lt;gMciݫϏ_nwJJNqw96&amp;YJJNrz̬3vO&quot;}v-uu&#x27;899b+~8[qc(D&gt;?ql[ccwO&#x27;=MӸyonqCSܹqE޳::]}0fFMM-T0rK^wNHWd Dǟ&amp;ߋXO# c߫EYY9BBؾ*&amp;s_KU-^+&gt;XW8p m?n,&gt;^׵]؞-KRm)hd`ж?~q+b݅1((,2yڎ -__ְݷVPHV1 m&gt;1棺Zk] ixF&amp;Z׻{1%kVj_r&amp;N \Vk^~&#x27;dprrQ$ܧiǿ&amp;/UBB8w$U i(11QtR~9!FS/&lt;OmC۹ujZ;(~=N`ϮFӗtevvv- -Ï.!tV%R&#x27;&#x27;GTi`ZS -#UO,W|w66m\Vb(lۺR+ - ٸ~̂\m[7b(| -VS6 !*Ɏc#:fyey&#x27;?~*;tEʋ2ubN&lt;)tEg S&gt;Je){ޒyl̬lC^ːH0f -{g[!qmȀHWd|aۓS8s×w&quot;ao\dRVØѣ81 --VY&amp;̬ll&quot;--̏Bň|w6gy( kk[*uŇq+l1&lt;R]6x%f-KU@@ְ*pu~&amp;i45(++&#x27;;mF~c(vsM-Ʒ%u-~m* - -8ڣjEbꜦ_|n2tȋJ?0sQEA_mfQlLдسkb @cCg95k&gt;&#x27;:WH.[By:HG@*u5y0qj45VM-JOܹqE)2j߅8z,^&lt;0g$v^&lt; rʙgCI)$~ W&quot;$$M..pdfƅ U8S83^oP5D8K?5L$,Fm -(P^^=+Npqe)~e={#Yhll2qipv~7oB}]oÁQèEFxsNr{r -ӧPRr -H$x?vA8&#x27;^ȩ&quot;~d NNVCI)ݻw*+/&quot;-}?vً_^EHH.oBŽHNX`.?$j - -?]Ҷ -sL&amp;Ŋ!v/t7[^A:j} --dɢx -ĺVs- G!؀X$H7W^^E%prr#gcϮB!6  JHH!b~j_G!3ZGjooj~=!B̨D&quot;Ύ)!b%FX q=pIܺuC!n߾b888#&#x27;&#x27;G!rss-|skP&gt;Qa =&amp; -ʇU -נlA3\v1z -ި([T]9}&amp;Z^0&gt;v.$sjg(\(p✐8[ X5jZGڣ6F%|){KJGD,d}-xI&gt;&amp;)#|&lt;e)l&quot;-%|)0I -)cϸuOYlΗeSm/ {bc&amp;P gX:cl!î$Lt&gt;%NIdbDӖ&gt;I/+o6ϝ&gt;6|n&quot;!70=(jRZF ؔ&lt;[0S Xc2}eSJM$dnC  JVI9(r0iUts -w_Ϡ D]Yr[J`f1(=N_Fh`Lb&lt;؆g [$PUcm 3V&lt;z%XKg8f9]Rq~47CfG]jW͍RJJZEj &#x27; 2Jͅ=^W194/ރ3 -m3F -1.VnpD&amp;[ZffnPizR]&gt;X(?9TRvC&amp;d|J[ZfO0&amp;Mgsw6gn;/l[ hGsIg?(bgrE͏ܟ`QO4Q&quot;a!Ù,A SbQ`&#x27;l.@%Q&lt;4l/ۥG6zǪkApG -kڅ5cGJk4%WaM8Th׵ -bq 3X]$(3Gy:RZ;GVV&lt;U&#x27;vOǻ* -N9s.UDhugpt *[Y׍d+̮l(͠wd5!w TRADr -n@8Q{&gt;po־&gt;X˵_䁕ƖdzL?E~Dl ^f+2xѲDD *Jp9rotгzَ[ _b+VTnst=9*F.2aP#}z9J%JW|9PuS;@z7y2zͥHbќ:ŖԻZS[%:v1ШNl.)EGv enB)2p$Ve94~cot#e9T#eE޹*f?Lնj -^1P:`ÇgS.myvZҳs ܞ-ZUM(\&gt;R:KNg5 -?5Z7C^(2I~.{RBWUOV孈U_W5Jq&#x27;+|4FfT:ި -J&#x27; AA;Ws^z] aXRݩFz{Uv^Wu?-N-&amp;TXۻC$R&amp;{@QȈN2e ^ |!T)Jq9Noh_&quot;j(K+m&lt;&#x27;)n~xdӊBC) #lg-]Ǭ##^)~cp d&#x27;&amp; -.386?㒙v3j[SE֌9?c _DxdʗauTu -=D QόYo .PB!(TgD!Fs,r[i_9gCTbB_&lt;9xQHc$KL)8D[6+16QE#J6GϱP;$Pؔ(/eW 0C]m b󋡺֑U.w$Ï:uxoW&lt;/Th~-F&quot;bRX&lt;09 5 tkeDK5]#my -)ĥ-͢yVv7Q+oe,Pv0ܣO0SRsN)?CI;Te}BZܻ3\8# -)I&lt;8]3Ѧ+u1\^2&#x27;U3EƦ⿋E_)Y7uH%&lt;-jor5wx -0ӑ;j&lt;W(tmz?w-l`hks&amp;;` -8u͘kWg -Ѿ -﫠ɾ -:WA*H&lt;gAq~DpjD8Ćqh -ǡ48?F8Sf -g:wwᇻK~p;zx\= -ҲfYVY9R2r&lt;&quot; `td3qoDߟ2q Y0eӻ&lt;ʓlE0&quot;)sO|sұ@e&amp;Ŕ7 qU$Avh?ϥHb^0W-cdC\o+ \a}q1?7P0S?3P03&amp;2hD-eЈ̠Ov3hDfЈ͠oLTGswWI&amp;m|YHf4a9rYfX\fSpGѧHTz&quot;r.;NWtJ\5j&lt;&quot;x%Q -Cxe 43OIS ODW{A4=bNF#efiL҇*i&amp;y!޲R:%⣈?!r^JTw$`ִaS **k:Ä -CŦ\\݀ثE켅GuO ^dl5`Hւ YfjW/XQ_/(&lt;)9&lt;P`TL(0* -OX`ӱ?-;E_W߸k1pJ 4 ߸ڈ2vns-VGE+hV&#x27;ZAhc&lt;pC -!B1RpC -QBhBP-!BhBP=Ns/BP!Z-T5^!Th**D*DA B -!BhBP!JK-T*@ Uj/Th**D*DA B -!BhBP!JK-T*@ U,!Th**D*DA B -!BhBP!JK-T*hOs-G]-ʨmK&lt;ݶQ[-A78j JC);ma28ۢe-F[&quot;e-[@mqvϗ6wNmn 1FW]s#tэ &#x27; -f -G5jTC/?ʛjG5 X!jFS -P~Tî K5DR -T쐝0TC(o!pp&quot;`X!-`PTC6,(-s 2uȖ!.8[ْe-Y-٤FJŧO -Ͱʏj\DPXqْj\J5.[j-eKMT㲥&amp;j\J5.[j-eKMT㲥&amp;qR=;d&#x27;?ոlj\-5Q˖eKMT%&#x27;ոlj\J5.[rS˖eKMT㲥&amp;qْj\J5.[j-}&amp;1&#x27;n,/Žgżd?N%y%_y^U&gt;n,%RRR-Tb,GN\cd75˚=p$W`jkT~mLP/yf@;5z&gt;|MLC2Zc,?&#x27;56,+ݗ -tUwљ-fN o9ž?uoF%4Pw1DAׅ7c3&#x27;WMC-0&amp;aCM1}LΆӳrJ:[YĩlK̷u˽9WU,&lt;~=Mk&gt;:Qlj\/3?g&amp;&gt;@ -Uf -%t?&gt;ge&gt;6vd%. -tӉܜ3S֬L63z/&amp;R `Ƴw_SgV2w\͖HunF:N]V5YбV]&gt; bhP;\ڞqŶ\Gw/|.e#PnsY-C*ܣKktC&lt;by:dVC&gt;S&#x27;DO5x}K20WE -DF[ꔾO~} -Jgխ&gt;TRMk&quot;$WlIv`Y=pբկ-2J5de-Eߗm4 --~&#x27;q-_&#x27;υT y[YdJ4W0!&#x27;d\G&lt;74LF\OQGZٞ#Ks1tPm`D3@&amp;2Z -}ISI+R@a/gdfAEfOnmVv`QbP~,^^R@X%t+v5707ɣ;ٛYwp*r#+&amp;r#5gNŅ{׵t8o,0pHхliBI?0U -GQ|vws鷙l5&#x27;W]՟Y(4^ ^-p|u͊zkvnwb}RA.18O-){h|V *lP\Ek;:ғ6X u&#x27; -&gt;leZ%c$jI~|-q`v-[T!egpN+ lM oB܃ꦻU3x4X$;cwۚU4!ʆ6$2hI{{|Ӿea_oH - -av= V3;n|QPn;zxIfs6xi&amp;,߀,%vBM#2➞mwu{5&#x27;z~X9]LJ%:s $---------N- </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">Assignment.pdf</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/assignment/Assignment.pdf" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-assignment-Assignment_pdf', 'Assignment.pdf')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-assignment-Assignment_pdf" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/assignment/Assignment.pdf"> - <pre><code class="language-plaintext">%PDF-1.7 -% -1 0 obj -&lt;&lt;/Type/Catalog/Pages 2 0 R/Lang(en) /StructTreeRoot 50 0 R/MarkInfo&lt;&lt;/Marked true&gt;&gt;/Metadata 298 0 R/ViewerPreferences 299 0 R&gt;&gt; -endobj -2 0 obj -&lt;&lt;/Type/Pages/Count 5/Kids[ 3 0 R 35 0 R 37 0 R 41 0 R 45 0 R] &gt;&gt; -endobj -3 0 obj -&lt;&lt;/Type/Page/Parent 2 0 R/Resources&lt;&lt;/Font&lt;&lt;/F1 5 0 R/F2 12 0 R/F3 14 0 R/F4 19 0 R/F5 21 0 R/F6 26 0 R/F7 28 0 R&gt;&gt;/ExtGState&lt;&lt;/GS10 10 0 R/GS11 11 0 R&gt;&gt;/XObject&lt;&lt;/Image33 33 0 R/Image34 34 0 R&gt;&gt;/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] &gt;&gt;/MediaBox[ 0 0 595.32 841.92] /Contents 4 0 R/Group&lt;&lt;/Type/Group/S/Transparency/CS/DeviceRGB&gt;&gt;/Tabs/S/StructParents 0&gt;&gt; -endobj -4 0 obj -&lt;&lt;/Filter/FlateDecode/Length 3162&gt;&gt; -stream -x][oܸ~7N -0&quot;EwERC$A ln//3E~p(~߹fx_ wwڿy?yW~n7&lt;&lt;pN |0aJ^ 6᷏7ar{}|K=8㙳û_C -&gt;|O9}㏷7=Ʀ?o{e9w*~Qh\\+oû?&lt;r{rq=!f]?tDʦHǜ^L~x}C[ol`~ -s# ,PHZ&lt;PYd4&amp; -&amp; -9 -Q#OGq 2-F~~nN.%WO gnpR(fn\B&gt;4L&gt;/,5u$zOSwT&lt;5SS=e&amp;MAqSeJ4f{&gt;ßiG~¶L;&amp;W1&#x27;SHB,D`+ -JXmk^ɻnr? [ď&gt;i\F&amp;#,[lwJ -&gt;DWz+zHŴlj¡; -K[BƅgIcr4iTV3(^96ߵW?ndBzzKO3r1ޕ}4Us]&lt;he&lt;v&amp;6efF;wq[(ZSEVx^An&quot;p,N.tr4Z -Q% -U*?Wztp &amp;ENkMHdiڒaUiLDv-M)*)Xqf!-ICE?#&lt;43CZu,:.8ɗTZfb8b&amp;C;uFDH 晸 &#x27;n -I HSR -gܵ;b\W -h&lt;w[ZҨKI-Xb$nQGw!F\4L\-%n̜G7JGv6g׀( V=[nGZф#8P!x@k$-L&quot;5R؟* {Mtdwy5vϬóc7Paw@knH\ߏs$&#x27;pSƝY  0Hp?-P5 V:X9Džr*KsxӂW%B4^CVӗF_OL Tlնijk!XY&amp;&gt;bp! Æ$9(&amp;9˕Fj9 -9Z#g%iZ)PMQxr;g?[l2ǂcbq&#x27;bp*h -Ir{KuMrIFN.)#&#x27;P!&#x27;P!&#x27;Pa&amp;P.xJZ]Iv7^JBW&amp;.I6C{Zv#&amp;Ʋz&quot;q,S -;ߡYg-&#x27;mZWGnz4 1C2-9Z#g%iS 4b}&amp;ܬ}w̦,ieԀ kIgAnm1 -T0 -\Džu[H놤TcZ IgQ5J(L_!7,$b -`@%_+I&#x27;v?icxң^T)=ts&quot;@Jm6-J7ҜnR)eRi!P$nҶˊZz*1bp 8&lt;J0dzT;6ut3W(coY0fZ?*I&#x27;W˫[h؍-&amp;O74m5nڵihʹ+I[=0Tkq(zU=~o!G\0Bֈ[IW7)ׇ3EA.sK1IJE{ F0Ǯiׁ(2+LLbpT?5hH&lt;&lt;&amp;9L]a֢#&#x27;P!&#x27;P!&#x27;Pa&amp;P-v&amp;nbpq-(ӛ_ìu.0(h˴䆹gأ`w 9:P\ltDm@bfӻhTH`8&gt;m!|?*5&lt;s83=1c 2JYԐmuUic 6B۪xb:7jMY:ZpvX&#x27;;Nܩy&amp;4 -OOц9o̜i?/o}k xeHu]?oC73V?yG6d_*-endstream -endobj -5 0 obj -&lt;&lt;/Type/Font/Subtype/Type0/BaseFont/BCDEEE+TimesNewRomanPS-BoldMT/Encoding/Identity-H/DescendantFonts 6 0 R/ToUnicode 283 0 R&gt;&gt; -endobj -6 0 obj -[ 7 0 R] -endobj -7 0 obj -&lt;&lt;/BaseFont/BCDEEE+TimesNewRomanPS-BoldMT/Subtype/CIDFontType2/Type/Font/CIDToGIDMap/Identity/DW 1000/CIDSystemInfo 8 0 R/FontDescriptor 9 0 R/W 285 0 R&gt;&gt; -endobj -8 0 obj -&lt;&lt;/Ordering(Identity) /Registry(Adobe) /Supplement 0&gt;&gt; -endobj -9 0 obj -&lt;&lt;/Type/FontDescriptor/FontName/BCDEEE+TimesNewRomanPS-BoldMT/Flags 32/ItalicAngle 0/Ascent 891/Descent -216/CapHeight 677/AvgWidth 427/MaxWidth 2558/FontWeight 700/XHeight 250/Leading 42/StemV 42/FontBBox[ -558 -216 2000 677] /FontFile2 284 0 R&gt;&gt; -endobj -10 0 obj -&lt;&lt;/Type/ExtGState/BM/Normal/ca 1&gt;&gt; -endobj -11 0 obj -&lt;&lt;/Type/ExtGState/BM/Normal/CA 1&gt;&gt; -endobj -12 0 obj -&lt;&lt;/Type/Font/Subtype/TrueType/Name/F2/BaseFont/BCDFEE+TimesNewRomanPS-BoldMT/Encoding/WinAnsiEncoding/FontDescriptor 13 0 R/FirstChar 32/LastChar 32/Widths 286 0 R&gt;&gt; -endobj -13 0 obj -&lt;&lt;/Type/FontDescriptor/FontName/BCDFEE+TimesNewRomanPS-BoldMT/Flags 32/ItalicAngle 0/Ascent 891/Descent -216/CapHeight 677/AvgWidth 427/MaxWidth 2558/FontWeight 700/XHeight 250/Leading 42/StemV 42/FontBBox[ -558 -216 2000 677] /FontFile2 284 0 R&gt;&gt; -endobj -14 0 obj -&lt;&lt;/Type/Font/Subtype/Type0/BaseFont/BCDGEE+TimesNewRomanPSMT/Encoding/Identity-H/DescendantFonts 15 0 R/ToUnicode 287 0 R&gt;&gt; -endobj -15 0 obj -[ 16 0 R] -endobj -16 0 obj -&lt;&lt;/BaseFont/BCDGEE+TimesNewRomanPSMT/Subtype/CIDFontType2/Type/Font/CIDToGIDMap/Identity/DW 1000/CIDSystemInfo 17 0 R/FontDescriptor 18 0 R/W 289 0 R&gt;&gt; -endobj -17 0 obj -&lt;&lt;/Ordering(Identity) /Registry(Adobe) /Supplement 0&gt;&gt; -endobj -18 0 obj -&lt;&lt;/Type/FontDescriptor/FontName/BCDGEE+TimesNewRomanPSMT/Flags 32/ItalicAngle 0/Ascent 891/Descent -216/CapHeight 693/AvgWidth 401/MaxWidth 2614/FontWeight 400/XHeight 250/Leading 42/StemV 40/FontBBox[ -568 -216 2046 693] /FontFile2 288 0 R&gt;&gt; -endobj -19 0 obj -&lt;&lt;/Type/Font/Subtype/TrueType/Name/F4/BaseFont/BCDHEE+TimesNewRomanPSMT/Encoding/WinAnsiEncoding/FontDescriptor 20 0 R/FirstChar 32/LastChar 32/Widths 290 0 R&gt;&gt; -endobj -20 0 obj -&lt;&lt;/Type/FontDescriptor/FontName/BCDHEE+TimesNewRomanPSMT/Flags 32/ItalicAngle 0/Ascent 891/Descent -216/CapHeight 693/AvgWidth 401/MaxWidth 2614/FontWeight 400/XHeight 250/Leading 42/StemV 40/FontBBox[ -568 -216 2046 693] /FontFile2 288 0 R&gt;&gt; -endobj -21 0 obj -&lt;&lt;/Type/Font/Subtype/Type0/BaseFont/BCDIEE+CascadiaCode-Regular/Encoding/Identity-H/DescendantFonts 22 0 R/ToUnicode 291 0 R&gt;&gt; -endobj -22 0 obj -[ 23 0 R] -endobj -23 0 obj -&lt;&lt;/BaseFont/BCDIEE+CascadiaCode-Regular/Subtype/CIDFontType2/Type/Font/CIDToGIDMap/Identity/DW 1000/CIDSystemInfo 24 0 R/FontDescriptor 25 0 R/W 293 0 R&gt;&gt; -endobj -24 0 obj -&lt;&lt;/Ordering(Identity) /Registry(Adobe) /Supplement 0&gt;&gt; -endobj -25 0 obj -&lt;&lt;/Type/FontDescriptor/FontName/BCDIEE+CascadiaCode-Regular/Flags 32/ItalicAngle 0/Ascent 928/Descent -234/CapHeight 928/AvgWidth 586/MaxWidth 2686/FontWeight 400/XHeight 250/StemV 58/FontBBox[ -479 -234 2207 928] /FontFile2 292 0 R&gt;&gt; -endobj -26 0 obj -&lt;&lt;/Type/Font/Subtype/TrueType/Name/F6/BaseFont/BCDJEE+CascadiaCode-Regular/Encoding/WinAnsiEncoding/FontDescriptor 27 0 R/FirstChar 32/LastChar 32/Widths 294 0 R&gt;&gt; -endobj -27 0 obj -&lt;&lt;/Type/FontDescriptor/FontName/BCDJEE+CascadiaCode-Regular/Flags 32/ItalicAngle 0/Ascent 928/Descent -234/CapHeight 928/AvgWidth 586/MaxWidth 2686/FontWeight 400/XHeight 250/StemV 58/FontBBox[ -479 -234 2207 928] /FontFile2 292 0 R&gt;&gt; -endobj -28 0 obj -&lt;&lt;/Type/Font/Subtype/Type0/BaseFont/BCDKEE+CascadiaCode-Italic/Encoding/Identity-H/DescendantFonts 29 0 R/ToUnicode 295 0 R&gt;&gt; -endobj -29 0 obj -[ 30 0 R] -endobj -30 0 obj -&lt;&lt;/BaseFont/BCDKEE+CascadiaCode-Italic/Subtype/CIDFontType2/Type/Font/CIDToGIDMap/Identity/DW 1000/CIDSystemInfo 31 0 R/FontDescriptor 32 0 R/W 297 0 R&gt;&gt; -endobj -31 0 obj -&lt;&lt;/Ordering(Identity) /Registry(Adobe) /Supplement 0&gt;&gt; -endobj -32 0 obj -&lt;&lt;/Type/FontDescriptor/FontName/BCDKEE+CascadiaCode-Italic/Flags 32/ItalicAngle -10/Ascent 928/Descent -234/CapHeight 928/AvgWidth 586/MaxWidth 2366/FontWeight 400/XHeight 250/StemV 58/FontBBox[ -136 -234 2230 928] /FontFile2 296 0 R&gt;&gt; -endobj -33 0 obj -&lt;&lt;/Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 4495&gt;&gt; -stream -xۋU/_! 1DD #A|A`f7EBp$3\̅dr/C%0Ht._8vU:]U4TSu&gt;}T̹s曯:}&#x27;~{rr_? yy5Grp88_NG&lt;Ϲrv&lt;}&lt;^:E !O(&quot;N!U̙3,d{Qɓ&#x27;rooU,YX!D RRZ!Xh|BtP+ BT.$BNl/_r@Gr?޲BgڵP{キjժcBr|￿XlcǎBt ]CȚ+V|wO&gt;}^:~}vBT -^̿wʕ~ H?Ӆ 6o\̩.DEr&gt;_磏&gt;_3_-ZT /DϞ_^vqy!ʅ%-Ge`ٝRt&gt;׮][lDm`hyBd?|hh(^zyYWǺ .[x뭷py˺aK.EpYrEne_ -*2+W_&gt;Dd5W&amp;qbւ ~wine]~x:Ud$?X&#x27;pB{$nܸQ@-6 e~P&lt;ʭU̺_~֭[|Db3u[~7 -ݻwobVuoݺi,X{-ĺgϞq^9VB_F -ޑ,|EWz=Z4G0CP\WY֘ OhUp;o˕Q#xhօ`[)Qw~coċ|X:ɱY=7oYBXpT .=5Ǻ؄a֥bKDᬔC, -R&gt;BYv -K/=MlMten-\nZCTͺg+厍%f[fglkra8bR;$5iVY729Ӻ6Ph*lu 2gy[A낞&quot;&quot;Ĭ&lt;5IԦ(%J.a0|TɖcڬXs26;QK.\ŢvFk+Ug*.l3֤+ȑDoS -QM -ZrZU]tdOa~R7wX~uQՋ.XN+:ǫ0fknZ&lt;ӺАuE)n5 -Q - -@{Ij_)Ҿ9^1uE7&#x27;&quot;1kGbxe@E&amp;ݻw&#x27;f! nݶOYW,YWƺrwڕ%늂uE7+&quot;1K#n ͺ-z衇{BLu.\ϋhg}.DĭQ.|\|]z^( .`+ݹs%K[N-!F#ʎB!YW!DB&quot;rˎB!YW! -CB&quot;uH#ʎB!YW!dhh̚ޞG(h-;&lt;+P u]%4V9Ӻ`NHhO&gt;4AHnŋ6i&lt;=)e)Dh]8}r%c5lf~ꪈ&lt;T$B6 .U,^VBt-]ծX,eOx|&lt;BHef.`/nC&quot;DwG -BP`{TGܺ.-H.BB&quot;P=+`Y&amp;aZ6LGυI#`4H p Eiɐ0ߺ#.)uY9 -k6D&quot;&lt;]FYW&lt;lakc܄Zsn0Ǻn-oL&lt;3 -gB&lt;SBLA -M[wl|u1DSs2Io]Oi[r*.lF1 -1׹Q&gt;-madV&#x27;Bik3(Րu9i -F( -͈@&amp;&gt;.&lt;octĭ(:v»vZ])sYq1. -Fjng6ykSF!H֭[qFx6oZSN9d}&amp; XC#ĺ2G0x -Y&lt;֥su;\C5XQfdE &quot;3+9d]!(4 4 &amp;!$Zw xuHd]!(Dn۶MBvf]PJ&lt;BȺBQ$iݺuk!D# -!DȺBQ$QF8BȺBQ$B+E&quot; -!DȺBQ$ݲeK)!Dg*e]!h]B&quot;QvB-ȺBQ$B+E&quot; -!DȺ&gt;dzl|Q4\ 5=--; -!Ku^53s&amp;| &lt; ѺY/^¦+W3߀- [!MZH]#S&gt; ߼.g2}I&amp;N2^틧M ubdaFEB 68+!e]!B -x.!%ܪPMx^(1:!GldYWX}`]MquYX~genyf3uW\AcΦ8ioPff?WFk`襸lj48&#x27;xۘ&lt;#ŦbZ /kݴ6n[Ei -!*HNڴ bY816ëgG -Q]Y&quot;6pݴPrx6&quot;^u݆ -l&lt; g.vL?B(Z#M æ,G6=!Do],QnnG*5Ѻ6dmh)3B-y2wӎGM -05kn8NUu \!g -&quot;NܺP]B6mǮ3!F4NP2!&amp;d;vFVa)e! -t&gt;%  nڬm J@ -mȺ=΄;lu92 P&quot;0^Y׎rCe!ʺbVZ/ձ,3/ɊB&amp;Kdڌ9BĹG6*rZ &gt;fA˜&#x27;ӎrCusf -) @!nuo(^ۢړf#EF9yk$_{[9uK2B p/eҬ~/\3֞H12-=GB@[n&quot; !D&quot;B+En۶ʺBȶBnD!:&gt;s&quot;.9 ۑW^yĉe&quot;ɓ&#x27;k׮Bt2,d NLLNNNBt2o?p޽{w~we%իW!Xhr&lt;o߾-[LOO|e)s:TahvbbСCƈw|||Ϟ=7o޴iӋ/?1{_Yz/^b];7k,9w&lt;9|y=%#Qf7bz?^2WJ -HSHj`1Ѕl&#x27;&#x27; -endstream -endobj -34 0 obj -&lt;&lt;/Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 4533&gt;&gt; -stream -xU/_C4~0xHAT5L\nvEg3̭g&amp;d23N Q -CDADc! MXs8SSUU5Ϗf&gt;UuS&#x27;Nz?;&lt;xptttCSq2苣7=CN fGꞓiF5GPP(D -BP$4 ٞ8qooSN9rd͚5O&gt;߿X!D RRZ!Xhr&gt;{ҥE) -B- 踄f![(&gt;C,W! -4;11&lt;yr͚5E#d NMM=E&quot;d ;vLw,!D@Pn#D!Z#G&lt;Ȇ$k\/ t!d=裍BÇ?b{ᄏʕ+^&quot;3H? lْOW$:t蹶u&gt;~a*_urrrѢEtx! -ϭXXEMy!/F+Vi`уR4?׮]koowtF$&gt;`&quot;x5t@Q -oV (.\=Ee]QP}Bu].]*z,Vܹsryv~YLOO/,3+Wlڴ)XB,JWxu,XP@-t8ni]~`9 -(H`ן~&#x27;cccXQI+ܸq#1+- -*wa5-c_-VK҆ExR庋-J9ߒr3溡R LwZnyxJNu)&amp;P9= -&amp;I=VeJ@á[gLk$eǴVy2N/$5izY749ֺfV&lt;Ժ0]y ^&gt;&quot;Z,H!@V;uX&#x27;fRi8 ƙO3`d:,ELLzT#t+Zњ}3]]8l#gICBokG&lt;%]kБ ׳J90/&lt;Ŏ~\ -ZS2&lt;[8L܅muf \Mkے3Z7YWB =z ZXwhh(tQMU/?xB`^bxi@E,h=B! h݆+ -RȺ$(@#t+rF+J+ZX嗃-z衇{B `… }HԼ+980:rquբGh-.\tW_Xn+ -]v-:!{ /=ԄUu_|(Uu&quot;&#x27;`ݍڊB!ZXmUQ!D-=EG!]tB*lݺ(U(: -!hd]!ȓJRtkܷ(\?B!D}pԂQ[&#x27;ڙ3gl*J!nϾ`R$.f?`ؚ6LfvU9(Il6˺B4MQD\Kx&quot; -hb9E8&#x27;=&lt;q}cOZq`a6&amp;+wrW!#&lt;|0Bw=d.}e^Ⳁc&lt;-Eώ -JPa֚&quot; -hZמ^0ӧ\((,+lȭON( nUjKMQ;m]&lt;qO - -Q b`xP5{D&gt;d]! -X!x5$c\d$L -!ļLf=`&quot;e0pۺ&lt;&quot;&gt;K|ڋ26Luh4}3 A^M:!`VK7p^׎F -Xޅr*YWF:VHm=#QEΉrat2ڗۺ0Hn]d)^ -+D+u_7uڗ?t2ڗ#BwQkfVQWM26f(BϺ_tܯ.&lt;/wmV rsڃŒ&quot;j_p㨐sXƼwO! Ob]LY֫iX0rM̭[~K &gt;惡[0WPΤn=Qհ{jxCpgm$j6.]sTαw9{hbny -=مȺB&#x27;BIu{zzd]!hB䉬+yj;vمDYB47BIuo^D8BȺB&#x27;BIu{B49B䉬+y&quot; -!DȺB&#x27;BI/@۶m+$!hnBRB첮B6BVAB&lt;u&quot;Od]!YW!D񢣘ņzi%-+: -!fk][ߣq`hWw9s6&amp;X6xuÆo֋[~ӧ?My -,({ባwixGI1и κKnX/%!TA(mCC1B|+ߒ@mt&lt;)Anl]i֞F795pYW4%Y.0G -^3V&quot;&lt;?&gt;9en4/9IJfd]Q^ ,XS:ZQ ʱy&amp;?&amp;R2&gt;h&amp;jCKA3y|^n(n&#x27;(!s$I2;X:ۺQv[EEh -!ѺfځSܐWJQpCᚲ뚬`XE8汘0&lt;c+t&quot;{&amp;$!DaP((Io2;i -wxPZ0/:ZCdm{QƑJ5|Ht3 ܣ]B1֚ĶY{&lt;Z‰6-@C]O8&gt;A`mR&amp;nTNalk5/QVPrBGR2s#n w)G9OxྫiH.:s{3 &lt;f6.Z­ /yv_u֐g鬛O*&amp;.&amp;儳5}?ʺd]V$BYW4ZtZ̚`$Ƴc{4qGIQѺ6KrvnZ &lt;؆ #Q_slݺC8d]{alk6s,z&amp;*#GƗ1=L&quot;;FȽH%Vy7G/kuni70DȜXu֋j(ݻa$y6-S-!D(;&lt;B!Z(,:!h~ [(R=-&gt;uTѱ!D&#x27;@###׮]+:!hfY:zh !D3s1$ۻwo?B4W^`Yݿ={m6==}̙~0bnB*ZTٱ&lt;xo=44ݽe˖7x?Ҏտlv8ddCɫNX3gxYCζI@pan˿o6&gt;UBP(D -BP+Dreob -endstream -endobj -35 0 obj -&lt;&lt;/Type/Page/Parent 2 0 R/Resources&lt;&lt;/Font&lt;&lt;/F1 5 0 R/F2 12 0 R/F3 14 0 R/F4 19 0 R/F5 21 0 R/F6 26 0 R&gt;&gt;/ExtGState&lt;&lt;/GS10 10 0 R/GS11 11 0 R&gt;&gt;/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] &gt;&gt;/MediaBox[ 0 0 595.32 841.92] /Contents 36 0 R/Group&lt;&lt;/Type/Group/S/Transparency/CS/DeviceRGB&gt;&gt;/Tabs/S/StructParents 4&gt;&gt; -endobj -36 0 obj -&lt;&lt;/Filter/FlateDecode/Length 2614&gt;&gt; -stream -x\Ko61 `ŷ- -7Q]Dڰ?&quot;&#x27;PM#I}몹7$V.oQ;uJt|;9zxHGY&quot;= -;~\H9&quot;_:+4Y=)E*أoAvGpp n9 }.yנ6u -7X % &gt;|a\З/&lt;G}&#x27;~Nqj})@pwaAFR5rAN{ʉ&quot;mA .ɱ&#x27;9b|V22f4Wېj=ҽ -}QF܅ - -3Ш)* L&amp;ylLQ&#x27;-޵g@cxn1ZآF/ƼJa .?V:Q`&amp;}&gt;Hyn$Bq〯`i&lt; ʠ4b2`MqmpDtqkPŒjQF-[k2Z44i5w9MɤpM}MqzHSWpG^$k&amp;\-[춞פ1آ6Be IapWHe&amp;@_^j,TD&quot;8&#x27;!r\ejJQB`R.6۰=F9-[hs^\|&gt;ӑ &quot;;FtپRegɌ(]0cCj9&quot;4yzb&amp;jDueN -馠Jy睉oEcfuDfs5Aз&amp;9u# -320cQQeŒx!- -B*a&gt;c C*Շ T8(b ̼o=3t@׭7&quot;t -C آ^\}sL|u ?#,&lt;8T7GVOz ¾;IT?U+&amp;kRubr[&gt;ڷx0kvGɿ|&lt;9Fo0p&amp;kdM -2 )u뱹?9O8o&quot;bܾzWh7#f*r {%]G${2ү|6o -|{XJ}na 2™=k\MMm&lt;r&gt;}]{ܥ rŀ}[P&quot;}9tm*OlhQ3V!{}sTɨ[EY(joI1&#x27;W e_#QI&amp;aW&quot;5)`}@177r-F - -3Q,M}l{* dM}M&lt;)wiI.B+E\T/!t0 ɾ &amp;` ZBPH&gt;$d՚\WCM[CFa}zp՝ ~ՖKg$nߖcsڄg7ZOPy -8ڗ -XBϕ*N΢P*u&gt;S+4D}|!d&quot;4$r-h6W)JR,@UDxó#=_0_שGX /UNf&lt;/57ў(u٘pΊ57tCX,Ϡ0`--`zWXO6DzʤObƯAj[ -endstream -endobj -37 0 obj -&lt;&lt;/Type/Page/Parent 2 0 R/Resources&lt;&lt;/Font&lt;&lt;/F5 21 0 R/F6 26 0 R/F1 5 0 R/F4 19 0 R/F2 12 0 R&gt;&gt;/ExtGState&lt;&lt;/GS10 10 0 R/GS11 11 0 R&gt;&gt;/XObject&lt;&lt;/Image39 39 0 R/Image40 40 0 R&gt;&gt;/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] &gt;&gt;/MediaBox[ 0 0 595.32 841.92] /Contents 38 0 R/Group&lt;&lt;/Type/Group/S/Transparency/CS/DeviceRGB&gt;&gt;/Tabs/S/StructParents 1&gt;&gt; -endobj -38 0 obj -&lt;&lt;/Filter/FlateDecode/Length 855&gt;&gt; -stream -xWj1}_$`Y Cl!!ĴMvew%G4sfpsz -tq^zy~:x:_yF ?SDp!Ͼ:Ƌ&lt;84,S``8\єh &#x27;43 -V唅UI!aqwNC]&quot;mϕ1K\ĵ`XB6_G%^gR)/G8Y=MY36&amp;oE,\?Ǭ\zʹpiU[r\L-^KV{]VDx)J9u -ԱhZyhڝq[S䄌.Fm7s[D2ԢR&gt;-&quot;Bm&quot;)^wB  -wbl&gt;q9qǡJn~0ʈا awPb;|ZnٙWݻA뾏vǃvDthDU#K[-Ta2È(+|8b`_Uj5 VaX?,&quot;zjI?έ -EIEBhA&gt;,,X(ֿ*a󳰭$RDڶJ_ojY. ow KA~5X4QF6M -VE汌 -endstream -endobj -39 0 obj -&lt;&lt;/Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 5117&gt;&gt; -stream -xU|1ɼ-(lv0 #e\e\H&quot;+DCn.1CLL1J ~˱NUwuW~TSuWS;w?裏&gt;SN8q^{&gt;Or 3\6%l;Ş,m5#dhYxFu( !O(&quot;N!U̙3,d{ܹ{w9y믿Z}衇f͚uB:TVlW^y套^ڽ{wWWĉS! -f![(&gt;-6CJtp@UkYxG{6 -5h&amp;BLD.]h)-Nb&quot;@XWǴ,Ne7MD,e&quot;dKWk_FvHK&#x27;p8J5W͙DS .pj:0tv8@F{&amp;-掁y)|7姷.vdi]dqރs&#x27;xξSp&lt;d0r:pMk3Z7Y-ܣh; u7oլ~Co}62/#YWt6mbݒ[l /H+:M5&quot;FuE{nK+ -ahhH%Ac] Ո̒uEȺuEIuE&#x27;gqM:^(:[o5. DYwرm&#x27;aE9yGrBu.FhtRѽPtϟpW -G;q+VrE!@˖-C#dkHcI Ew5!`EkB!:&gt;YW!rCB&lt;u/ -!DNOlXtB)lQtB)ȺB&#x27;BIooowwwQ!D-mlKMmJQ(ByVM[Kav[ﴒD۾cσ fngV kvs.#ı.-D/Ĉbpp0u(YMCI&quot;X8F^`&gt;i)V*HggϴҁmMvYdva.{#ᯍCf+Hk|lŋ!QpE麟 X PĆd{Hi]wzOkOt7Jz}H -GH nU)Զ Vf}E#6&quot; [#mQb`RQucpW@HޱuH40$L نqW0}l?`r1Mqxo] -ֵݬ5p`غ()wAl6&amp;0 -+D&quot;5&lt;+gš -| 0rBVkl68弮?8&lt;f wWT&quot;a&lt;0 RmO -X8bIB{1o]Oq.uZcHwWT&quot;3 %-s6Ck27ySϾ x/+GBڵkaBg+o֭ȗ]&quot; ןF=V׈7r_p~&lt;BD, -RBVo~XEXYvy.&amp;nQ\Hu+B48gB4FuWͅDZWKB!Z+y&quot; -!DDZwu#Mu+/$!ho -G!ڛ8B9B䉬+yiݞE#m+y&quot; -!DȺB&#x27;B䉬+y| -6B7RBe]!(򯕢BN֝tvQ!DFQ!D -!Dh^W!]fyQ&lt;v|x=EG!Z%&amp;6(Dے8x.lhӧϤ+C_m@g]X׵3GWv!%NM[4OoD ;j } &quot;ԌF-hgCPTj]&lt; -tnmY ,Z[!=NuWjgXKa%+J;5ż.Rߒ `_u#Vo}&gt;RF]- ͓Xpce/l 2xIsq9`v]i6&lt;=*؄tA뺭=/H)!ѺvbWyB0 @(;8宀aϨ!jEg3h)k`+WVxq`@6b4.xIW\6-,cLpM@+s.,sR&quot;U - -c\Ag.Vk8y&quot;uj#WlVoq!KvGWD6ܬQSm)V#ٌ´kCpCg&#x27;Z78 #MqXքP!6jn~&#x27;EI(ܺmuQ;~s?9H\AK3v;Li]5܀u{NJ;HZc˺,V$YWֵ2y3J(͌h `xѺ.4kpmܲzƬ sR&lt;8(z}=zg4QVu~KMF%Z(&lt;h,W/)fBIz_L)#9C;t~=ڽ2#ae܅3( -%ӆ_qp x_a&lt;)}USM5FXGlM= -/ mIu6-36xwGthhVDDFFN?@`B=w&quot;Ů^s,Κ[EXfUztjd(Ճ3Og_X\A%^PXf]h-Ɩ6מsTIQxjNkբUVtB4YWNkyW~Ⱥ&lt;ش9&#x27;8hަ+љέB zkBt -Pc|с!D_nܸe3oB?gΜٴiӖ-[N8Qt,B[P;._G!D;se/~37&gt;\tDB9r={\r+_m /B.]:|Ν;ڵk탃6l&gt;}_|QtB1HSHjfw޽o߾Q ~;y=&amp;7vww[nڵO&lt;fMW/gN`υՋT*sRWȝ3yƒ &gt;0c^eɕ9 XO W̮T͘&amp;ÿ#}s&#x27;ͮLZV$ΪTfaU.&amp;޿_X~?VIh%˽)˲tĒCĎG%_te?$/J -HSHu۶m@wϞ==] -endstream -endobj -40 0 obj -&lt;&lt;/Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 5274&gt;&gt; -stream -xۏ՞_3 Ў&gt;GE0!@&lt;#!8@覡QAD/ЇIxN:&quot;!&lt;DxQ63_{XYeUTvjתZUk}jժ---~Ǐ;[ڡC/^Z0E{{oI`hsxxj`_6؛kעX8ϙ5kࡇ; *NpI&#x27;㎘aL:::P8,)WVNu,IL惃 j`T\hQ; -!cC m -0g&lt;x&quot;Nz?f!&#x27;N;}2*ܹsoIB!2@.]C, ~G -NZtBр@,d 3ƒBFl!nahhH\!+{w7B4&gt;ѣGosB4&gt;syW BiӊD!֝5kֶm|&#x27;N|!DP=Μ95\100kݛnܹs??\&quot;3H3g6nܘOU$Zw駟n192q|*o&gt;u.^Xt̯nݺ}Qwnnp;Sy -K___uQϟh6mڔ8+ -mmm -M0a;St[«*guE!Æ&amp;xgϞ--fӨryV~Y_H3suttc!gϞ(7(/?&gt;]5N[Z`{7 g$w}owMJb~-D¥Krh@KW!Zsc3*ߎ&amp;Z7Tuj:EcѺ6Yʺ,fW$Ϻ/RhRuqXj.O&gt;S&quot;!###W_ --u⋪֗u}&#x27;Q7H3YwfW.x#4)uƂ/#s1croYWd᭻zФ$MҔׅry,-[|g:\͛ǨYToVJflC٬[(wIntuuAgv :2.*?/2YT϶lb/W,LRYOӠ]v&amp;%˗9d?eKbӧOn3W&lt;r2KдRcz&amp; -!&lt;h.0#wazk\bwP!]`*ty`\[yW؇P106_!ylL.j$Cܛu?s#^oA===I gj|W0yu!a_zp`&#x27;%ѳKYMx_/a+ۺ-TáQꈮCבaF24B#@ - ͼ#|BGya`6FSIR9cUE٬;x\QC={&amp;%GLtwXߧIq.HkeXڣ -f:^ +c`leo &amp;{Hx&amp;e׭Xo&amp;.oNF ;}8.2C -F\Frrp;G%º숚03Z-F,cSiOn]3ouĝR&amp;&lt;=8p暂C!K-s9 i -rrF&gt;&gt;!Bbr&quot;GQ+wD3-aGh+rF}] @/v.MuEȺa :Cd]3h~n[wpĉ瞢[h.n9ם0aBIXQN}ќ9uEn8s hl ݝ;w;x )WގJㄈcGMM!(wǎEG!BfAB&lt;u&quot;OܵkB4 [n-: -!hz{{e]! -YW!]bEQ!D-EJBDк)ruPr3_!RLre&#x27;&quot;4 =aG&quot;E.`SW\:08 - 5e) baK#^_!;&amp;nEkGB&amp;Yn퓎|BHHBDкoO,(ʕQVzQs[ --rP&amp;&lt;p+*Bwۺ?䕂A2Cd=f)( -=PSs,FY0xG&quot;ֵ&#x27;әa0-d6kL?6R% -{D;$aD8du((uMvRƂšni{_5׎&amp; !ؼy󖧗8Vp054a耀Y-hpq];BwQ82b]{5/Xj_ \bD% !uuں{FR3^Y:Dm]GQ$.ĕºr ʍQ]oaKU5Zk$j_aDᶮ&quot;&quot;[tW.@8a,cmwHͨog[9u[oI:L,7=\,/,0* 7 9ˇeΚ=$e-!D=.#+ye%ZBa -!D=nOO+ Ժ= -G!(BtZ7? !H+y&quot; -!DȺB&#x27;QuJ!u&quot;Od]!ȓߦɺBQu#MuY#F&quot;OQBYW!Ĩomdo@Qk&#x27;qZQzq÷0ֺ~Afw:yTM캧Oq?g^,1o9&amp;Б wh*Ǟ0 ;%rgXĵA9tU ZC@ -&lt;Sm5`)@DmYBΚ=$={:kȟ_~^((Z=|\Ւ|3Qt $診Ƹ.|1~yk8UHW -B9ذ/)[7rd(6uGpuQapчXϗyY΄_Yf{xLq$ŖCTl8Yp2wG }JА o/ - -pI -tyIB AysaL5./GAUUly +bKn)yrs0. -QruYa8 -l&amp;_5f h9o*AQ8UB5Lh2*WbČgLgN9G64a`/hy -}\QrT%Ae&gt;Y YΗۺQa,LK1%l쑍&#x27;uMdLfk3I2޲1f扽`׈9||xr` 6^frlɒao~yH:r q\8 *Wu+aݨEh&#x27;)&#x27;uW[D:`W:Yp 4Z:*G%%!h]{~QqcB0 O IQPP -i}G |rt&quot;**bLrTT -nvcKqXw8fPu쯼LQr&#x27;boIIĮOrgJOKbx{N~Vfsrr -V8RY7x*vUefeۓ޲K]k?ie=(ɈcBa}V;`7U(h{ڂ,(|[JO: -q\QaP2TbW# Z=«dT.2,Z70j*v,V\&lt;aŮ}]yU&lt; VniJD) -6aC/9}ïɠgz\} *zºUXG|UtVW`4ˊ(]۴*m{2D1|~(Iw14i}w&amp;yfbv|/D+(t`gS_O^2a=[Pr]P*j!E{b2:_Q;yi,s 5G( -nV -Qf(M+5YW4&#x27;fo(w֭5V%njΚ=G EG!7D!o#N&lt;^t,B:ujǎ-eE&quot;￿sξ3/:!hd.\m6(?=uy !D#/;00088/T_]t\Bh?=ܾ}ܡ_V=32=s\a -!ĵ7|sɑu{?p{Y-cWo|z{{?{u3&lt;?W.|zϋ{:}\p.~ւ&#x27;L}%k,w,`5`ҩN]ʂ5dֹShZpfjVj{k[u5gk)WySNY}i7ʔ?-jk_D=ychƊk]2V&#x27;cqt8Yį*o&#x27;\~ƍ!Uu @h -endstream -endobj -41 0 obj -&lt;&lt;/Type/Page/Parent 2 0 R/Resources&lt;&lt;/Font&lt;&lt;/F1 5 0 R/F2 12 0 R/F3 14 0 R/F4 19 0 R/F6 26 0 R/F5 21 0 R/F7 28 0 R&gt;&gt;/ExtGState&lt;&lt;/GS10 10 0 R/GS11 11 0 R&gt;&gt;/XObject&lt;&lt;/Image43 43 0 R/Image44 44 0 R&gt;&gt;/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] &gt;&gt;/MediaBox[ 0 0 595.32 841.92] /Contents 42 0 R/Group&lt;&lt;/Type/Group/S/Transparency/CS/DeviceRGB&gt;&gt;/Tabs/S/StructParents 2&gt;&gt; -endobj -42 0 obj -&lt;&lt;/Filter/FlateDecode/Length 3198&gt;&gt; -stream -x][ܶ~_`-A 6Z nM(4mx$J|wn$5/}ϟo&gt;|~o4ְjTDJFF&gt;/ -=kJ6N(Q=}ӿçůD=J?y#S Cڃ| -GWe@Aqwwj΄sͽL76$I2 ]^&lt; -~wo= -&amp;Q -Kg?&lt;D՘&amp; &lt;]&#x27;IMT#6swToZ\{ͧ 7Q&lt;|qw`^^=djaI!:֟=ۛ(&lt;xnaLDj3^%U&quot;mhccZUiv)AMd|t/H9Apj1 -DFT_+I9ft@&quot;8GËls9Om4&gt;h~rIJ&#x27;}yqcDɯpE -p_f/OQۉ:aЊp[)DT bd/}Pc&lt;fOg&quot;m2RҹB1y`4Xxot8G^% ga.k?`lWYw#Iby..vwcO]9L~l&lt;ؕ_z=2sGLQ_zus,J0(`| s\9WfXWr/L3ǛŝϑI9g3&quot;0Mb -)k ƪ;M3;NwlLU6%Sa5fEC/DS(b2;)21?|%|T@rT+IM&quot;RJ -QlMjYQ #%2xC0csզ;CKcAYDfI]0]Qakp^&amp;P#Ef#Cfcoa-⌻6%gq0@UTW8H] a_d)UbshQN &gt;=0#&lt;m6VaW0Y;}~JwHvO}&lt;49 dA_]c#nQMFNBOcFZv -~FQYΕzC]Я$Һ](* Ua.ʙG锰a zn1#jܔXVPY+= -V1jH&gt;gr;X+ ~6fqW)V}l:Lk;RϫZgjjqyRV$SZ9j!I[R;S,%&quot;&gt;damZq.l BOǽqȅq/zacF C?rU#APHF41PV26d-lOdK$wyM9\}Bfj+-6lEJJ) Va%[ikV*،2&quot;VA%[ZJBe+&gt;.[a9J gP1A@Uf&lt;ZEVٸ(Bs:j)!R6f1\ϩREMUT 4&amp;N%=Ko2ɳUz&gt;_]nRAlU* aKvZl6&#x27;P&gt;Ȗ*$BT^Vي&amp;jR*[a%Brk Ԙl-Va/X]HI&quot;`]&amp;qMVۅUX`enXPي+ V|X@+=P&quot;@uZZu0 L&#x27;do%`vYx;_@X-MSЍPYen -s }RJjTwKIqVamdaXnVيJ*MR*[a%ֵ&#x27;䓣 m;!Ş˻ -lkO/]Q-[7p];y[(0_Qី$w\:|,NneUO&amp;&gt;f]V,VP=&gt;)JV+@P]*saG)fKOwpSDIbJI VrMam$1ka{&#x27;f94O&gt;m8maFj kBiBR1Jֆ1C&lt;nWX-pWB.%Vbu{X^ iX==_W.}Yz|&#x27;:P9_RFpx}9!զr *L&lt;Y/?eͨpWÄ`gR{xR‡&lt;V{X&quot; knVيJTak) [JlŇfw;Pٝ6fw -a]&#x27;%wS1i/-(P$a5YisX,`hI -$TUnw -_Prna%Vr+ojW!d\˽.ܟ kYIt-`EVt-`EVp-=P Up-=` -` -=P &amp;PUa{WYvk9K@q-&#x27;]`p+.b8*.g5aϭLu w,ז&gt;Za%0vV}\)blvZIBe+&gt;6غOY6A2il=!xN?;R3/aMU}k©i: QC,KܛDM^nyygwvq9owjY/Wk -(Xry[2[eי]ԈoJ#2A#ˉWUO:r8$Hqaݳx -kރ~}?(Q6}pRWVARTTF4j` yL=Ka#T-TQ0 N|+cO+:ŗ -iPM|4.y~@@0iw4Q.$-D_ʏɶ -endstream -endobj -43 0 obj -&lt;&lt;/Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 4896&gt;&gt; -stream -xպ?`r&gt;\L&lt;4$c6mv&lt;f#1lG8 s830# Q %4(*_LL=Fi oUΤ.޵֯ZUsر?ѣGyw8+LNNرcbbb={pzOzjrFFFg8z@wlSrvjKvҌz2PÛ7o޶m\K/MMMk7Lo&amp;#s= ,#&quot;޻rݻw&gt;|O&gt;O?s(W׭[w-B4zkGGǁ&gt;cwƌW_}ܹsK!/=̜舄A;99yуXpYrC&amp;&amp;&amp;뮢cBgҥ?~ѱ!D`}mٲ@Uؽ{͛dɒ_رc_ -B;} hڵkӦMuӧO㏿KIDN&lt;~|Nu!;wy뭷~碻hN~駩ٳgs Q8~붷;w)~-s^buq ,Sٳ-Ho暗)D,۷o]UxsguE!x;k֬E/uE!Q7SNEp ryn2==(HN&gt;OVL,JWml̙EwDB;wkMwCmX`or&gt;fbQ}@3FcQI+9YKwCmX&lt;jٺs*Q`ll,GXuj;EsѺvYai(qL]s֍FpuQ&lt;+`THtQwܙ/Z_ --7Ⱥ&quot; m{.utP.x -i-&lt;sUWcTXQf͚5EYo\fQnp„3Ei4vasEobiooN9v :ĉSSS_.-2zBS&amp;rK -fݏ&gt;˝&amp;2Q% -eݚMr~s,u/\aL&quot;.[BPH.^&quot;d99XH)i0S-_t|-SMA\U6L3*wa * -L֡rI{+c+&amp;utgalh[y6K!Zgvrrҿyl_x1u󡹟rW^(uyO|Va`{t!a |]zpLG!%^3,9&amp;k]zJ/9*(;[.Xg2-P - -q+LsK͘J.0Mh]X(uD!uvHf0ɮ9HrM3zV cYeq6ĺ# $1VKҒ9V\FKrE -r~1uϗ&amp;.oE1tާƚ\)ZY729ֺBC r`֭xQy,xк`^T (˸nyR7uyqjC%lWp]dC -&amp;.ܺ\8Q.Q{\; -,+-^iC\rP&gt;8 -7P,=јG&lt;%]X -S4ܺؑou; -&lt;GbypֆsYe0r8pMk3Z7Y-h*[#BuE\WeBɺ&quot;gd] -˺AuE+-!DNȺB&#x27;B ]tB*t): -!h܎BVaÆ -}}}EG!B_BVAB&lt;(:zlyƏPQ[.x - n-CXjlj|5H_}u鵋 oṉh%wCk{H -qкw -a$kf&#x27;j_ -4!KBhIr)310 -W4 dY7 -ɽn Z!l`ctWMh̔𖝑|نĮX&gt;,`A6 Ͽ/_? kVr[||lŋ!QّP -bkUMkCFnFՒк -r{ .r)/ZVOK`0*j[ŴʖWT0b[#@u1=&gt;~R0HB[pZ][L3  X!DlN -w,&quot;0-dF]C `ykR pEiXi0To]ֈ@ -5d؝Joo=Y?PJjFÈS`뺻pWyCW~0+Dj`ݹgEe]䜘,+K&#x27;} #օRXrsWyC10y~hV~/YzV^tjLt2ڗ&#x27;BQk)&quot;XnJr eƆjkb&quot;I8_&amp;0ֽVuSέ(:Sb/c0* ?9˛e{}?ĺ cFnm}Ee@M=0 .TZg+w-;An&gt;3QgxCWS oBn~|9@5TOy2r4!RpL`fuBCB&lt;BԃP !Du&quot;Od]!ȓPnܸQBze]PH&lt;BȺB&#x27;Q*&quot;!hrd]!YW!$Ժ]eG!YW!DB&lt;u&quot;O;B47]P!!Ds|.Zuʋ#MfhݕB ~(Uu&quot;O`ݥmEG!iBsպ&amp;9&gt;N# }hzdt(j7!^?pl*T(H -hϺ&lt;! n:~|թ.Z&#x27;1ǖ%woy#Kf -Ԏ@W|( -kroR/&gt;ΰyFuŕEWWW׺Nlޘƫ~T!Xb[v@-a -0p``ux.lp~UBa;DTdl.!ԛ 3%4@I:^5?T6pM@&amp;&lt;X3^vY&lt;h5Xc&#x27;[Z`9·}G3&gt;ђU(˕Q NM&lt;#A;焆 h[9A5[FTlm%4H}-ln n(!DF-&quot;]eC.H7Zb( -L= N{#㬦d\ -Dh$X0y vkCSD?@zPNjG,Uc]L3NJnِlx[_d4R&quot;s @Y$&amp;{kBRE;)_  -eո!l^5=VV=:Fxę&amp;.k wN&lt;th&quot;٭ko]GiGd]&amp;7)]a`/GҺP]BI2g+kwCnNg) -CG&lt;bhX5uձS7upB_[^§\w@2UnPL6V=V21[ƫlT}YY7@uS/ ϰ%ԺvnTe]k+n(!D]k3xv4HQ,WpѺ.I`,+r ^j&lt;ꑶTIq-&amp;&amp; -xig&amp;nf;^M{7blw[YNZi|EmX{kw6S;\ -nTK[f|8^n-!D(B -Pnwww}Wt B@PgeV!@Ç.:!h~y(wttٳE# 4 BcccCCC{-:&quot;!hfۇDw||_ܺuk__7B4gΜ`Yݾ}mFFF;;;?B\@) - @ccc;v@;::e˖ׯ]g}r5^zyıq&lt;VOl+BC?2l{~ -o-endstream -endobj -44 0 obj -&lt;&lt;/Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 4769&gt;&gt; -stream -xۏELbKb`1&#x27;7kxe](ganABH$Q21jĄ1ᗲ/}39u&gt;]UW_}_~~W_ymWؓK])Ddtv9ċԆPiwd!BP(D -BP44 ~(xŊ˖-[ !(-BP+ RgwqGa -!DӀZ!Xhr!a:.!h2,d ~+]r;bŊBBGE!d :tHO,!D @PD!z~!˖K.z?o(-/D՞ -.^XuM_~}iu^j$}V(Epŋ=oy - -&amp;(6 |dd(zg}yYWTǺs}뭷nW8|0\_MΜ9Su[ɓ&#x27;Qʬnm_H*3sέ]6+/OqlҜ9snx_C֭-]w]H*3~7vevbXիI$ -.]TB --Y裏TS8{sVк|M[˺!A+ʌn֝Mŕ ~&gt;6)u3&gt;k֬{S\B7t+l&gt;źYRP.x2Oݼ˗[xfٸ&lt; -?֭[WUojfEe\):NݬmjNohځؓ&#x27;O9r/UM(^^er+U3~駛7ov-VLIiP5kb2Zʕ+F Kre..&quot;K,a_B[4m$-4̒ -[AWSh0[ m\rce c9+al([&lt;m[$vo澝MxCroѺve&gt;0= -^({GRb%Z[m%2A+qfŕ -F#]GjT F#+M,WkweH܋Xi8{ź3 vbje&#x27;c -m$KƝˍ\kYw5J@ñI٭{93 ŵnVⰞ}J !al -&quot;ucɩug3 ,L/x݈&gt;+&quot;Z, 1l۶ -ؤ&quot;-I,Ԧ((JFp]dS -&amp;.C3 ?u9qң`]vDq-7gYj&quot;N`IpvoVD٨u,۩oIǮLkv -F -,my)z7g.d 7ֺHA)C τÙX/.\]2L3fwprA&gt; !J(bz~#yD); uc:7%V[A0vTd] nM-6k8)2&quot;^`, 6iYW4u?}d]Q ^`4 6I%#^`dddI(YWnl_w޼ywygխP7|sM@Iܹs&lt;c%sv!&#x27;j]rQ1:|խPNBwWf$`mݶzj)WTĻrJTBƿ40[uSB^ݺukQ!D044$ -!DiȺBQ&amp;B ;88XuB+@UG!¦MB!zYW!Jc8(WrGGGB!zMQtG\xˢQ%u^Z-cSs~6&gt;ѹ`&gt;VVQt;&amp;v?#!IOYKEmĚd..\j ;fٲ8IǪ&lt;$BO Yo!^lh! -CbѺ9ruPe6}y`o A&gt;0&amp;Edwo&lt;b;b\D&#x27;F\$._{G#/Sf+{k.X/·&quot;D#wA!Qu%P˄3ulIpѺ6TLp׎%ZW+Pgc%E#4b3[yDy` ,&quot;]Xg&quot;պǿOFYgI&amp;aZvLC~~kV枕&quot;e0ߺ&lt;#pׄ2t -qo]^I -! -3 Q͆FM;!` -8F# OEݸǺxАg1;ɺsbX,L差&#x27;$[va]ݸJuMzlL\ -u+uh-7Iұ&lt;Ho]&quot;[W[ -Tf Rmq9 ]&gt;^u壞ν(:oGeEұ&lt;&amp;Ǔ!xyޥ=Nx2--u[\l =Պ{{x4 ? a~rr[B&#x27;}r,Sv@J@heuB#Ѻ+7UB4$.{R_BkJBf# -!DȺBQ&amp;ݲe+ ɺxȺBQ&amp;Iݼys!DÑuLd]!(Xn&quot;!h8B+e&quot; -!DȺBQ&amp;BIr*G!MuWɺBb3;{&#x27;+G!z+VUB -B 0!DI TB -P_u$zY7wM]u3C?EXb]+q&quot;UG!f63 f{񠑎m&gt;}l 7i#Z73ܰxɽH߾MX=gYrF&gt;B2XD^&lt;X$K&#x27;v/ʺ8MCKA]4ҽxr Q R۰gٶ%Rau -Kq۳tD\9w]VoUv;r}]\2&amp;t*(ٺw[Wlxg]^yY -d]QXm -fc[S\( _;rԒ\7[&quot;QdxI NĒE㞂(d‘8:. -\%rCG=a%&amp;&quot;g8XJ-ɐ)(p`$[X&#x27;&gt;ٔUlM=J_4ֵ?Mjo75j;)2[: ]C1KI-(K --8&quot;F_+DAȺ,+9y~V,)Oēaxs7*^kv]ܤDD(n]{:*d|}D Ri? -:f#u[&lt;L0v!ꉶuqRk-nƹ J[rrYr}!jV5tcl乭4Й[v.t&amp;Q6bp+|Moa6^Pbk-2[8wAֵ:[3n=5 7x-7-&gt;-rFs1v.MʰumTйegF(-hCG - -kx5h]oE+ȺBQ&amp;B e˖g+ -!D,[B!z(wpp￯:!h&gt;-;::zD7[!d;66m۶ǏWB4{ʝpB!Df![(w׮]:&quot;!h2BGw/Ν;!o긄i?f![(wϞ=/;FFFB -D -BP(4k׮{۷=މ^xa|||ppƍ6lxꩧg֧o/+zYiD*//b&lt;&quot;`e{KjCfo~/J -HSHj`хlm&gt; -endstream -endobj -45 0 obj -&lt;&lt;/Type/Page/Parent 2 0 R/Resources&lt;&lt;/Font&lt;&lt;/F1 5 0 R/F2 12 0 R/F3 14 0 R/F4 19 0 R/F6 26 0 R/F5 21 0 R/F7 28 0 R&gt;&gt;/ExtGState&lt;&lt;/GS10 10 0 R/GS11 11 0 R&gt;&gt;/XObject&lt;&lt;/Image47 47 0 R/Image48 48 0 R&gt;&gt;/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] &gt;&gt;/MediaBox[ 0 0 595.32 841.92] /Contents 46 0 R/Group&lt;&lt;/Type/Group/S/Transparency/CS/DeviceRGB&gt;&gt;/Tabs/S/StructParents 3&gt;&gt; -endobj -46 0 obj -&lt;&lt;/Filter/FlateDecode/Length 2588&gt;&gt; -stream -x\[~Џ Ás8dC;acl:f!?Ut}d5g gNTT*{_oN/&gt;~wp:?k -蠜&quot;V2ۛ0|9?ݧ,J6N(Q= -soo~yPRG᳇N=Ewɇp*-s{oCQkh/;IQ*ջsxI? -I{JDź4/c}*Nޖ;n%@ -͘/ca&quot;Gx qM(mw6Ӊ&amp;lMS&quot;(#T\u-Kb$-7p&#x27;[ - - -rpoQAk?6Ω8rJ8-Gp2(9( &gt;pݗ?R#.P3[nDfKŤAj!&#x27;Ъϳ$fIK4%BQeǍ!Hjsf~b6pMgBU=q-/@uڸ 5DڰsjjM3WMEXXNdRЦPSm:.ĊѦ&quot;2mDWdi[]6h1a -cٕFI\2čiSXDžVXo[U mcQQS[H&quot;fCعHa~XfE(q kם搞 -NTSm:&amp;Gq\/_N }h19*%z!`M:miAjM m -5ѦcrT*C6k/xϕC NQ m -5ѦcVTbzB:aPj3[ǬEV+F:f%D\1_wʝR9Jvc*ed*jL dȮgZ&lt;!i0E&#x27; -p09щt{d󔶳gm656vgSjJocf$דd,t8vŘBZ,!: -uD|%Z&amp;z&#x27;rrZBV;tkP%?6^&lt;d:yE9 -BܶyZf)1gS7,$5YcIHڙ361#&#x27;,2J8gRR%:&amp;rgD9%63uLFњtW); .B&lt;&amp;9e|m(|Dv748W$SL8CiW&#x27;XY|zӰA:;Єo$xh1ií!.#&#x27;-޼F3([q%@[ -~BR dD7e(w+㓙 IM[f0 K8=pq 9f!{.+xfEOj21{Ǖ zyM|eNs^AWXL1%&#x27;A=C IM]Rfls -&gt;$z^HN[pRaZ&quot;jGg&gt;_6Ъ, L:}(ajwMdǫ(ߙ-{tFnM52|6Khc\b#8 -.- ^m%Q|^-endstream -endobj -47 0 obj -&lt;&lt;/Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 5212&gt;&gt; -stream -xUHhO&lt;Q 4Ig|A8sL M7&amp;v- -=!&quot;%-~15h!c&lt;X΢.֮ڻjw痝mVZzkU}ÿ/֯}ڋGҥ=]Nv&gt;p|;YK|]&lt;:q,%7n6;6]=6k;zhƵ7dcXDPag -t1dT+(NĪ|m5#hExMrLg};qċ/sssgϞ?#|cn͛7w}z -!HSH&gt;s 4K=}-^WVBԍ+Wڵ륗^z ^|C(:.!3,d ~#B:@O޼ys!DlSN{U&quot;r{{{E!d 9r@[r}\n /;|&quot;DЄpw޻ᄏ-\N禛nڵkŋ&gt;0hH_KiBt -Pn__{W^yᆱzߞ&lt;yr4x!*=xc+WT5Eo^ZZܩڵk6N)˗W^hHoSL܉*WEsΒd]Q C-[/WEp 42+*M׽/\Pu_¹sln2;;)H.^ux9 -QoO&gt;du,YRuG]ĕ+W.]CX`;3^BT W_EěX;99Xcݟ9D0O?.+-_&gt;U__11-&quot; -:̺V,-ӬX&#x27;[-p)xë͚XUcQna}wDaDtu[4퉐*O^v0US6;w)&quot;f&#x27;OD_^(AF~&quot;L( n -XaW yb(4&lt;T.v932Ӕ0gX7!i -n$r:y&quot;+iֺh@~̸u?c#^Lrrcs]&gt;Sz*U7 l^]uaBU&lt;xGϔ2Ex_/a)ۺ-(͂ॡrxܒ_Iۊ庉R Lw= 9:THFt ʹ]h\yl0/O~O&quot;T[dy! x6&gt;Gdõ4뮘+Z;0&gt;Xoݫ!a0)Iw}i86R7$99#dA&amp;&amp;gZU0ӋbLsuc]{IYvuWЕaAB -0$֛&gt;ͩ&quot;(asar 52UĺX9A źLD9W\{6aGh9cN8)DD:ӺBXw@۪`ʴ(|h&lt;_-Od] -$V- zn[MYWTBJuE(-;&gt;&gt;n{衇\Q -[mD,CjB-@UG!hHQ!D -!D -!Di4BnaDBu4d]!(FHQ!Dhluʱ§@Z-P 2Uu ͱfYד Jض#c3&gt;5 B?mI0&gt;ú8_8 8&#x27;Rb|U]¾m]T79e+̂X_bg.s,A;N;so#tɲxwh9\! -;P`NwonLe2Hk{h0`l;p`N܌XɊl$iafwxKqf/baI.a_c ;^8 ZåO~Pc_af_㸷; Ƕ6.&gt;+܎;P`_61p9?֜8{2`O陥׮%Nt46G݁G&gt;3DoֵKKr!4-nt͂ih6v&amp;ƖcSy9vߤi0_ȶ#x76kVF~G{#H/3p6;0OFvp0gcDxt$߈?_+rK=Ggk&amp;ݱshԎF&quot;n&amp;^|ʽUu0 H -H[&#x27;~ &gt;HN3R9# #M#~&lt;}^Uu PcM;&#x27;B1|,m[n:HM,Y:Ne;kv:u܍c9ZnoI&#x27;D0hu3o)luz0lfl3Kۖ#BwaH #_nh ;0t8N; ۨ/2tvxڃ# uG{0M0x4Ƥ|UjHӺuZu`K[&gt;f9onoڶm̧iIY`P1Nσai0l( ҟ T袙&gt;Ri;#Lkl}CO|o@Aǵkq,̜q-K/ӃxdpoaXۺ|ʕx*=rک# Gc#ܘis &lt;6uM35}Coe^ h!rFUՏk!L늅a:KS &lt;@ᅮc+m.:/n3g&amp;KHPU(\r7DIPH%Qܮ6ƏEd]!(YW!$Ѻ{uYTBYW!$ͺU#5GB2uL;RE8BQsd]!(YW!DB2uLd]!(ݽ{w%!DI*e]!h2+e;([uLd]!(YW!DB2)ߺڴ7ܢWO?&quot;$|~e#/B&#x27;Ӻ430U-vuxf{6];6s;к~za_v`~&quot;u`.1 -C;|_D6ȟ5.`r˧Ӭ ҷ/C -ѢqڀB|ˎL5̺\PriHjSi`&quot;W!D&gt;|z&lt;2g2BuY,v8-0`Y*Xð&lt;bs -#1{wA c]˱!ܼqJ8xp?yF:m !ӺdЌu1 -qK;,Bd=|e -b( &#x27;kaanM -r%F@MNM$Cdln1M÷G8&gt;V+ȍuP0uXN%]ؙcZ[݁HEd[&#x27;WGN`-mb[7&gt;IPy0ax&amp;6{‹qHJ ̫[)Z[ބ=Ä9#{/uiN32#C -9 -1o޼ -Q2KVL.:xrffuu -4󶀙?mbq&quot;O Fvly&#x27;PQ -j&amp;fƺFwSֵo)MaHܻLCf;h\0706^AS# 8?TbH%ӔuǨy/8,y|kf gU|e&lt;&quot;iO`vXBF BFq4&gt;·^KI[}J9G|X!ʧ)23OQNZu͛W9؛Ü\gc|˦o&quot;owi3Yx&gt;|,69 Gc=4!EZeDޘBt!nip~&#x27;BdvY볖 X@{::`OHQ!D- -}U&quot;rM!h;ؙ3gE!믿NMM -_|p@-{ǏWBԙSO=u}Ayq !Dݸt BP#G:499ݻw}U) :TF&gt;|駟~gNMM8p`ttthhh׮];vxz=۳Vlvs?YNQ&#x27;dP;*Ɩbl^&quot;&lt;eP=$#Qf7tbzd/J -HSHj`BP-endstream -endobj -48 0 obj -&lt;&lt;/Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 5422&gt;&gt; -stream -xUEH&amp;YhK\12kdqB2.Cuxh7miy٨QQP| dlLL{rwOR:uϹ˽&#x27;&#x27;7VթV|NSN}G|ɓ&#x27;yW^y_&lt;zC6o޼80=v+{se9001wܧC - -=UfٲeD!ټy-ʬZ -YE 2DKӜu]{CZ[n&lt; BFpd4&lt;#1ͅ;Zz!+;p{6)6+drJ|clۃ($ضmn+.[{c#h&lt; - $e&gt;|&lt;a88ҾHlYvd#O;nڲ??ܿQa#$|ۑ@&quot;=r -QӦMc_H޸hѢnmB @H!UH+g K/wYBh@Z!ӧO?}d?v-BR]Bȴ=Ȓz ޯ\!)f:_N8rʢBgV/?hѢmB&gt;|v,!Dz]8phCYXĄOʅ ˧NL 8q⩧kÅ7oٷo;7y…, toܹst!$֝_1?&gt;k֬|:&gt;;ttt\|)yӦMy!%.4A)K.͛7Qk qUSDg&quot;wYps^gBp̙3_{Ǣh^xt&lt;;TW0ldM7tǢhΞ=.g-… k׮ -#QS3f=Eqo1]7NTn{p&quot;*OK|M@x#]룺k# /Ø --فAfM2F5ꖦ&quot;:Sݏ?&gt;LcRݪM궴DFyիWeeQݳgE:͟?1O`h# -_RR(|bTEqC! D,Ua5-,uA4Ƨ%s^ -\zSS+U&amp;^)wGu%ᜆST FJ&amp;`x̨DյWvW7kQ_e:T]Z&amp;EBD0::Qu#uKN],P(f䚧Yj0bK4ZYTs14QQ]:LlQYȵkg?W W0⌔p@ ̶&#x27;S+Duɨ]imWF5_`qVtloӘ S.N̻&quot;V]㊇ 2b[Z.eͼMkU7Y-T߾fI(o[[:!{o7fT&amp;Th+YظqTW!rLV!D B&lt;^h+Yhkk۱cGV!D+B܀vvvmB4 pt!E[!͂T9rXGW/ -˦[M|m&quot;=== -hkunV$%Kr -/@u&#x27;,z`pۋDSƑc?p&amp;ƛHvZyYׅx^M(&quot; [xX5E%ǑO&quot; -͛*&lt;y+e_.T]t&lt;@O̙}&#x27;evʺ.T#+\YcoTu{+XІHꇇd\jGcgVt-VT੺)rzRuчqaDbUaƑ}#$HAU1TݼWiz{,on&amp;;&quot; -,+{i08j!B&gt;a,mF$ڳ]̛! 5xHMx+Cq}Vn - -y#fUGuoVhu6Á-tu*nA6.IT]{y!&#x27;K7JSˀĄ85 t^U*&amp;sl&amp;6wYqpx-#3 L5x7^_uoe928E_0gr4G:}؄y48:v@&#x27;I\_e \u- Uۤt -AS-uTnOAP$$F)&lt;k2&amp;XRh^9:R^*#R).]GԪ748&#x27;yŕV]HuS_6U[Y 5;vfsŨno}Ŏ氰TMl^&quot;WhYtQ/eS]=*fqe9,t(% -CwCpR붰+ \cxaf8⚗.XP&amp;|08\#%P -g_= \)T݁nYN?9N`OW~pN/no\Y pVķi6TjQ/Yơgai3 - -w6~]&#x27;W-pKeߖM#\ma\gsX3*}Ӽ]\z5&gt;8lΤ .[:\ D&#x27;3lꖜ;R4Tj-MV[q21F»ܘZĹ%g&amp;α@&gt;A\gg8Ts,yS\ߦZ&amp;zaKE uQ!S}EF26V;&gt;1us5㬿 qU=B4 x(嬹Y -Q#rC_ AB&#x27;q^=BDmܿBH.S=BHu&quot;OTw#MرC+@+y===R]!R]!BTW!D+y&quot;B&lt;&gt;P&#x27;|{oR]!]+y-Bܐ -!DHu&quot;OB&#x27;R]!ȓUmͳD7o9dr7TtIT]ޱ ~@RXW&#x27;a̼ :zQ#GUty矟ߴy+jd nyĠ*Ds_&quot; o_Lu!P0&amp;ԛB`lcSCxKkVmMB䀏r SLuayT]&quot;lqѮ,/0Om͍wTVuHY*0gJS@zѶ#L(H -ayXA -3Dqv=pQ¨.jpɻjLvA2e|PodB,;@&quot;&lt;U&quot;YDuq!-2CvQ/@!̠U!\d,n -3I&#x27;Q&lt;EE솢GQcC`m]k&gt;,1E!rSuKe.3O -7; -c{zTg&quot;Pʬ‡{n@l -4* H(a&lt;O\XFlW&gt;tۏ &lt;I௺kͮvvbXR*ZaO)&lt;0B̂]t`I;!f -,B&lt;e^&amp;+jF.x -e&amp;1WDøyuفfv ƿi+*wԬKdyg0pQq᯺qj{]Sl -WPPݸ%B^b5+ Z%c\CE+ Hi4?*jyAHu9&#x27;5GLB5/7q0/4^$mZd| -Fu)(Q۲[4 ĸfׇ]boXMdb^ϱKSXمyR҅3k\&amp;qV]uj]RG~V}瘽4j3{s\kjaR[[n;]&lt; -\@|l ![eЛhfɑ֚7ޜ_UeQ [6M`ǎR]! -W_}U!B|׽===|IѶ!Ds̙I_!jo=44xb!D#s%xcccý&lt;L !D#sѝٵkWwwcǾˢBFŋٳ;00sNhӧA!2!BT!ؽ{۷wlooߺu-[v-dIs_xI&amp;,l[1kh[?߷dM}$mX}ݒYxu=$q Q0tb%:ITB&lt;!R)D -;11qСk, -endstream -endobj -49 0 obj -&lt;&lt;/Author(Amit Dutta) /Creator(-endobj -57 0 obj -&lt;&lt;/Type/ObjStm/N 216/First 1899/Filter/FlateDecode/Length 2566&gt;&gt; -stream -xn;L~ ˆaXBB$!sűǖDYxT#g.%-T$dAKSER RkRT[R^=e)AԨdfKj$::ZOitI.]YzaQZ*&gt;RIiW$i$9ӎ(a(R8]-zҎzKv\Π -``Z, 8˰`A;1ZXWPT͸csf,Ռ;;6KN+Ÿzٱ FHRt18nA݇taqbYd3RT͸&#x27;Ud]* -D È-W֞\^lb9lXRc,CY-&gt;-4;dPo.b{OBKն6r*7&lt;n 2T1AAFQlϥ*;BmCSP -#Nc/”(\;KYj!^!3oJS3:Uڕn1dK7iWF1lk 7_hWf@39mI4;$0 ɡfv.m -ـdl¿Zle -+cܰbB.NnxU%:%X.8U0e5)ӌAPIÒe姑d!nʉa¹@ KMb,!Vg, -fJ%Ӫe-ZoV`KV13n)nՉ[-N}2 -8.uKҷ-p4Ap-O5o+ۜ&quot;,H $ƒDPG@D@D@D@&quot;4BF!B#Dh&quot;=D_Λ`ˏm@i[&quot;dByχ›|J|Z|FdBY_9E` -A&quot;&lt;HezD@D@D@D!B#Dh&quot;4BF!&quot;G&quot;r-=e{&gt; /gkpxj}mmϕXɳiu:d6ӯl{2cυ`5}ec%k3UTSO&gt;UTSeL1UTSeL1UTSeL1U!يVoۋۉDž Dž ׁ ׃eˮ]/^vzeˮW\^qzT{&quot;d䊣+ή= 2[׫4ۃ u=Zlqg[nq[pqšXdqQ~fqyZhqřZjqŹs -5k8p\ùs -zz9s9`l]?8p| -7o8Г| -7o8p| -7o8p| -7o8p| -7o8p| -7oxycfr8wO_ߤFiXϡ&lt;en}hT\&#x27;j]#{7Oiqf.&lt;po?gg}o}8&gt;&amp;yrpz症W.]^W٥٫&#x27;rYvl/^nַѻSQL&#x27;*`O&gt;r{_&gt;o?zvY:ߟdqΗӹѭ˭1&gt;{|=sfgyy!?CΡz&gt;|+cum&#x27;њ -endstream -endobj -110 0 obj -&lt;&lt;/O/Layout/Placement/Block/BBox 111 0 R&gt;&gt; -endobj -111 0 obj -[ 73.5 150.39 324.73 212.39] -endobj -114 0 obj -&lt;&lt;/O/Layout/Placement/Block/BBox 115 0 R&gt;&gt; -endobj -115 0 obj -[ 73.5 83.456 324.65 145.4] -endobj -178 0 obj -&lt;&lt;/O/Layout/Placement/Block/BBox 179 0 R&gt;&gt; -endobj -179 0 obj -[ 73.5 533.84 326.15 596.14] -endobj -181 0 obj -&lt;&lt;/O/Layout/Placement/Block/BBox 182 0 R&gt;&gt; -endobj -182 0 obj -[ 72 602.09 323.24 664.09] -endobj -224 0 obj -&lt;&lt;/O/Layout/Placement/Block/BBox 225 0 R&gt;&gt; -endobj -225 0 obj -[ 73.5 145.23 326.15 207.58] -endobj -228 0 obj -&lt;&lt;/O/Layout/Placement/Block/BBox 229 0 R&gt;&gt; -endobj -229 0 obj -[ 73.5 74.094 327.6 136.79] -endobj -277 0 obj -&lt;&lt;/O/Layout/Placement/Block/BBox 278 0 R&gt;&gt; -endobj -278 0 obj -[ 72 151.48 318.55 212.28] -endobj -281 0 obj -&lt;&lt;/O/Layout/Placement/Block/BBox 282 0 R&gt;&gt; -endobj -282 0 obj -[ 72 84.443 318.25 145.19] -endobj -283 0 obj -&lt;&lt;/Filter/FlateDecode/Length 333&gt;&gt; -stream -xRn Cd vJ4i$P~ -&quot;.3hSl %-MKJ軃kK%)_VE\PM Gfjx@ћ`צtyyZPX@^*Z#OK;4`8 ;8Jeĭg;rJܜOߕhЄPSQg&#x27;#^c1N|/}`q(nC9דnPiH.B.a4hѓU #L&gt;,ߢIKQz&#x27;co[i(|XҫN㓍:qV__*89Twzd9 -endstream -endobj -284 0 obj -&lt;&lt;/Filter/FlateDecode/Length 25607/Length1 68972&gt;&gt; -stream -x} xTE{{IowI&#x27;: fe -aİIXG2h1o\Fu -b&quot;Q|: -3h}*~n͇~yͩSUԩSN-! -XI[bnYluN_Rwn\m-薡^T k9`XWCH -/E.c N*0eۡZHiE2$ עZ==[e|a`-):&gt;H(OH!NSJR4ONa)*)IW]-P|юi]D1 $Um/4OExmXLv.+&gt;ߡ1=K&quot;D {C{oQ&gt;5@O ګC oF @&quot;D @&quot;D @&quot;D!g @7C( - Ŀ!~}[s5`m0 2{X\%G_ } ;r?jj(&lt;I 0a~n$\./I)tF+e!Vm{IJ 7?9Z&quot;hGFECR1G#D `:-g9{,sd (PUz -|h b4]o/: -ov90F -`Ű?-=L&amp;j=P$󲷩B+oi3vx߆Q?yT~͌ {a`W;pu?pʕӧeGQ:|XIqgHa&lt;wlWV3a$&#x27;%&amp;X-d6DuZ(0J Y]&gt;rhcU2~O_))d$尤|QHQ0*?^_vdov6}jޫԼ6$Ug׮jUnCTj^T~tG0k?Mʈ 5#)h?Y]OrVs ,e~rCMuј&#x27;UsݪT5U~ڍ}&gt; -n# l;zsnˬ?ki}Xo?aͩKETnj|97u$ηbgf˹66lKj}ĺvnjlMإ*&lt;y^[`띕ζ&gt;N?LYP=\ctS-թݱ9euOlO-YŽ623.Ԝ*suS.zp0 9vcΓyáspCh$?gd__Fz/fIN{9p}veM@&amp;K:&lt;b!BvssyhpN2\*@9%;tԣo[G&gt;dpS ܍~ qsωK]q~Yi&#x27;=/̯꬛&lt;^mݴ+Ja?ЁMa*rEa^h YQzn@èTk/Ɔ(lTrـ+#(_a^t&#x27;C63 -^-@N{m%K=,ew.h 862Be:[&amp;NٰG=i -%W؝=vtZky%/yBu|C -jZ .:)ܑKHSzN@s uair$ 55\&quot;k̇h&amp;ѭ6!X!Fa&gt;GfhS%&amp; =9vBЁHi9b3&quot;SS`Un,H -a Lϣx( - -֞DtpEY$W \YUR_\Ƅk{k­*e#lX#ʈ; jz  v!#މ$U)Ic jjtLB&amp;hAXdۃJXOj)qV3ȣ2T~&lt;laQST(Ù|ω(4&quot;@ x=Q[ 9e‚`&amp;ײ=R,{1Bb_A=&quot;?^D -K9XHQ|?wvD&lt;ʟ;b&quot;,#r=1\G٢;3=R&quot;`c!MG*R &lt; -U;1KQ[=րRT?)p?Rrr=QIVYΖf&gt;})Rg?-X:R 6~v zFOWE4 0H`w -*~: yCۨz/U/Nz&amp;Oo=#=W=p;Ssqj&gt;G+&gt;?և&gt;)`ǡ -]0/ -zpa?dk&gt;u=zlbQ^I?W}PzSx+htMkgl -/`ݬ6D[&lt;qaq w&quot;A&lt;(44hFd(^c2{L8TdǪe6f%%@&gt;_g4Jm&gt;V3MT - -&#x27; )&amp;؜j%&amp;I*p\UDY%ժ[љjd= uE0a85p鑬sG|i!b=ĬpB3հ!Px&#x27;ēZCX_=0B-NWN:O:Qt&lt;db5DMȦLǙW2f4#C2rr 0&gt;a|*xWqVqrqBWv044UNۍڍe7&gt;l76ڍ#(Ng&lt;?UӒ犍bcZq/Eߐk3QJ#RrlW u(,$I❂$Y.CxU詙tFM[iن0)!R[\&#x27;o4$_+HPZy7h+Ei}Փ?CWK&gt;}i@s.(#YXp -򌒋ƑJn&#x27;L$OɣJ -J`$)w!z -V%gw?zJ+d/U\C-@D YdRv7tn --Jk.9*{(^ZHjRMTnUXB2:QJp%}L)9t0$J(dSZ!IWZkhT@V(S(\JRrZUQ&quot;[wQ7erbZb2ngٶOݶ(z N)ۭ䢄bu`Aj[ gǛnFm;[U -ta3Ŷ#&#x27;@ :v_SW@ErW66Vb(f[fkϹζ w`;ֆk֒{WZ|]k%Z+Sc[jdsZ0҃M&gt;JUkÞxe`~:l4m%9,CYuΤEt:NQ@j$N4O5/QOy Q|ǰ:Z7?]Іk q#΁vSoܢuP72V|w !bS -kiK -46Brk*o v_DR޺ - 5EtAMƆ=.I[u#TŠ.D1rbtq1u$ͅpLRf.b*Uݮ -=0eNPL\j&quot;U,u\E=.vyTK0a/8;@%~+lm\4e#̫hDzFDsCo_Ֆmw߰jKo6N[W9UopVۻG7\٣P3AWG8[{&amp;nn -WQ+*쥜=5QU77t렲jVPC_2^j/SHG⺔`p7~#&quot;gWWp.i2XF:R, -JXX3#X}|y׉a -wG[JbrvV^;, U -^oM𻷻q9n&gt;qe?^4E~=e-Iߋ7#&#x27;zˎ,c#ޓ({Yol؀F^zVnV77 7,W+T զnT})&lt;\6 .WtGעr-lSݐzBpN7,/{ýp-Pz-zfd&amp;6 -XðN[I |Paђ6vpˡ# è3jC  $Ԇ!E-=s`=Ս:cNx ^)j%`yh&quot;:pC -t ~{ 88&quot;9Ne7Q_2tz\8Bu!.&quot;kt2f9A-: Gqjc=B7І=pDOI,&quot;2 Gv%4 -l6)Z&amp;-Ͱ | -}$[`rRO0f{YWxZxI8/ZėoO׹B} EI!i4I+YK=QM^%G&#x27;4&amp;;tWzai,UmѶO !w(z0vOTrZ8.~&gt;0N)8s -`4%EIIni ? .yKNh4&#x27;,~Fϳ(dFS;ZxFsJ;tA| Tȋ5W sqR|*h -zA&gt;B^|3q!H(ΧHtm/ęhy8&amp;Fyy s\|ZA鵴 f:n]NHߦѯ,ƲY -:bg\B0VX(*#+9KoSbHsM@6J;T[W۴?Ӿ -1he.rP@Hp/nx-vs:ӟbgFSs!xo -q*Mq?u; e#M!uVTKwħ80$_k4؉&gt;|}ncr0n.&lt; _ÿ=Nvcܭ#dP_I5tf29*Wd;ؿL$RLlBPH7pK0j?\2q=f -&#x27;q W3Aݹ&#x27;p vb$.O5^|Sl;a/,8!+?lCܟRI1jZ qЇPl23C&#x27;p/CB^&#x27;H+x.\oXr;B/+$x0UbK|A|M3nU-;3|^&#x27;OZ1ϰE* ]&gt;3l;p==gpHÕ|C=u0g}9&lt;ͤkB:䢟&amp;&amp;2&gt;{/h;!!ծ&lt;2_A]_= z|&#x27;n(œ OJ\a;Ɔ ҠT|P N -~ jRŒ82 JcPӸՋƓ! 3h[xB -degv&lt;SqSE_]Pm AI:xIq&quot;DŨQyL:,K&amp;$Uv{^  }@Cw~%ӻ &#x27;MO d˸CWt;.$[1Dq.I9ٖLѶh 1hҎNtMM޾SMRwA[(̫ ʽ)$յ㪉ӕ*)Z䉏j5S3בEyY6{JR3#{=ӽ5p7UO@ -GQ,P5RҊD FSVc7QSbcIJyI¶.!)/WoX||:%ï,4 -i1vb&quot;Kl,SL Jf\[]ph(pg_l?AP/l6=gÄqH^1f-|iY/KD&amp;fɽ&lt;0$|oH!4&amp;c q.H@6U8/n2Q\8b斝Wǂy%oJdO$Qm1T,j{&#x27;ZaJZUIܪX $:X36jjeŔ Eٮxn]RېqdR;:b~2^cTڌR`s6?o~Lt%ZJ*j|x8ɗ@K RdցFc -w-Kl||QQ3thrfh^[㓭CEob7O&amp;/++a&lt;G=#J[/3eGh!@@LnOS)eХo !  -kX ]&amp;D-K! -q%?xYC)ygH֢܌x,5ހqn|~tgG7mZsͽڽ)nS1DC~jy*Ց-=Aɠ-Ū_qHel-f.$ӹ݃=;J]q帓|1j`/n~(l6þ!E8&#x27;~aKeڵ`\ ?=&lt;B -g/wHc-SqV#qIV&amp;T1ZԴ V׶攽fS4F { c_HLdfX/EJHu-KI\i}&gt;l[2pJ5]a&amp;+]8@M8|_KuMoZ&lt;#gs͚_|a}_lj봖Yes7@cT#)ʐ VifGΧI{=FJ22NGɐHLK0艞񖸴x˝f&#x27;u[XErṞ&amp;2S qX$tXLT NsFf!$Y23\-njb *&gt;\( S);16-(M 8zu5Im~FY{${.JwiwƾikF.hIdylKklNHl9&quot;@H [@KK!-BMHB%-ZJ݀n斥#P|3#|Ό4|3rҶzo=#I/&#x27;nK{&lt;xijq DrG&quot;k1&lt;K&amp; eP-.WC7]ͮͮo;{loOx߮EZ+mb6:6vV#h9G\Ӹ.B;y,x®p -Gqg/U-URŁoTB~f0oG$uǚͳ778)_l1Y(&amp;rxIĄId Ahr;v`-MJ͐#m0`.28]^&amp;Ε2.I׿s϶_5/o7[;3ǻ UL=\7_iyc?(^45.B-x@DlTcܖ m -oB7ov?&quot;ᶓmKnId.idy -HFIK cFx&lt;xCG$ۢW&lt;!uD≱(b!!QDD[&quot;aZR0JF¼ˌPk[ `۫6l#j#dxmT4\䵆 -!6;?oOWFss?@,CJ`v Zef-x(F48!^S`͒ hK !hRKb-% 55ݙĎ0%v[I4@u?~:EO86}Z픟o/56W}l-Fr[3+W#,;1Qh:,&#x27;Q)=?Y&#x27;_{q۱es^|^J{/cnw.~/58G8fG!÷&#x27;_8GǦ?P/ -Ysa{4bq4bPaS&amp;pU|lH;ysvjо -50A|6 R3Ś% -LqD9# b0e~_G1 !`)E#+84ݱ;l ;*Ţ~ehW -&amp;LhST,WyE\[vZSx2h&amp;v :L~Ϟn!֎jqIfSfšrLl˸x4&#x27;׷d[renܜ}8=Vt U TZζH-T#MG#RTZ&#x27;.GA.Hdr9X6l ^[m,˰6CXj%e-h&lt;`bZ WaU -ԧxF+c[&amp;k6y&quot;_=ѡF)&#x27;&gt;|CaΣ.ʍ W&#x27;yW]ѿe.Cg=YdVO+&#x27;+^7Te&amp;#eq=Hk,I-wvL8,K&lt;%t!q#@&#x27;&amp;I -mjsr&#x27;5XQmB&#x27;G. -=VFG4Y#xFG&gt;@`[k]{HhU}jOߙֹ|Rcxނֳf|ݱ}N%@v&gt;e ^GDyEMf$r&quot;AI|*APi ~9n7ȶ%5K &amp;D!h^9?jb-HT!r 7@CtzkR:MrZxᖓ$t&amp;M1dܝJ+i692, )Îap|8_90mF߶pfk~==޽yS޹EY,R% -i VT&amp;W_^R&amp;&gt;D&amp;\cd}. ,ڌLy+ Ɯo^5ük[k;-OJ1[o\sW!kC\=oo)zo$u MoѵyPԥ P6k=7 aiꧮS?_vyaqBׇ5&amp;z[zzMK&lt;f%G jcԋ&lt;;JM1,,^m-ċ/ bAd\HwPP+o -hFe\4)L55:Mp jX!)bQ-s?K$-fܒL 2I g2ds@3.aq]LOű,1`!)TB8Ԝ΃ ^Bz&quot;)* [c T􋙸 -2~[FyLmг /N|3ZHU4 ;Q{}6v-ʳc1cd.ȩ`Z?Ֆr&quot;&lt;&#x27;qpk&quot;k%1qfjM\R.~DG&quot;)xBth7pMnZ8819_$MBϝt?I25.nxr -1Kzlciߦ&lt;w`IhZ.Ir6\rSㆣ -c,%`KFjo&lt;xM{cCtI3]yn2APnoVSb7`2(&lt;bc72bmP=@ U# -EJSêib}e&quot;U+|hwMOhс;&amp; -J&amp;G3ju -bWzb9i9rGqcQRFUlQ*RE5ՓhZ)֫dP7-n;_[Ν&quot;MVkTecДIp.sTI#C*ŊeGQ7wƏ8Tw\[9&quot;IkMF-Woφﻲ;5vfd` -%ԴaA@{]c_Wݵ4~K*]8;ˑ -T+.ģx.d&#x27;&gt;%$!R`F6fxB2 GPCrPߧuLM5iRU&gt;ۇfUEJWE&quot;P9.HqP pW4-ZV3K&#x27;!cpKk@-Y&lt;x!@*F,mKyߝo UjZ=sċzNP9C+PL=}cԹc;t8ep*]vMJW?q#&quot;k2Jdj;_3LVB4©&amp;cSݡ0&quot;E=r]9ORx@3Y奨5idQ4f6a͡U}&#x27;(.ۋvEq8` ؎ۨf@&quot;ȨVD胜-hd EAÔ(EjY&#x27;b\nkơ K;OR,ʒ3RtIe)HĢQuZkrp -C - -AMA* XWY)?O)a0D \ApMu4YߠK&amp;ZژaI)#|&#x27;D&amp;v5 ![bT_?;`n47MӕOtK3ڢ50kR_}4`+G7Mg--:02KyL(IA%HIִ_(?};Z@%%C ӥj_zVկ]^2ɲ)XbWlk6gs!p#g8m3K,f[D5pRY6:&#x27;|]5q}VHUv&lt;1PBMJQMܟzSa[h.Ma&quot;-@&amp;Y4eD^ /&quot;)&amp;Y4iVF_|cɢ8æ:܎fqf -3큟POKm&amp;6nvvvLVYGhm^KL8%zg -WKSoPXsb!Ak_]&#x27;s Y+qmtu:8R-D~0ɔdcLN.3j(7T94ilpijlR M|8xǍv&gt;h?h4HT3N5Bozb ZӓZ&amp;kSkӧ_KN긅g2T_ $sH*g8%B -Ӹ.&lt;!k&amp;nKm7|I|91ޖAjna^^!a2?ǃltIמИACiZ%3k7 -&gt;ᛚ - .{d[&lt;uD=^ڳ;?bUUek&lt;-uAr~g4 ERv`t !T$r5#~4om([*$D.`C%Qt!IXYUn- 2d=W&quot;^y6ӄ$6a}l&quot;[\Ţ&amp;CQM-8Fq.NYgANLNrt&lt; #aҔCFj耧)ǧ2sI%PjO잆R3(6ٕiVlM5s˳10x^jkB -qڪ)W0GԣFW6pE2F -O&#x27;N{3edkh+qcC nt3|YvFvo^J˜L8$㹪8PTސ  -]n ^xޘʙx1jv&quot;^ƦOZ-u@KAآފ;I [Jqys\zXnQŃ V -?#)}/&lt;nB%TbVXI@MBYIx$7gNEa[5bN%4 W$\g[v*Gj9삂 AA&quot;y#Qٲ86ǃvAЃ];-S(QmV(0\Oa&amp;j#c@F-:m=jh;lXdY׳Y*MqwOiw HxZÃ-1C1[edr -5|/=peT-]YB##xt&gt;Mfb3 ]k%J̶֙U]xQr~VsEq:Wr. $ܔ^HmqL=ͫ -eX*x_)u;-vǡ{UU51{b8#z h{`92+4&#x27;_B5~kFEdlm+ڒU~V2]T] -ѼѮ鮙\&lt;p&amp;/2pOƥȆ| 8` ؏o[r&gt;ʋnϜ544 ~K50FpMg?D4 z}1#VHI*C_N?9?WO:o&gt;9qSp9Sg8A -+ @XCJ#2]6Mhzwҫ5Uȋ9*GzY 7^f^[Z\{!p\ekVg!_WN+&#x27;&amp;NT(  R+?q -tפ&amp;g^7}y?N~3G -AHBSI&amp;jk3|T!T?w?ZgZRtwCKBӫ{2D. -f4T֩j -PK&amp;b)F:!~ K(fNF|8V~BSckmGKwzdBjonq\&amp;\qg4ŗ&amp;A&lt;l^D.ډ&quot;:&quot;|&amp;7E9&amp;7F}vحgc&#x27;k&amp;1OM6+P!ڤZ&gt;XOYbgC9ꏗYu=PxٯGc_ZsYtW,i -=thNe2$V?i6\~1 )L -ߝz(u8EoJݘR{н -P:+4FN\JP~@V -$|;57W;qZF[}˿Q/v_|xsv72W -ud{.mže1|&gt;҅|iy([xn[0&lt;==PV &amp;dBb4mf`J0?O5S:1ηWqD)V&quot;%wXX5OW;&gt;P_g(:z&lt;e37vBVMr-Od9!%hq%hXE=[3hhAQricj!J&#x27;~DRuԙF``RJg&lt;f}9K֮&gt;73|^1ZFA8Pg@rL&lt;|3|BAqiOxTMUїX.DIBHy{hS,{tǯÑԗ6=QK0պ蒞ggmyP^ӵ[ݜ+F$.E|!F:z66!13\&quot;yTu%}ڊhrHBYLVɓSNRMɆl4HDya}OUNfT98FfMOSP1TG?x+&#x27;&gt;~ -&gt;̓ƵU|ڳR`E}`#Ү=kk&amp;XN!ei?ZnVj#ghqZbj @EQ*zάYF1w-!K-ƨ]l9-##em33 vz;uyN8Z\^:&#x27;߼c;Q(3X3yw`P_S -}궺Wryye&amp;yj)yre?NFչpv~t쨼uo9?pUT&gt;ۘ:}Umz\U48&amp;l/\EXҪkj߁s=&amp;#wW8׷ysg0Y**-&amp;}w܉*JZ]Q]cPjhj&amp;JXoTj*;xpW$o`hfj[-|*JjjS*&lt;?U*F[YRiilV-FUɗ7M-JGH-@p:pyN]qKAqz4*ne[[-&quot;W.~Wxi}&lt;3jgT|oNۆvРL8}\oW;vB=bk+7]^&amp;ނj5ohE55[*Fljks6_vY|7$ i&#x27;8~sdk4N ,RX$1ZT&amp;-ȳs鏾rљGo466+ZŦ_mGگ&amp;4vǗ k0h=xtcf+kS#]meV&#x27;U*.o_I%bV\4\{^iҪM^v7 -#=\ojkn+M6W7/ze,Sz i7?*R$S -r774{\fb_!O=mٺ vy7T7TT4}em՞;Ͱ+aV{7-PftsGvH /ud)A`Մ8=coYeNP8H}sǻwVv]U83xl*LyٮkjuZ4z[en˸Qܿ\&amp;ov/c wʝjبۄ&quot;ר-Pvڬ`g5VC%ݐ,ⓨAKR]=E&gt;9Qjn(ҹHN kI_pKmHk:Gn8++;&#x27;:;ݮtt7t˶{ zѵHl,mz^]K]Wɝ.7s*{;v]&#x27;&lt;^,\-m&gt;ZGY&gt;z죷MB@tnoՋ5Z[&#x27; -5*^a 1)vc{gv^ E\yw5kFmsZaīvځhB ֻ[d% ,^A6+5(svoS$}Xv7oMGVv&lt;%M&lt;Tnk ߱W6t6o=s/ivfoO8ƾ,c~ʢm3ZixM9WG\tF툽dMZҨ&amp;[-l]#yKP.,,{n.#!/1A- MCjvuU.ڦV NՂ4*k -I2UfTRoo6e/^3mij|%}ޙC-O,*Iiq -GMV=ݍHBvNk6sfvb[,f{cW97k@5Np!#;PAX0hf#q-Rȃ۶Sxkȳ\,݅ΚI-bm;o {k]O+yQ7M*sduYΟSG&#x27;] &quot;&gt;ZaYj~ԟq_ߏFz|:?&gt;&lt;o7vj9֢ZAn2xSYӪ4842zK{/HyF L{Rɍ}`ҳBA4Y-e✽Ue&lt;85]Soji;LMe݋:rrPo8Zק&gt;45|fy~Ynb;tP{syuz{:\ޑEY#+|ܴb0 &amp;nu88?uq8}M :X;XЩ܊d͸-ӵ7Du__D%*Vw5D%*QJTD%*|J{M{UӀi.qMWͷ[nZ$ZGM@޲]g{^psͿ$ks49]:KTD%*Q~=B -o ]c -[P{z&amp;w (ϰ .Cu1,GnW y&gt; -z@/cX{&#x27;S׼00#ǰZ - - ː`g C ˑ0p9:@u5p2 yÓ 0W ːE{=_0,CmR,vư 9&lt;n1Vf -hWS ː&lt;Cq(i Kd Kd Kd Kd KZ7Jq%ѽiAvi.%Wư ubͭcib -y=Ȱ yݒ}#fuԿНflS&#x27;?0㾉b%e&amp;Gq=bw((n$&gt;80b3ħX+qIeO;f|!٭اot&lt;Oq1L/EW_QH/UQUQU_T91¨yFsh9(?YReҀ11W(QV`|e&quot;&quot;Ҟj18[Vm@4垀ys&amp;^&gt;&amp;g -^k&lt;8/-iPKQdb::\]ecӴezE012!:^=DsKG3r}1m@ _*z Xa% }ר%szE$&amp;ToO&lt;TcQ -ycԖa._k Ey_6K*O)S~_2xX(xjFOM/bLOQRd=WcI6RP -O^9RTKIe5Kwߤ6l51/dQ/5!AIQKKN坢#;KQT?/M&quot;%}Yr^w[&#x27;Eϣ0X4;?ϥhLlP;-̹61Sq=LIŠrꕹK2-΄\lig% -r_.ס Hd|ژٳITȮ2?ɎV&amp;5(*l&gt;$&gt;&#x27;wWQj&#x27;g -scVNH*[Cw:Ub#qeʻM=8vi&amp;he&#x27;zD@&quot;d3nԫh#Z!αk.,{ &quot;XN_gu.|46OgE!3⹙|d -(\+4ns3R!!B/9R\D! \u%*ֳ߂/P݉bGY.5#=+ZŌ+&#x27;Uo׊n-Q2]urV}澤l81.;&#x27;WaUȚJ$e9.E[2JR/RYDR}Y\K$v2gh2zw,}p+.Xbq7cn5 X$AɜKEkG*XQAn;GcV+ﯥ_n)&#x27;lT\SvZ!j}57&gt;MϰeoJ@iַ1W2L[ơ -C -Õcp6 =ft~tx8&#x27;hA ? ng|Y?2bZQZ`t0DI9hy -wK5NgI6 ga?Ʈ8G&#x27;P&lt;sI6&quot; !(DH&lt;|@Y:,I;Eu.A*tcW|!Vj1*M~C9pu0rj:Kd6#چYA+SCTbUba3]%YEv8^%`!jiz&amp;ycQ_n0YH ^l&gt;BFhJScHi&gt;bYrQ#yB6!rg~?Ξ?n/[d2nD&lt;LH6Lxp j6bFLViqOl&amp;׳8\-dj3M`NߍÑxjEKɥ3z4c in5b&gt;4-cK8f3B$L3ٍHZ뉨YŖDF&lt;3ŵE18.⨘YJRDA:GTFbg.&amp;fNEdΦ#Qq-&gt;o\Ky &amp;Q욌-Dcb:CҾЕ }&#x27;aӑXbO//f# bc`77&gt;[ʂH:*&amp;םgSx t_N&amp;|&quot;&quot;x%&amp;8Ki18ˤnIDq*KЅ0dpJLŲY`Imh.c9LfpOꑼ8t2ucI0M&amp;%jliH -4XGIO&amp;k&lt;[8\MZ)5b&amp;&#x27; -y^\1%+?c0k4&#x27;#֋H-y ѳI`+( E1J֚\}p-@L&amp;&amp;#$`K[&lt;ˊͷ[DQ$?\ވeWIsQYs1Sin+-[&amp;Ѝג2ARPf&amp;,^\&#x27;ɛ!,J@NP&lt;#BJWUJxRJfi*jr*:4XO&#x27;@2&amp;(SYNK\?wP -bXf@#)C!I*D -YV̍)&amp;gPfc&quot;H^)ѯf-n&lt; iݘtǂ CsSD驹0A\~٠ #i`O #)7S].|~6Xe8Y2EV ٫wsj@sykΛݫ k–pRi}iaz_\KO?K+=/=/=/=~rN}}|@wdH*Y{=GҽQ?YZ}suWc^h;K=Ck^OJmbK* -ò Yߞ3}g D[ -Ix -콧\;g{GIy5DWc.E4Xaؘ-&#x27;/-C‡!^ ޖe&#x27;ʲH6,--\qb 7)+T(][&gt;=IӀ[_T&#x27;|E#+T?*ʟ&#x27;?| *zqTeO-͋Hм&gt;y -!?Ҿx7-pDeE -gpYq+\=w(;w+|gO&lt;ȃ`yK+1_TT/ -p4`Zu-: Tzm -endstream -endobj -285 0 obj -[ 0[ 778] 3[ 250] 11[ 333 333] 20[ 500 500 500 500] 29[ 333 333] 36[ 722] 38[ 722] 50[ 778 611] 54[ 556] 70[ 444 556 444 333 500] 76[ 278] 80[ 833 556 500 556] 85[ 444 389 333 556] ] -endobj -286 0 obj -[ 250] -endobj -287 0 obj -&lt;&lt;/Filter/FlateDecode/Length 343&gt;&gt; -stream -xeRn0&gt;GJ)JPI?KTe_K&amp;A4ٝq,,BߝvS2H7!ʶ2Aˡw,c_l#&lt;U`}bmqy6ZЎ ϙ7z[ l^(޸ak`ETlOd?9^TuweQ{5G&#x27;k -ԫ=&quot;! )X/D.r2}lQ(bBτbNo&quot;=%L0}KHhE`L=J&#x27;rs;^8Q9gkݏhLX5˲ -endstream -endobj -288 0 obj -&lt;&lt;/Filter/FlateDecode/Length 43836/Length1 96276&gt;&gt; -stream -x} xKM6Ml6\6!!.a%oH,$/&amp;bQbA-^k(-D[뭭X*~bTZjjwB?=sf93sY@AY_XV[ -iuUs?Uv:Wz%VD5\vLtQ¿?D]إNϸ &quot;tU&#x27;Fi}+ZKn[1j=+&#x27;޹jQgة6]ܼj-,moB}E7HTQwI՘uGNkJ}f2; ɏy/;O]o4 Yn/ꯦ e^tF3- iOtTT&amp;8RQMN`ˀnp)9;&gt;H&gt; #8rβ9[KP_nW&gt;-4Eȗ5 -|8&gt;|IF&lt;JF:Xr_24乴p{~0_zOϑsdЇvb 1&amp;ݑߴ(_cF&amp;bf b 1A b 1A b 1A u&lt;Nib7`w| 1A U WR5nާJ*-ie-S*wPV*sNnenx -nGɡ8,e(^۩D4!߫m&lt;v4T@Cly/*]4E8&lt; )MOdR)PO -RR(&lt;xU ϥLz` -p08q@疲NH 1A bC8(W%9x)cȉT0Jh&lt;GTI54h]@2ZO;!6nМfg_*/D0RN*gjK5ӊQ&quot;Ȼӊ~v2_~{@t,,mp#gBQd|%&amp;Y)5-=#Fps)N_FOQA9QUuLF3f͚]0gy_@|Pך,xklXU+W,_tE- 4̜M:7tqcKƌ.UT8 ;by\w2x=;˖lMJ$ǙMF(]pA%=yr̻!h&gt;K:!9&amp; fs-5X.K-jdV|j3*3jDzK 6=mABgmi3`ͺՁ*TW\WO=qH#tILON&amp; -fY*APxf5VW].A~U[&amp;yuԛ *F2&gt;l7a{aƠh6h*yQWYTRxZ讶-slw5Ygk]#=54|=BX[D[|16ASwRX  ^ -egk#G(vnsՠ4ꞽ7Ksf)&amp;Gړ4HXtFts}&amp;Lz䞂t:I}/ɢ:f-;GS.0矩Yfd]Ǡa X0gM8,tU&gt;K&#x27;?ǽn&lt;^0;] -6;tVw~(۫?9ޏN,en^C=LOn\FzJ)DSE];GckoŻچg2PɅq[.R*2eXK!n5.]=fLeZ&lt;*Fpbh -+QvZuE -XJ%QAQjI#&quot;R-Q\΅~i喳C5bg}O:t -;3xzFF&gt;7]JIsٍI\*gr^|,]rcѷ! -B^閯fSδ{NMsN;X,lV#3;]n .ڟ:U`(K=hĎy[.h{ 72詁1 HOݼHCSȢё٫.?LG%&quot;Ik&lt;,xnnXJ^-P3Gwg&lt;30체3vh)EA/Muî;{ξЎ5SG -!Lq|BWp -T -2`;VWkapH -//A?i(9 x;a5o**cG# -.o\%9]/;ldr L\AIvRIo8$~Z{&amp;dI.FOG)&#x27;&lt;қ\Lb &gt;#@PX)%b?w|h! - @BR[,-!)|CF^Kۑ-%y Nu#4a-XHmGj;B]^@J[/_![{3w&quot;##r#rՆ66bl6fl6 *Eu[+ -Ľq h.tp̉K:&lt;4́IwV\vP,F57kp֯r89x]ktQo(ՊDJrJV-t3hDFQlT6JQK9$D)|&amp;hqvo߼ہۀ -zS\lB\EJY&gt;&quot;$%Ai*5u-x};=(Og)yM=G&gt;7R߃w 1IN/M(wg(~/AzBPu`7Wm -yCdrm%Lhq2j^ ~~pu(_ -Ye= -l1:9Gȭwr0*[wN&#x27;$y r_Z {:;(;N]wC&quot;_lJh2\!a0rMPsA–}Ku.7{9LAP&#x27;98j&lt;aCcZԽ1a6wcTnXR:s@yndΜqx Z-il152N46A4SjJ4%L&amp;Li+K3X%3(*z%ѯ83q`,RK -qڰ12;8[4] -~Z1Eh]~+ܴ.M[~VkgD=zꮰQƺ2[Yʤ 5U_CؼgmpEP t$tm|E~UWR.13I&amp;z)GQͦf9U=99Q&#x27;iyn$ZW.@]u\\&gt;DabD+K:bIzeI W6Hx&lt;0Hqx=_ݞ;~x_olEm0l 6%,&#x27;Yo [yw&quot;` yR9{9=_^u^T\r4~UU=ZӪ- -5k*}+ki3mUn6*e[~Vmʶje[imή`u=&amp;WΏ^e&quot;&gt;I_#]++&amp;+TKT%/lT+&amp;dwyV̧CkkmU_/390l6&lt;MÚv)m6O۰]LLa3w)e2Oٰ]JS8pp;&lt;a]ZyommQqʡsxSN[Ɯ9;rb~&gt;ͷ#9b-f&quot;TWGf;ʎt܀eV\dufMl[pBQ&amp;f&amp;2j W&gt;aq44C!`h7tv ی&lt;/x-.^uo@khrU9rMU&gt;w&lt;Zq&gt;彀Rnh`=P|gBW~xWJD(-1{NjŽE%͋~^Wψr_y -&lt;T6:&lt; GuF@W*E^wP[L$NEɹD\1`ebbk0`K;d(HWo R8HQQS#&#x27;_9&quot;R:zh-Z}( g(/G.KY-&gt;إE&quot;#Ap=6&gt;eEA &quot;Gt*CNԕB -3o\yp(Oh:~Q}~Fb_r3,WT/SGnBlτu=ތQ -Q+e2s 6-a[-,^gswěXU y,b@oBwӓ Kgy-=y$*&#x27;}n2b8? 0-g]x?,UE( -/We:EmV/!RZ?vPʧ14g1f -׎g -m+n|v C L1\yZ_Y݀v {=ɞa9x񱼌Wo³ ъ] ]bxoEx&amp; -&#x27;8yԈSSoSv?~dnd=P1wy-O;_a|?E -fZ.~$//+O,QRW^P^STjTK}`711,7fkph01b`z -~.4&lt;:4R6օMװ97ku1;. --{D -\T,)w}%50F(ot*_R~9OUSz{[@NOᷢЯ21ꗴ qz)=_F=ƵdS\~`=ņ1ͤ,nq?0ZAnappD,:~ӯ2&amp;XYH?]ŞVEVL6[}M݌yvȧTD sTFkF&quot;]l!?9BJ,e&amp;|ۈE^؄V?,vZ9h&quot;5+ؙ7YH n2&lt;H3Y&amp; Mw~6&lt;[ɇN̫Qɤsyy2;-2 -Jّ&quot;)rwd&gt;EB4Q|U`} ߰ط&#x27;؏&lt;FnUe#/S:⑃-zVɢF=ю74+rhid%vhQEC]ż V|uxUIi$1A b|&#x27;-N1va17y/f psDs)&amp;5O=~ܼ㼴-&#x27;3[.&quot;zw7o)!m= 2CJjJbF𞕌lBo(+ٕa:}&#x27;5OQsu% WK(̑&gt;&lt;vҴ1&amp;Vט%mDɘQ),&lt;j1 -tf!SZƘ8M&lt;zاǒS&amp;ceߍ*bodʮ-SFA2%-Jƌ]f9R–5* ˕G%bDIvٴi6ɢ).(ڄ[c3*${h8鬿$p^g ưp^t‘Hd@ǃ%2xܠM&#x27;^N BwXDUO3WQ2Kdݵ2{b ᔯL^0#dFgX@ =+µ|H -2J -K -7]UVZ:jNkoذ҉7O(je,4-&#x27;$\n3&#x27;m,w8Ĝ:3t5\$&#x27;ڂc|&gt;OݱQ^ -{t2=oh/Ҹte|íɊO|쩗y-uƲ#&gt;Wvj${5U*w24Yp&#x27;nrgK/N+tʜN;Zn%cر)%c#o[]Yԅ#j=տg+|9}(*?x -&gt;eB49J!9U0 -D&lt;I&quot;Jq$Bߝ&amp;b־x -L1G@GYL -a1TVhq\ur&#x27;4FXGPᱣ֣ &gt;ϩ #&#x27;xIh\Brx]%ɮtW2OdԱO?fOoAauW̟esf p032*J)h JiR#+]-ޑԔēlwb8-~j\GS&amp; rLjR )) rZciևgX J;8imxjIIUZ;b=9[R-4sQ5MKzԳ.36~;5x؍*cϹVVl3 1P0O9o -J&#x27;3Eؔݳ^)CzKy+Z{cvx64CZiY++i2fnޔ ׺5^v9{BMߺBMVS#Gեd\l)lr!Y,a)OZ^ ogޑ&lt;%/YRH[R)s -A0F &#x27;X,i,ם - -F `0%ylYYR[anaiHe$ ˜-nIPVI2B#ΰW%=l0bAezxǤÀgf$qdh8kf&amp;cNDgz}w-O\gV2(wҪc]w&lt;ٿ}7_?蹹y̓l(rW)DZ iFt4[vĦMuxTݺrinT9%e OD͜fStS$-(icҶIJRVˎnڕ2_\c&#x27;g^W/?T9.,+Ҝ Ubi鮒IDG8JqFOBy/Y3~xQ7pq~Y A獱i Y$ -nh4h y 3V:;S~?LӶ3_q~|+Y==+#+shΌu~u[F[Y Y)_[%̖jfPef%XYlG,u@FH20$̶$aMmS03jɩ9&quot;ά iiMo[-m3oJZWZ=v-$[$Rb%/2Miib9HchhH&amp;wKsIQ=!妔-ZbwpoҦ䍹gk̽ ^2G;f2*{`N -`|1Vκ!-/C;ŰVR;FqW#j pTl]2x~-&gt;&gt;kNj&amp;8f#}#]#jQS7טIִL,W*0gWL9:_X5mbر0ydx -*o_nXE@&lt;kg@D6H -lNn|%{d9a=[z?opsCȪ_y_2{ѱs-fn~pMoyzz: rpOǼX悸k;Vmzhp-C tB7݌ - 8@Fx*&#x27;ڨD &quot; -&quot;:b&quot;Ý$ȱsp&lt;p-K;Tl -unn®hoiP\H% -̧MQG&lt;e --,Q}Tn7&gt;̆z1VX9=dmM̏&lt;*0$1M-́&#x27;Fc+[=2D -M hM{UM&amp;~SNPB%s1Xj6Dmmǘ]$[x}`H;Ðf`XÌQFXݹ0LAjq41&lt;:5/&quot;Q$ dw%q}1]&amp;4ɗؒaTk{ ںǻp2RHK91/sA-b.d -z&gt;Vx+1Ø7e]2[:1%aөUD-ێ00e=}y\Bl -|`h DV-f0 MLBk[%OgKzp3m ZԣvbՒhOm_W#Vj[3ʾԡK8p@މ&quot;R: E,qz)pdW\ -WUӫ[n77ܲ ⭞[ۃ?}(dRa&#x27; ׉:)2lm榋@YRC%\#)|F5 t)ຊH%RwiWiĖ?M&lt;; -!;#ĄŃOB)&amp;#OU3 H -N*|dŀerIL -_r^AjXR(g+@ރWr&gt;OQ@3a_+z|gHUPQSC&#x27;DR[z_ynwy{~޳dl^reiҥ ﺦ,]K6075_w~e{qտ(Ώqݷ&lt;tq&amp;{-&lt;DxK!]&quot;g|]0)v`+8Ug-ڻzX5%X2! -9b&#x27;~,̵h--&gt;hW5mrҳPGz_lMi&amp;uuXLr&#x27;`ED!g\D&quot;fbr{@k7,l&#x27;XrCF3uEc[·&#x27;rץ&#x27;..ggw:҉`Ynp7{o,6g6,NT;;Hsc~ x|^܏y!x-#ȏC0.f3 UOS7t -3oxDXA zUV ;w:_&quot;oY@جyLx=S0%tk -ioPHvވz1PO}&gt;)l -Qt5:`uSAץFJ sr6,X&gt;,QU&quot;2Q&quot;|&#x27;*WtFDVK/l % e&quot;qGlyw7!r䡱l?{{WGdnX[C[2O/߀ - qPɂ:YW¥B{sGjp#Xm_Wj-tF,\r8g&lt;l5M|npnA7}wU#_ 0t -օ1^UVM!vFRw9HoW/`7#2Fϫ~VWjY&lt;eMC񣃡r/W;y肥@-H hK=a[ugD\ȶ{|΄R 4 4/!3sn-,e -Kj~׼Kq 0?z4+{7&amp;-h1/X嶳3!l̋ -pOU0{J)^N.zsf]A_{0^Z&gt;VsT*f -Ws-I3cdI!P HD/BĎp99oo/sshgph5@ -Lbk. -LhEpcmI){W Po_d{i&lt;b -VtЎt&#x27; Fei~օIՅR-6Wp} d˙t-`΢ -1ɩlMܘ -L#y.vL&gt;Ue5{bɊ`O,&amp;+Ÿz~ -lĉ6񟀍!_tpBHN%x48ze Z~W.(][}͋ZƮO4XVk: -Q,e$;n30Nle2tYy0ӟc`BW)ͤ%1VݢYAmڽn DL%jYQjBD6N\E-ȓ!rw:®p-$ jxޠ7jM&gt;}4}.r&#x27;|GP. TjPϟDb -rx `Lq@̌CVh&#x27;5BaV#xE-Kij&amp;Ѯ:`X!cY%?b;O3CFqu&quot;_ᖅ#oGcƂ46}mZM/Җ5-;[;/Rm螎7^7x Yc%[R~⽶[Fi -:+{,r{:z&lt;Ѯaw -KD~RFqi+R~.䌒e&quot;uz}&amp;4/GYta&lt;[_/eʲȲ¢+yude=_/w ߤA&gt;{-z{֦ wܯ sOggg#OD=+;*}W -___ƾ0iĶ=o5)y̼&lt;۩/_\` - dh0_K4 eY貋)zAڲWd(nNKCȰn7HѨ(IhTǪZ&lt;ԁ/}|*[.70*kmA Ekt|FA0Gh&gt;&amp;5yM #Blyә Nh-s;as;Y6.c͌1vvF?c*\+6@#qa_Rk[!LͷRӇo|#vC)˲ -5o -hK)+xW]˦BS/nA1q~Ew -t 7bLv&amp; ;v w -dWrʄ{+ r@}䉂1,X2Ex?dxo9`X-EŖ*v,F|HmInҠFj MB[ ##ß#Qog&lt;ޠZշ4p2m-{$5!z7-ww78Emog|n&gt;?ØQ3ݾ5&amp;:\jy9ҼӦ9oJM,D[lŶ\]c,(㇇ -yȔ-%NOz2D - ֲ+iڽ eA}MIGr&#x27;+(er9(\v`SNΐҁK.%\Je/w5+Ŋ`*}=m@+Otĝ! M4irugIOMLrʞ&lt;huW{㳥[)OY;ohjU%жnex_C%7_ z7,ݺaJظdG]mc}g_p;nn.^cq-A -$+,|yOnIى:~:D#aed -) -|\縔H+XC}ƕ?&#x27;%ey(`8LjG&amp;~HunoPSq~&gt;I\jkY~&gt;&lt;&#x27; -8EZH ISn{cO -\?7/GaN g%d]Ey١= G&#x27;ŸWW&#x27;OSP\R;ɤ1OƇ% w~S5 -sIkWONse7t$?ޱvR6L(Cٮ %A7Xv0فFA #pgF*P&#x27;yxN4i5Q &amp;]}]{e##4AN7bƘc -[$ (ThC2eHJ&lt;1@Ifκݒi2RN&amp;V=ȈD&quot;hi&gt;3&amp;&lt;1&quot;#Kfu;?}[gSԸGN&amp;ϿٺEx@cе}A* -Oxr_&gt;~0%@# -_Jm -kŪ;RF,H!0(T37xF !@^ϖ\XPD08zǜ0ue{-jА`M 2 -~Z&#x27;=+r?-7mD_ -}d|4&gt;pU@=TVJ3@ū`k0Όӑs$H&#x27;#l !KVE8A=&quot;r&lt;*bP:U%Ouʴ?6t`؍d6z&lt;v2Ƿ}#l{._5/g-xG}OȬ&#x27;&lt;6}]cx&gt;7t)AψAi7vUhX`h`A-$noއ,uLG-+~-g8W7@k+{lOoT׶8-Æ R+A@1%m[wx-c_M颈#{VEiFmtρt3gC~9ed\wT)T}]=o]!BYS^@Q,MzOG_@锜yN SrЭ]M7+ǏşS9a_Shɠ |-SfRy;L9BC(׃y~{T(׉lƄ28P&gt;\/Se RZ/R6ln&#x27;ǭ MAnPNTz1}!mK{POx]8ߘ4ڞsQ{Щas+Fخ- ߙ&quot;Ό!X 3G^(r% &gt;|JK8*.wT9eg]DpO?&quot;8}e\Y\rmrEhSB]Xj*7JjK3ȿ;Ct/$K3.!HjÖİy9ssZ{vlHVÑ )NTQϦv  -CXq&amp; -#a6 - `3 v`P/1&gt;jIPו[3kĆ+Wb/ *5-:h8?|iU1\ݶOOPswv{r`S&gt;/~|ā[rUfo%W}6tTtVGp]3#rvzi_5FoΎ.Y9n7q;3{ܥ\ lЌ!Psvϭܑn999&gt;B &lt;EH+{+)c!T\.r{/h?DZ +L x&gt;h? - n:p3 -JVq\Eb$oCQR y&amp;t ~Mo¹;s9&lt;tϭwU$UW4*pP4hp8AakFqS3(w@7qs7Ӽe$:-ZӦ&amp;E~)h#^4,u*= ^Ssݶ݋ -ƺ&#x27;P -4VD7ŶB&amp;j q0gcU_Vft)&#x27;Is禸ye!Qx+&amp; Sla@/-XyypǧQo[ni!X&amp;sbWNaP(8??M4}lnв}*khI;Թ7n -sL8&#x27;~b*DAģ4.JZ{ 3dM&quot;&amp;qcAOfq6rbdb -X~67[ɦ&amp;(sI0J%&amp;IڵX4.xGG=VY([eBǥYT -d&#x27;`; Jw&gt;J \WQGvUT|JrwR6suz*s2&lt;%Gwd|&quot;q/% -y1XLnh -GVE[j2?Kl#z}%Mc.!X3޻J]]!gl_&#x27;!UiEޕ]&gt;弦)HC&quot;A\khLId-{Ž@qvt)F:&gt;yz|_+ -!7bZl -Jn-0~a;AئNCgE{8{bXl&quot;uvVM&gt;ƶ&amp;kdUs׽9Z1\.x馾xegda^?b^-W4VtHÝBf5E])J^ԨRhHGCHtjk(N $OB&gt;-BڧGF8$S?i&quot;w0c&#x27;M.`k:vacff%Lfb&amp;ɱ41!:u&#x27;*:o@ E εHւ8Q|o.a9ZWV ٿSia&gt;l:jWt1&lt;o -x -&lt;z~rRve}*^RY)nLGSYG?ɀr&quot;WWx% -v\A2):uBbɨk塌[Ж -B僵E`i\dkUWKij賞™ksPh&gt;/]Y3H-:VU:bUk,PËu]Pʚ fʊNL )K%,+Jtξ itf.|&#x27;HqXhcfO&#x27;Ƃ &#x27;SQؑqe`Di#Jb[bh-cPCM@&amp; -ka4p -ZkI4FMcx Y1r35Dž?3F6-r|[[Gw2vfܾIļ j8I尫mZ?ԏ?+mU\V\&gt;ZFvjnd)qu/;|?F zHCv=Ol&amp;n%/yJ -sajR8rn07]7-N2vX1mÙ61 -Bd&quot;(D&amp;Vkۍml6b3i`M;v/Fϻ8&#x27;C̦e9ȍ &amp;e -Liђ#jL1.Txpldl!aL_ wC=xH^-%%`߄vy~&#x27;$J;^bS52Ȟffx I?qm\5+}xۆI߳q}]խ}hѡbc/G^ǧ54羕;vhM8&gt;;U4!bB%wlk7#ڊwW( n7~5dž9./mbWƖy5 $HS&quot;̰XXXi@KZ-=#!FbDKdB=2jVrOV*Xu:U 6`,tJ^ǫ`6,VDy+(Dml&amp;LD2фj7h@Htt&#x27;N&amp;&lt;ႁ$3ǂ(:γ/6BH2ˌe&amp;\x&quot;2B+ɊCPMW`iٮO+3K`xTXSIMpSI4~K&quot;Cbmh&lt; k}Jl#w mlc-]zahG}+w)8$ď;Jd&quot;ifs&amp; E,L5} -lRmAT1цق:tx -\@8qOE&#x27;6QK6 -H7Pf\&lt;DPi8sW+lvl?-cETҌ-ln$&quot;]F!Mڦls6vɅTkg{;Fa֡c~t̶ݻCHkàD] lxKx+#BWVIH=t:%&gt;-n7f앦=&#x27;t+X&quot;x.4!&lt;9Dz5ׅ-`C=[[ww?&gt;ɼ.^PbtFBNy &lt;#AQ#J R.MيB@wB28rqFzN-ic:j?Z壉FED# ;ZJTeܬ^IReth䆻NGڝE_,%ssH&gt; #iS\`~ujTT)TO LE0-#3&amp;oD04H6쇦`W#XZє Cr)Ig^?[7vFu˲ʷ$zv]&#x27;gn:YBΕAi?BHWSXTiD0j9s[Bmǖtp0c -e:3.9Egk-&quot;[ eHe݆fU^(P&amp;c,shVVF;7*nX|wvopzS@&gt;aZ==yWԯGZܷO el{~{? -뷧{ol6֓2F3&amp;hJ+Gd=y$-9!~eZ6t I;j-LXd 140i$ ^.hvm2 &#x27;˗8=\`fiBlM%֤dfE -≀`2k&gt;s\^yZH7\F^J2/ e{ݵ+m -gw&#x27;Ԙ?u?^7627l6 `?ׄ̾ɟBjݺNLS&amp; I-D̶304dﵓv= DǣdT-hjsVyo&#x27;&amp;;7g͹&lt;G^ɓT4|Y}ݩDž/%ådTl&#x27;w.-aj֏ -?R8\t&#x27;9\$0I@DɄGGǵ/&amp;tJ9w:?yWo%uIve(1PKNjY9&lt;1:&lt;@$)p;m {7Xʶz&#x27;EFK|z$-!Igb LLaZ|`0h) Q-gO&amp; 1&amp; &lt;&#x27;yc9: ijb&amp;|at&#x27;&#x27;栗bZSꎴR&amp;W&#x27;*΅s&quot;lQw Q&#x27;Bu\(NX |s55/KHR=IwL:%uhwL -}&amp;xּ&amp;ɢe &#x27;g) -+ktgk0@M WbR-!v&amp;%E䂓sԝڸC;mt&#x27;nڰ+?/kS$ul/:XNgnG -6}nZ/g&gt;&quot;kqS/NF^`Ho E:9 -Z k8&lt;-3`5gN~ِ_VT -/tPrn2IUE7x l}Dؼr9!#- yeSK7/ML6苦;*J8#Sj۰.Hɖ{uکyd:84rY(ChuDX4Sl-VP,Ԝ&#x27;֐ΦYHTTr8$lJ4V&amp;%\*&quot;&lt;T 8Jvd\1mR&lt;o - i? -[Yhc5zGwF5@?e4aUz8!)0^6Ao&amp;%i;%gB5 gCWۊh毯 f,EZP5 0/y5LbH ˨cDsf?t9&#x27;N@SlfW\TM&quot;Q6bg7;026FcCԗ:w0nHGˏώu -u5RGYTHK5kWqD`Eip#_&gt;M ҥKL+vsX-sphEۊM(14\8sW[Pk&lt;tH[]RWg -i&gt;ŧ&amp;m\\Ԥ)s=ZGd8 -ez u? -I7o -}=8͝(Ϫ --T~{O~_-;@ƋMVpkh*7mJðD*E+|}Z+|~I6G[*r=&quot;y{D~HjfʾiQB(ͼCU4YQpp!UM:XXcn4J|#hUq - -]u 3Fa@!ˬͿPt2,~ro#Dס!@2筳4D-/P\M&lt;1Dp,ld?}%:* W%+ͬ -cb%=%+4xSmbt]%EIWykIR!(4!)ӈ!R)X_T+{-*b1+(PB(ڸT$OSۃ ~Sfud%ݔhG23¬3DŽ/wŗүꯦ/c~[С3#Mgzq072zUJ*UtJ*RVK}H}WiOَ&#x27;mr0Npd86${Ä&#x27;C&amp;,$aH&#x27;Yf%{%u !c&amp;cO3&#x27;&#x27;{Үal-=LLc^#cR&lt;p{曗v#!&lt;-NِD;ڼwUơuT_e 8&quot;[X&gt;ŒX1U^ھs61J5V[,HND[=pqc]w -^orG(4/l|DB2bD~IHW~/k#eyÈKS_WkR:nl ޅd϶ jA 0NO[N&#x27;&#x27; -_w(򣼁N)(Q#}4I״5vkJ!S]f\ͬfGezu=-OTo#1ccϓ3_.yfhN-R&lt;LP}~ i&lt;&lt;&#x27;})ϸ~ϭAиネ&lt;Fg&#x27;ayW&gt;88ۅr&quot;0 -H M5Z:i,4vV*eJCib~jp3=,gIã_lCMQk\I!?g̊հ[2 -&gt;f{m.KM5(] U(,H34 -)P(3&lt;aVc}P=U3m&#x27;^s-Oǂٿ|,]{X5r?;J -o|kzڳf:$-.WcvvEpIw\Z#ok9E&#x27;vgDвQQ&lt; 8ͩ FOb&gt;6ԔƂ-ncX!r1 \UҴ_{&lt;,Z&quot;{3q|Ҁ&quot;#-p[!QW{7V[1$잰AJp Eua׽swON]];&lt;w&amp;w?=fxH&quot;jg:jDD2jQu̐^p{&lt;8e$ -V^nmeghv W6/&#x27;ڲha2H\:epM5-5ǒP(gpN^ӽ V?*A7C#í},j5мڕ[;9t߆iĘ0MX]c6-.Ֆ:UQgyh=uI{TShK¥ùIWLnPUg{ίԷ}&lt;]&amp;kn{5gIb|\&gt;|u&#x27;/\\ -e(_&amp;&#x27;c&lt; gyxH -ucrEdRW(&#x27;n99&amp; +f-fdSԑL_RLH߳|@(S ʾx~C|N׬ԠM6m&gt;_X$$&gt; -PZ\8YTZT -ڴ+qMfn)Rq&amp;2G ^ذי_Mb=*z&lt;&#x27;q -\ -4UYo wP)ּ@f3N(E@Gd[0*%8P!,? -x!q5&#x27;.&lt;hܕz&gt; - ЙBe 9B1܏{R,3f0.J\C5mG*d׮R\B.ڳLNɡ2i{އ)&quot;Bk -Z #u| 04܃X`t O\cQ&quot;,/&gt; -b)גr.9mg%nܵ2ت vNӇ!̘ÐWϿ&gt;4&gt;2$ بf%(Vn/mD2Q%ƜA v5ǡvޯ[&#x27;9W&#x27;_24ù PŔ|~2Ǵcr{jT;+:\m4\&#x27;2DrT.)\sw I&#x27;Fq:f :nu&lt;dzτ(tՉA=*(x::Dg1nύ8~_5[ẅ9Wc qm2.zSm =C1Ī -HBwzKHOT^V-W/-F`܋N-(z#X  s_ߣqMg~k]-#1-7&#x27;׷2Bsh|6^gy|t-iJ^ˢxeq]p}0 ηۇ 뜻Vp -N]&amp;pBn׃8 -ڛDHb̽qv&lt;VA\6LxK@v .xЇBF P4~}ӗub- gV3V̌ɕ{w&#x27;N]ܷ&lt;a_}&gt;v÷-8غMSvv:Ų{h ΃euJgY5SX9 37|yeHXLjY -$2i\,b)Ϋ-}\Zx]2G+oWj&gt;$~S$4 -@vVrp%ZB ̰e=it NT&lt;HS7*I@ q_k.5r+9ۼVs23ٌl2X#}$R&quot;}|ޤ&lt;zO:WnuM eDtKoM -Vӥ&quot;~%if)1^/{uFJS;w}/vj^rGbΫoN@Z[/#fƺΙ $E`Y3i3f@8fafK@os -3PثeI̙/7ow&lt;v|&amp;?o~ OQh&amp; [&amp;^7au(~?k4_`XLHi.IL;8kysy+&gt;sȑ&quot; I؈ZKHo&amp;Nn_4OA1f_wn~Mm=)sl6 TuCmwQpڝK=Pj;yny;un^|&#x27;G l av -ۉ}^9~jLn1~xb6pӐ^NjfZVL/Y4id -vՔU?Qk^)y6@6ۜ͢ -Pf2Ӝ1JD:MG@*R*~ ^BNFtG -5Hu:ݩ69t3%\\ -؝la]m*˷wCA)+ l).+Y]r(9~mYFWJ:Y6F㻛3e]^w/SnٿcE) o6+W(rW臭,$&quot;hFwT +;F&gt;ZmH,&amp;`j#AIYFeF?&quot;MO0==Rlu+{bᚊU^y쎛wҷ4?O` -,:N&quot;-ANW@G A DkQvSqG0#LJ%,\=#b*`u-衄 ȇV,žgWlrbS}}C+4U(Jy ڱy(ޱeUͽ+(|t7ilpfUamyN&gt;r8RK&quot;!i .14P *殡Dm_| dgΘd+E9mm&gt;鵢.V&gt;ͳD+Z{L@e* MKXPM|DV]HzG&#x27;@Фå2tw}&quot;̀ -{#F6%&amp;G?[GcHR_c2a&lt;G&lt;n.joߪ&#x27;Zz+=Xq}U{Sz)٣Qb,&gt;/&#x27;NFKڵZ%-jzz,Zx!0ɭܬZn%AV+&#x27;ĉ s2-z@ C#uL:A9l?vd^~q ހc?6m{Jt\$rЪ 4^TדȓW - ˀOR}@--ЂPÛP]} -X#D xM[gB@J&amp;S:CSۺЈɖ&gt;!]c[U?&gt;oTL[ݵ&lt;Z*{ʇ7xVx$;~l^vi4 Gh֯m&amp;-nKgĕ/truLtX^qy.zYC:azm6|j5,  ́tyQ$H -- hT~q&#x27;M&quot;igݘ+CՏV9粈z28rǷ\;yޕ;Co5&quot;-L: [9yG$tۙHU Ҕ5C\\ Җ+`S)PMJ$^F0#K O5g e&quot;xl)evkςJhAT(hDOG~-yݵ֖dWĈ0RRBq[+=FexcO6CH!Ju Fʭ%pm}|p -KaB(I\T~ -@H&amp;sS=i|xCBozDĜs|k2&#x27;&amp;J?H ާ2L --vR׫gS=zz8#3+PgH35խ`#vϗp{U]iP C $ooDTmEy*K١ܮ***wh[\l۵B8xDGߺ;?%%&amp;7lJ}85h[Cxd͊L1Fi2d_w2ibmz!Ld:uv&lt;0u8 HB+IFnp[tJ~0?ٛ$R7/%1¯OZgbΠIh̟\ڶkZp--*0@@2]U{UBMI@Ym0$u4m4F) vyK&quot;Cjφ:OE95q ic9U5RP`zibHj#MiHjՎ)!dgq,L5. v:[05-`_+D_Xw=-[íZ1-Z=IN|Jw-A tQ ܍ --f7pVr^׆=(7YXMV0f+y̠yD99^HʖƥFu&gt;|Dǀh4%HD:g8n9T˂vͲ1_l4L,+dRYv4NRl׸)15ۙRN(DA0&amp;e_oc7ZYi.Tr&#x27;o$8FDIP&gt;#$)Ga~6&amp;djViXoP -[gҢ3o)Î`,.7ؽZ.CV7,56ppm-wR,.QYmc]ZP]AR+AT\-]*n9Tmf3ԧxPL=,Q;Acyz_9V1Jh(.=9H7Һ ~X/*+eI/q$G&quot;Pu&lt;sډ`ET{w5Uؠ&#x27;q˙G|`L@d|@s&gt;4; GЗ3fp&amp;#dL-OSKQ)*p}\L *^yvZ珙G/K~&quot;imqtЈ `n 1օ7J;+O.[7Q29mtu*9&quot; ׺}ԱfO\}w&lt;̉^&quot;?uj -Ja3uUp$R {*-@*kϙɼ~{(G &lt;&lt; {x:D=3oDs*jU*J{C-9]ځY*-ysBZXOdmX4RZ&lt;%\3)GdX-7wG -gѴKvއB&#x27;ewrE9@6ʫ ůkr.DQt)P[#:6 -E i ߊ`x4@=K~vK!8*(Fex4ZQNU@++xKʃ+V -&quot;Vdo8,xE` p&gt;.i5|V_Pͩ3@ ф O,L/xLW6HT8.nr!V\Q6O5HyY+ -@eiUF=˄Yg Ll&#x27;b1{Ouk][dٖmY-/ceY4#/LI*Kc%#8IiC(P m%4mHH6) @ÁMmp_g&amp;!B-ONvfWnozBR]jut̜&gt;?&lt;ا֩&amp;ڇ ;-S:os3er3~v0i-4ukj|^,2|/_\?}snWZᳱa&gt; f -3 -vrh 4j(1*u+=&#x27;ڻNzϙO~x&#x27;H?2~OߧRoRRoSA$ D6A&amp;OuVJ;&#x27;:@`2 YTS3~)J8Y71E|/-]7岾/QٜdezMԕ\&lt;iқI&#x27;: -G}GwLN,O&lt;N}_ -Ux.6Qm,vPc=ff&quot;&quot;م62$0drut2C!X;V[e5J(iVs֓`|l-h¾M1&quot;m0 T+&gt;/WD^JMG_=`te2t{,:ӪhΩC#@K(%A1UT_k08:R-!G&#x27;}aV)I_GHݭY2Zܟ1X5to?z{=GOZv064n&#x27;6gXM&amp;E˥&gt;&gt;u(wfvź;og]R ;̒.%}XzA=#8qCgLW+.977&amp; -WS#PpΑv6P@&lt;r] `ɩ-91@vQ.R&lt;&gt;?;gG]@7#&#x27;rJmqZ f pG{5oV_L.:&gt;uFF&lt;i &gt;..C@j3!#p!|uDjG[U&amp;TmnS:;\XƤ]]Z[ *ֱhz˖|f+F&gt;}g vQ+Dm =|eoO g)%ri5zv֓:T;va&gt;2 -41\)@`?,xܮ tao7:nOq9aaQJx&#x27;}+cŪ}&lt;) ٰxl5=IӦQ~P&lt;.wM=kڻԴ`%rD3nw-&#x27;6}2Q-X{݃6%=WK8F!O4K;}(~?~?=-~-4k5t^9@:~W} -_x&quot;K^^,kxm33䉰7&gt;VJru -8R&gt;:wV.&lt;SJz¥~6&lt;달$&amp;U#\%aY&quot;9l\#C%`r$d #_RC!KʔC=voG;{m2 L4F0bA=:8hw=0} -b}InkkuIGFM%ε16 -I))Id{{ȮAb/CWEx/(זx!?% h6ߠ]+;ki[Wp%C):z*ۊ^߸[QYԼ8؉\x^Y}㒸x|\&lt;hOkԴi5@&gt;B^q,S@oC\SBW`QPxghR.%x1qtZ;Mm&gt;cdgq}al&amp;Y.hV6ϯOk﷩NN?|eT@qOi*,fAg ۇ|:Jk#5Zժ8L*1%R*bwjm -4Dh8 yf~|xrHKYTed0JILR(Z#M&gt;z7==0ߋ&lt;(2%xZr&quot;CHEi09j|f&quot; NǏ]7UE=z(p⹑ɛNFn&gt;o95+ -7ݬ$n&amp;\&amp;Ψz.cy oU@PS ؐF*E\ƀ&gt;`7ְy+T{ ۆr8oה&gt;sv&gt;Fq)?KG - -503&amp; QJ,}(rRNXNIf+$}[!q~%B! _1Sޅi1$Ico: -g\и?m 8tϼfӌFnкFqmt@y&amp;]&#x27;I&#x27;;w)IWb N&quot;0zۭ -Z%9@3nۧCΞ`~ҋ4uF&gt;j _ŵgImJ?d&#x27;uzDѧH5uaj!u˵:BSB$[s/Le]Tz.LR:ZA:ţ4DQm3I(~@{&#x27;nA1::չؽuOo-jժ|1Hm&amp;ɲNvC&lt;nk &gt;&#x27;ov竇B`+W?bD6tCp+76Ȗ&quot;? -(=l-Y:|*p[FNIZKG{{4cbZ1cc a_&lt;qJBG/鬈jm穙ʁ۽~.A- vt_kh5~!c&lt;&lt;FM7[/P_`,-x\4&amp;LK,}B,ڶY?A8 &lt;luf[wBw9Ob0=g[϶q}%π`^ -L 5&#x27;č|~lɩf`6ЂNT ׂ ]~-hA ZЂ-hA Zj &#x27;-O-hܝsߚ{1: ۢ/&lt;$goabxr&quot;ȩ ,-jvS7Gׯǰu=3 ;™6 -FƉS-9CMMJte5#+5 S#Emd( -#pZ$wGR*3N!KN#iH7\F9 iYhF65&quot;*)mz?PD]N .\kR~RR6qކ&lt;ېEMmx8oCm -y!Fw .o_e\Tx y7-6s P~-NyGe&quot;`oB -.KבS4e =}އeRrr,-=p}C -X! -Ò&#x27;-AY)qL Xۈ[?Q&lt;]r?GZfh䉞u{bJ]0HiPi7(5o!r%[F ֵ&lt;}h_`_ng+=zU&amp;TΐUA$AȌ=&amp;D={%ZnUs,bSպ_kY%9,G -|P$|v|߬@&amp;q%ہVUR{m9j7U)kJ:ظ:&gt;}uB\A&gt;Sl_4OTH%$!_52m ,دe= -jܯk)&amp;.U¯dp_$#9U/ W^+9hWDXڋ-q{vQLzm+Inę-/yrj֡@kdQ&#x27;&lt;&#x27;#9-Bj2o&amp;,S8g&#x27;jWe] Uzj1|&#x27;Dl﹦yP5fX^M&quot; &#x27;T{u_6އC+d2XzVmy-g1ݰ&gt;OlWE2\9r&lt;vZd+c&gt;oX-}5GX$@CAHӰ_&gt;WArLjdXD5b`3m5=%`b?uۥȕ%D6H}_DFV(K_Zj$cUhVy4Iþm+J~]vV`_@6..FKR9S͗lP`S -*\&quot;dU8Yٕ]}^-.l{P}XL&gt;b#gS6mPz]d{ -WB3RoL8B0e+r~̱{WfXDM\McM.rl/es\%[b W t~%U1 [-grN|y; -&#x27;.2eַϖKX3\Y9&amp;WזuĬ~x]v)3lTHf9Xe&#x27;B:&#x27;[ȃ[bu=Wcw2ؠj͖L|e&lt;g3[Cm`™ -˕w*&lt; ٳ -r -.nV,#}j Ev;nl^]MRp_Wl2WnܽNkX.Un{~P[/Û -)+Uw!sV -- -Cx 4`fdTpm - - (&quot;[&lt;|k t¦.r96屑RbT(-Uɀқ{xVp%(^ {kJ4ۥWr\ R2V.[X#!sy2&amp;l.rM3d?&lt;d&lt;x6&quot;Elg@M4)Z+(yp ^~xصF$ckjjLb&gt;6Dn$4 -R9ve,cO&#x27;lj*Ʈj2r4&gt;X^d -LL @4bDl -[q%9?H/c @4®FRDt=IՕˉp-ŖӃad)&quot;_te\*O| -b Yd.YRd$g#KTR F&lt;F_GӉeFte9[?hJ׻n$b~6Ja,V&lt;6&#x27;X!DrM4k,Hh͍aS&quot;&#x27;)}&amp;:TNvRiz?%g`a$&lt;|p딼uJ_mwJ?l&lt;):-oN[Wg։uZS֩ةy2CW~;0S -NEp|xm#o2/w0 -q^G &gt;wP -+R)Agm~6#&amp;lѯf| B] EDnEDo -1?H?{-)*^B)?(*?gy|AAJ&quot;FծZ&lt;7_(uFAzS -VUߡ~R?ԟF3@s-쟖gege`ٍȲpݒ-ܯ]M7/J3ls\*3Xۢ-endstream -endobj -289 0 obj -[ 0[ 778] 3[ 250] 11[ 333 333] 14[ 564 250 333 250] 19[ 500 500 500 500 500 500] 26[ 500 500] 32[ 564] 36[ 722] 38[ 667] 41[ 556] 51[ 556] 55[ 611 722] 58[ 944] 65[ 469] 68[ 444 500 444 500 444 333 500 500 278] 78[ 500 278 778 500 500 500 500 333 389 278 500 500 722 500 500] ] -endobj -290 0 obj -[ 250] -endobj -291 0 obj -&lt;&lt;/Filter/FlateDecode/Length 526&gt;&gt; -stream -x}Tˎ@sV0h,$C7( c)dK=U]~vm3 -UG;sփud/M)#gĿյ=^6w8&lt;˶Nj;4EȎ}^m;KSQ۳{s)V\z]_ۣB1SueeXoO*6mEPu:Wˁ# -PFQgFa(C]}(`B՜ZBIPJ!%w %GYRi1S(tqOhe!kFva8Q0A &amp;JB-&#x27;pI LcjKLxr r1z)&amp;j -=i0?*Kq4DEc󶒁bWU-*rNg:BG,gcxI&gt;3G -&lt;t({q0G/ts~ž맪$oh -endstream -endobj -292 0 obj -&lt;&lt;/Filter/FlateDecode/Length 25106/Length1 64696&gt;&gt; -stream -x| |̳^m͍ -&lt;l.&amp;\p1$ᖐpɊ#&quot;(hPP\RDj)VZ@&quot;ƈmѪ/MUھRb{&lt;ɓ%AP~ߙ9sfΙ3g&lt; _2q^U=:w [ +Z_]3O7F?\xMCgǿEgAy5Ε*~LHU-My÷ء-ZlA}9;W7\rk[Z4,j!Wu&quot;0V2^K[=$Bx{W^՝EA;B&quot;B[&#x27;YIDCKMvb-̻&quot;ޯ8&amp;NQ-:ﺐv| -1`kys:J-ky-37}HW}I|v찐+- | ra&quot;-x[Qw*-C`5§t%&quot;03NQϞ13bLeE7n-@A3xHP-&gt;Y5% ^#쵋A]sd}H&gt;5J1B![M ~SP;Ÿ -DJW֏+B*3`-gz ۄo@&gt;٫޶;.9^.qQݜ ߷׋2e~F}7k/ok;&#x27; SYv)_~/e77|&gt;]DBwkq{p@xBؿPJ?.&gt;V6F|ѵ-)],}_&#x27;Ujy&lt;OKpޔz&lt;.9ZzȫuNO/n&lt;^S2rN ;\Z}?-uZ -@蹝￐Y4#les|[|oMA:=-bu_-{n0E-:~6An@ N {+/=JDBu&amp;\ۻ;yW`gv )ƒ+?Sggθ_ZE?bl7/&gt;&lt;ƁwOz-6u/|_0{뿨\Lv&gt;fŤ,fo`*KٿEŲXY9٤.! -Bؿ:_4&lt;4rH]faBa^pȗA:\)|HGq a.t `!vH qN0a&gt;i!MT3&amp;Rkl&quot;] -x-grS&gt;azN&lt; =k-ɦSq̈΀gNm̪GjJ -xrF)ߨUx hmծsjzV ~%^?NRqMm -%]y:+Cgh.gTMĐtn/ -,uR]ˀB&quot;Rk!s:찑*rugro9p)#&gt;dkNgZZYO -zCjbOu:vB_)jwѭs=tku]- -8T\_mO&#x27; xUB*IafK@aƙ7vHf2QHP#-im{@ -k&gt;V_`%x&lt;Rs@FHh&gt;y*Hk륁ȦܺڟF}GrKۥnW[ϩ+mX4d:Zwσwdw9k].oo)mيgט72~rh.[!cFX\l3Hn:me2&amp; !LkYQ U[3L5&amp;14[ULj7z*kW8{]EvzI0v2 -c &gt;xr,R4/q{̆,º*WIWעx끣˘a%l+pr.aZDx -0l{š=Fr}I&#x27; |Fre޵puV@q,,WJ0ǥ:eH%2Qu](A&gt;ŕ2D=XmW9^@Ris5!؀Ʉ - 8k/Ce~㠙+)ݯKDK8@[묯*T3`Թ n%O%~HЖr̰,oXJhE˭:ʠ -(Q}f9] -`Qak[2`oRWX fK0Do ,f̈A3ö9˜l3䅎8cX2B{ \n_d裰ϵnlafUJ&gt;&#x27;B%VAD3*vZ1= l&amp;7 - -js}PDOXFA^m9Ai&lt;r6zQ31Љ - -.C=Q 1ޅzQ k?eʁL!$O8~f!V13z\x(ReJ2 -q;m,J5CêrݰɭZz%-s2!! $@\,-Wy@bouX&quot;⚈Ikb;!c0EF@77L&amp;:&amp;&amp;:Z M5Fe.-u߈kҬY҂uJ#F{2`+҄YlXFLEU骐x&lt;NT1/XPm(9Ih -p-c{%C 00בXB,f97EX@x1_po -C&quot;0KQOMBۛp[km9[Ңmv#PR$@!5f&quot;h:&amp; -}Z8nٽuwlsV1l͸U9ےɂ&lt; - -,kLt 7-FuÊ&lt;킵}j&#x27;(AV֥-:bz8.NBw+S~?l~ަodL -,?4jzBD -:^Cz0/N}r7ʽbί +.GpǃK3lB\r`9*zG&lt;~TU-Q{Ue4U{HU*jSzTBrGʖBU SWn* -Teւ[+TedUy4AUOTuUqT|UY*׏]\7VUZr۔ks*s*׌QUc^VӪF)ͣTe娃ʊѪ|ʲUi4f,V6&gt;{${ح*F) GʂwԎ(ʼ,U*5R*U9i`tirU$ev\9LUf9Ue*C_Vf U+)SU))^OkSy)W*W8*cʘQ9Q(#ya#Z*!Ve䈡ʈdUlR2* -%#MIwT\I ӒD&lt;8l2,B*CT%%8&amp;&amp;g/H*H,D&#x27;%..?vnLmn̏k̗Fxeoֹ|\OFy^x-s -\Wct{=ìV X*@F5~&#x27;` sԶSzw=E3۫kd8,ϩm -zn&quot;n׾-i7)V՜UH/b&lt;Kmr:~!~t^&amp;g&quot;I~KnZC99M^%Pt7@~ J 1`7N|?IQA]h;&lt;EC7A{g@ -8B9)&gt;IvgK[7I8PN@}&lt;G^Q&lt;zyj_-㤙u&amp;$L߃?~4g[Ɋʒ~bCd꼾O&gt;Ϣ&quot;:c#3 Aa5yhbx&gt; -8z)gS&amp;db&gt;koYUicm7/x!NciJKS̾&#x27;&gt;z`_LS1|:x h4 0z0ES * B&lt;4f -$6nb#hߦ$iuwx٢!H_3;u8kh2=Ɇs:|J\zC-5;iL \O[} Ssi2(e;,Nw0M&quot;pd&#x27;qtT_dxԊ&gt;Ucq%Vge?!fB̾1&quot;pJkO8vGV!vjVwAGa`(~Vuj6G۬/-e7DI .xo;_X߲{otx5W73&lt;?Yԛmw7r*%&quot;ml+2a!UWg}àxIE?N2y w&#x27;uKp|mG-d[AvNv-y`[ю&amp;:j߁8jj  iCONhLORjTԚn/e0 Sq$ xŶaXlۺn-ħ]Gk&quot;5Bh-uukg,pĿ2@H8-%!$3ШD_\bc}QV9&#x27;sp~0͐ hiF=xd+8Sz[LJWҥvz΢άYN9=x&#x27;-sJﰃ&gt;YQi1,AYoDVV&amp;~zbb cu&#x27;5?Rw}$#R0g&lt;ۣl&#x27;lcFG_a˙R:jD̘w2mEDx}1Ha7.o/egKI{r[ʓʶ+f8ȁ[Z:#&quot;${;]#} wDUHu/&#x27;&amp;$CTI9J} -P%1pV.^v|Y}/veՓx]xW;?L8@VR&gt;! #&#x27;66\jY V5GVrsMʂA\!R `rclݙYw2vIoC ??+czQ\&#x27;NyHimjA?鹸O(&amp;:J2;~;|él;~}:8n;C t`K&quot;_#sq&lt;r)&amp;3I53+nwKJÆD -6rԨŠٳLJTҚ+eS˧&lt;qtBtlsRt詊h &#x27;~#yO{`rZ&lt;}rDܢ핧V\T}yn?ѿt~(v@qZQzݟf/{0޽`44u6|͎7Ԭ F{lf~|LiYfvk=&gt;og25-Oȡq+Zwl-n&gt;dTݨyS -O&amp;Nl,%b•EDH*jFe3ϘI$*$`&quot;fm;Cv;{&lt;Mw=Ԯ;v.^Vd`f&gt;9c“[O6-&quot;R˰;T&#x27; hRm0C WWTUШGi非1R&#x27;Wo잮aW8 n9.Ϟf@d wty.#^:]VuVǏ/{fnr&gt;1jK\gE[} v\좞ٮN!Ya&#x27;x|Πn/ -stw5ko8zqǀaxcm9IѮ̜2l1DIB&#x27;n8sYF_dU(f2Kꧦ&#x27;Oy膇o&lt;v3 -wpcҞ_,yY8ٵo}Hb27TܖH{n|~ìYw\ڞuux͋Ap -KTtD+ -5:/G 8#y,W݋CݷGQ -ϙ^[6\6fs&#x27;!.$@ .; ą&quot;(EDH)ZH+&quot;OJE棘OiצZž/dwΙMP_zA= AO[:G (S &#x27;Qiͦd/NY*%d*Ґ-&lt;4q/۱ic_voO^J7:5Fuuo;}Dt)o$e - Ze]L2Gi2cev-z]e;0Tb B#{|HBrrՑ:Vk\b`mP`u6=տLo籝;O&amp;j:ھ~};|g\~o xu[kN[ce/m{WW_x-h*d~QR12ǧ&lt;Y-Ͳƛ)F͸[UfF&quot;;xCO7%?,:W*u̹=aYq3Mju8fĴ26ٹHGTi#ʠE(}^kjbe82(1id83epYBo3}ppu?9j8g8zSWȋG=5pf%ye䩏&amp; -~,&#x27;\ =%&lt;3$2&lt;a3Nf&gt;D~Oa\rn&amp;ທ$15t2rc{,&#x27;ׯ))W5֨aw&lt;O7I|c׎ƋϞ]?e&gt; i7Y&amp;fW[{d-8;CK N@ -Ic=K&lt;C}s|;e$7igs0 $I0MyvryeZ:gˉ;tn] ?P[3^ls~OS1IBݼ)#-)eI86]Ll8vȇ@]FcpJ`+/:jpUta[&#x27;b`|Pހ x֘hjҨ$q7ڡ6{\i[BwQY6uJv=Z-% LGrg˲V۝E!J2DRu8^0sANq&gt;C^SdO/^{i5w/}ꉶ1o=޹HnQhMM -ySE* /#k\.Mikv&lt;HgT1.LO4%I;};FVNe0&#x27;fT-TP)?msΦ]6=kcmmƦ9sƌ[hV&amp;3[Y;뎂Y - *vJsFB4AlgtY -R;)4{.v*4P&#x27;7)7K1iOqsj?0ezJ75Pvޛ43׽9-q&gt;&quot;n Ҵ9&amp;38Ao4-&gt;-bՋlC3&amp;Rc.0n)+!K -vPp4FS1)&quot;X,ʛ%&amp;cR2sP*&lt;Px[Ѹ8wѶ~UAZ1w*{~`ԙ]xAyﺮ+ՎhV`a5FpHc2tE˲^&#x27;ZDX/Gqdr[l;S!}ڎ^F3$w:kXthB4oakUYq&quot;dFmQL!cEC81ZL8RFE왔#}hu82Gˎ}1ь -ְ&quot;-kM#Bhm=JMѳ&quot;{b&lt;CUAeū:;˂spn1#蝇HY8gdf -П=p$+M^I -0bkqoYB-Yp8&gt;C=- w -yW׃S:;%|ĤR-Y1/NQ=Hm+g -q5Ɣz}քmYbSU|?Fkܐΐ%r.&gt;09wjg0. -4[21f췥j+1OtJKK҆SjQ.\1Rt,8U:i61JL_7-fDd0^f r.HoIAģs礧~oWeitUꓖ~xp8-h45r&gt;;5Aֆ -_? - W{=ï&amp;܉UbٵxJmF3=kO|&#x27;0 :q!q%&amp;f8 $7WDҐ6xرa\։fo[,8KK_rD*!:.}m#~#7#Z8#+3Mkˆj# _`(\v=A)boe[YgF!&#x27;e=6tZj@օ.~}W $[ZP3~ - 79+ep{&quot;22ΡFPETU#&#x27;;k+N*G|ƂBљ.8 yY/7SEM[ȠAb9v 6N ߌ?/a*5&#x27;`߹Q+~xɔ-/;~wAއR_Z`;&quot;x:JHBxX1, f5#T!Xsx -}ftYsd&#x27;OJa;Rm*_-X͜&quot;DKycOBëN.Ki@Vz%4NN -7w&gt;y^ і&quot;/E^4k?7*41}fkkDy?ZK ڋQ1I cgn4RCz+u -&#x27;^4@-^V̩`j&gt;zD/QkJ&amp;&quot;UY%x.j@7X16hJ]ߖlFwIG]7#*Mf+5ijL:5BHL6{Io5ު-jKDyYեq^TӂbO]([l߫ -w̵xmعH7-PN&gt;+PLo r+pY(԰&gt;ɐ?NJܻ8?t6C&quot;٪dﶠ&#x27;tr9pUu+4r -V ;.$Rc1b&#x27;1 H;)zAL -Enj6lsx%o3:00-Rڭ-~x~n,LEK MkOϤ?AHh&#x27;-fM$1&amp;.v?YmWg&quot;Q֭x~k?&gt;zF9+4 -Nc/lB#/F.V_awƁWΩ6u(93zLR7.nm&amp;l!yM7D%(d7^WtC&#x27;ů̧hid .r|T0\+d5LWAE]ģOi*ljIO2zԨ8SY,/LdM|S~X1fΨyݾG6{yЧ?{$3|&lt;VJ/oYvyɒM -B]/e]EˢOY/.# -]vt&gt;;߉RZ iN ow_f/MimRJoǧN#mkŔ E3* Ǻs -tAvz=JX?_ ||{HE%3;?J*`5SX3v=fLT0TpYI,cӊ&lt;gN:ev8ԷIcJ&quot;OVVLorQ̹7Nw&gt;͛+۰xG:mlid -]δ/~_JY/@NIi1zS})uBJl葺I[iੂA. [~VVvFhLVD#5E6Xy9eX%z$өES[V&#x27;kqD% 6wӎW_ԫ}۶1YYinyi| n©,j,ͥmccH&gt;.asF=lp6gj ;jŘA=U^%/Ʋx&lt;߉4_]nB -34z=xi(qy_{}Vzuב#ѓ&amp;Wfyh0}LN{bƏ_?sJlouccӲ64yOL#7-ɍ&amp;E^kl@fl#=,JdY|UŪpCzّ}Ғ&gt;&amp;Px UO~YMVs{gO}_2ظ4$GUj5gQWqJݒRҨ6M -{Wji(*kc^dqi}@^Qߙ-%=i`OouVA&#x27;uϱIuZDrɟ@v8‘&#x27;o0fYR&quot;NGv)ZeC46g}h\͝^&gt;N6ʛ7_3NkأtKWXi-0Gd^d~0C&quot;,-Ti5Sf\&quot;oK9Vj+1!y -^5OnfynOd3z--sss$:#%R2~` }Tҝrq v7{ -x  9LFt`? -^O=9 Ѐm&quot; -Hё5*VQ] - b?&gt;4R%֛}Ҟ+cL-`-TQQx&#x27;5uKM2?]#ӈ]41uyr$umBR -Q r!+Xc `ۼ:c̜$2Z/w L3-jUi Kx%zzzˆhJdyTl{2ߩ(&gt;%!؆$2Q!NuV#j 6&quot;ch&amp;;=&#x27;zZW 2J^-mXA=gҹOnK3KBNyMx[ָ.E?vݨbat񦢋Q-SJ#Rza7.#OF+Lz[`+AB -c4ZFc9y -{-&#x27;&lt;tk=8t2$DŽ^փQ|YZ2i 13bBwh7 s$y?0a&quot;$Kl7:&#x27;JT&lt; -PtBU_?Fp%&#x27;5/)ZlB! lyI9_)rDI4˅zqa3]p,vtHmFAǠic{u{mwyy -k+f&gt;]W^BEϫsjOX^KwCJTyoZZ9]l=`WEQ56Q;&amp;!%wI8IL:,7CҞDag&amp;mFiLy[++4ny6._ظzsڞ4jqUٺ_2sĊuKtyy/ LQelFXsS |q揟JSp;&quot;D0Xqd6C&quot; 2-.bF{H4yR6($aI+L^QChxKhAȤWP&quot;HUE`Ǿo] -BUgg4@-3۬4›Jz3CLrG)Ukz 3gUT޸cܙK+[gPbg\MuϾ73[q Qc T!UNSVJFkfqtqlI$}^ǮI),LY&quot;ZFz-)QT&gt; -ZSQĻ_-y/9Q 2I1%V]n5=L&gt;Jta&#x27;MƎNKlBmێ(-n/+5H&gt;N3Uޟ6O3&lt;Ѹ**yvSÌy38^yI9ON~Eډ]&amp;mRFѼR_ҩ$Ŀ~كUv=[voy=7Soҹ$e$~a0m ZlH{^KWhdbr -F1&#x27;WJ&gt;؜hxِu#ċ&amp;-U_(B IUL41, E7+Y lR7TRCǣ̐=q%3&amp;I;5HアcF$/V⢖&lt;/LKPҔ-29v4u%ڵ4xC*~5NͧR5ˆE&quot;q#Olv9ӨF4lXXO+Xw,*? Gvtv `&#x27;|ZiV ~lԉ@6gAua -LkiBo x&lt;?b]au / -ֲה\gpc\#u.aܹuUu=\lx׀+&quot;.Ty6cd^I;3gzOt$ Qa0|Uv͟UA.XS8\[QkQ(pؘ2?&lt;//kT38tVFW&#x27;0%nsZs C0)Xd*e=7+Yt7/=4SAD!VXqUhg;DJ“Ѣ$&amp;jHeD -G`S/&gt;uClx&lt;bY#)U2P8dL:JA@2JG ϰV!(|zZ^&gt;r*n-i`rh`Œ{ -Fhxkt̰^o&lt;m .6hDy;?oS( -R;!r-AsKAHe@fFt3&gt;X$A -UX@=ĭ!,1Fs #&lt;8?6F&lt;-(l%d%P=(!nIz?6$1F:2M&lt;O$Q4~gGpA={eu&amp;Ƀ0 2IH={&amp;!$&amp;L̋vrԶ -k}[Э,J\+-&quot;R9k}v~Lf&amp;{7{$!CJ f7yߒ7thYc#yOL&lt;NJU܎_&amp;KedwFzod?H*FPb2ezܬ53I|FɡyvO)&amp;/k.?Ky&#x27;wCsab N[[vO%dTMSTH3&#x27;LE22{/7/̯lh{$ePIO2f=?֫s)?.߁:J[/O(ٍbƲȳʚIoh$͝KABycXZXb_KGo.^oyhg&lt;(6Ԕsu7+53#&#x27;[U=RYqI3c(;JSd0!̧&gt;UN k2Ĭ$`)J;[FWweS2r٩KMKuBzWU[Tve7)SՁOYɊSNiγ{Z -q$k -T&lt;+EXrXbVh6h{{{+ -O;$A-N&lt;5ԗU1*3B.ry@׏4ʲ2!{ZS.{ӯ}x9P TDIYAnᇟ@JCEx|%laKT-&lt;eqW,Nb`e÷-)=E~CO&gt;aqg6}_~D?QX?gPk ژk|ٸh10zuvcq&quot;5&#x27;#u]aoow{zBٴ-/d|!-@ -kz&quot;=UzM;|&gt;˞,;=}kُd&gt;)y-&gt;wssϛ *&#x27;\3aG_9{g&amp;&amp;NX=/(.{; 4cФ_P&#x27;䤓=,XW\$$  [l(?]Y])Vў?TS` Yٔ)5SnvSNuO0~?L9ഫ=?ioMϘ&gt;o]]2ђWK K;f3f8L-+* -=VvOڿrWMOWЊߩ_髼Ggyf}}3UUUǪ_q&#x27;^$3 IHB$$! _x8c$W&#x27; -;w-|LRRON Z%3PjFJ%Y.rHAtu2K hA* -=&quot; 8Ȏ1 Z&quot; -Z&amp;cVl% %Jy -Z}&gt; &gt;K~J -I5* $ax$*DHRwjI@!inx]0&amp;0օav -{vBfkXg&quot;7aϜ~n)(Kh7tPLQnػKPTa VՋ; iAkjqpYY6JXY[!tg0hv W -aq&#x27;W - }=-=dfch`Rt?\w!jag|`fP -]u;=YVuP#ʔC1#+-㊢!5xs~h -S-F]OYe`뼹}Ю, Zs;At`vEf2艽˥2#R -c|UQs&quot;cd1,`# -^ -:%)qVY0j[&lt;̳ەׯ0kt3ڹ|aQO0a?gކv7r1ou|h:DM鳢/QّT)5&gt;}/s?=d&#x27;$~*3/&lt;;AA&lt;5CٚGDaf۵/{OX؎Q!&gt;F9r+^oFVb1jk?(NԪWe3C{B}koo-{&amp;e3):qtoNk -sidm&gt;u|^x4Oޘuh#-g&#x27;6-Bxi;Faf@R܋ޅxͮM[@G -[+l({j؊:Y -׌Oe_b%mqkT )&quot;jB܏GK1ɒsmvng¥,p3&gt;#r9ꅴM&lt;ui@ &#x27;Dux61ӏ2}q=zrɚmR!l`_fqnES3Bb(DO7&quot;B=ZW-סUw|@3y[&gt;-[ŀa&gt;jрh٭ w_h[V&#x27;,=ao pmSււ۹V:\یW,6c,Ze9f\ΪEZVYHHG(l$-T;ڃ̞;ղܽ6.^{tٙkź -y^O+Q^H&quot;I-_N+._-?-z~Q~ ʯ}D~d\&gt;JUJ7 _ V@ZV6-GI mv`I -{z`d-] : -@?D&lt;B7ҍ0-t ?nz@w@?Gz?=--@1zFj`sT**se׆-xRF߮wg]Q{L~\?CWw)0T$-EF1ŘjL3%F)X -B?}@;&amp;-j#Au){_{}~b&#x27;Ǘ$ -endstream -endobj -293 0 obj -[ 0[ 586] 1[ 586] 42[ 586] 78[ 586] 111[ 586] 148[ 586] 202[ 586] 224[ 586] 251[ 586 586] 258[ 586] 263[ 586] 286[ 586 586] 297[ 586] 302[ 586] 321[ 586] 326[ 586] 338[ 586 586] 348[ 586] 377[ 586] 379[ 586 586] 385[ 586] 394[ 586] 400[ 586] 423[ 586] 429[ 586] 1713[ 586 586 586 586 586 586 586 586 586 586] 1843[ 586 586 586 586] 1848[ 586] 1856[ 586] 1859[ 586 586] 1862[ 586 586 586 586] 1894[ 586] 1993[ 586] 2038[ 586] 2042[ 586] 2044[ 586 586] 2064[ 586] 2518[ 586] 2529[ 586] ] -endobj -294 0 obj -[ 586] -endobj -295 0 obj -&lt;&lt;/Filter/FlateDecode/Length 348&gt;&gt; -stream -x}Mn0taCFBHET{H YpD,ǼgթD7=&amp;vRh@.pb&quot;:&gt;-޼oz&#x27;+^IdN^ -79eКAύziz kWԻiޛ_ǬnFpЍR2feHqW_.-jUҘ9}UC&#x27;&#x27;+ TPF2G Ri+Qo[&#x27;#BTY0z--GrtP$%G&quot;Hx#p9H1Œ6Rt_[oZtpt-endstream -endobj -296 0 obj -&lt;&lt;/Filter/FlateDecode/Length 19576/Length1 48180&gt;&gt; -stream -x\y|SUI&amp;JSx/}M -@iiK@hi-K-&amp;]FPQqD܀QR-88:tDgfq\ƙhwoJ(ߌ7I۹{ι@!d/I˸k-BxU׌lQb!CxԸUj&lt;W6i3kys -Bnh6{u&lt;0.FLC&lt;gNs}S~zu?*z PΘ3uSʯ&quot;2wAcә -[Jۼ Xڠ} K5 wm@(5kŭʝ=Hf5_݊2cfkW]̸oQ7?j&amp;?vZƈCZ-wn+1E -H(zZ@f}1n -#A-H&amp;W8|v⎣&amp;n10GVD7XE&lt;)&#x27;Cir4 -)P -HeK --9Vϗt1+Ya?-vIyՏLFV5 {KR+`-O0頄sUEc&gt;]0]61&lt;R⏣[=Pe|Gt\{|$RRl`&lt; -fy20j!3[Y.)X`(*?˦Ec\?%cgk%&#x27;uXl(lK!u$uBf+02g*YB-#%2Ie -|7&amp;g2ף2fc_U}ـՐ0N (,b9vQ`--ԯ*{KR~63Q}(oo.uT}N2-l?@z;=)d3_1JY&lt;?}~QĶտ(vAݗl -kX:X~dO9#и_ R}G3ձ~@w@# 2 ba 9}X2&#x27; h.?rG磠!R菳&gt;&gt;k+Bgu{r%}3|@\Ң((*%qYz26|]S^-oS뿼^C/ӝo* -/&lt;Ș]Dv;Ki/(t7y.Sד|7&lt;EM|{a׳\;Y,olБ8.Gm#S_t,a4 xUg;I_ϡel [P=$r aGn}ƛb}w3:&quot;xѾeߡkU&gt;շxjT]|ET~p鹳-g0`^}Eb&gt;EPftTOH!C &gt;&amp;-&#x27;x^wK۠-!Ƹ 1-CfuXMfXH՟Ց76Z7ZkGѣoYZ{^;Nt_)pO_@t]+_gyFR8k}! -!n6&#x27;!] 鍀o&quot;ĸW-F-|8 -U[K)Ð^GtbW=JOCz5&gt;@~BY@Av( -+?= *AsnPH4XV8X= -#?HEL-`N۱єlJ|r-;do3жQSW9S$0aA -krS!no P#R?(O^Nu!QBZP -:BN$/H ۃ!|iZvX*nz -Ij8̕3!GH-$P%*ÃBmjVFXZG{N;8ZgDA@[&lt;jRezhÈ(6H 41h&lt;zOr Ru-^sC-CLygy\V$2lCUd.P熬d) &#x27;(XprӚB8dZFEKZtrq&#x27;QʥRJKQn-uW:LXMriP7x8&amp;T#&quot;@AՑf%(&#x27;}qqNW6JHp:B~{hERjkE*/h2m9iAETHe.8&amp;f -w_4$T\SsNP[Tv.4Jq[ES`5EdC:8f7!i p!d`2 ]!$YAd&gt;Y[!KeH8*Kxk MݦqZT5j\ǂd$U`D䃁(aB -sO9/ԨnJWG&amp;yCU&quot;wKdxAUYUIo)xz夫=0 -jTKEG_#NU?&amp; 靠-GL4 Ibsʛٮds7^Z%&#x27;T -C~ J -UQv3j*qX%``kcBra&lt;$1vgd565у؋HhUv)qM5^]&amp; --s3+K]ȞE$&#x27;mF:2j.ԭlMg ŨmW -OT= &gt;LvezVL2.A6+*2^Qt6,@&lt;5m#4Z -&gt;Mo9kfu.s WFP$el&#x27;.5ulxӘA/wHJ1`.B98\@C8`Fȃ+B+A˷ƪL˱])dP2M1-S1e_8]y$L܁f_vZbrx*5&lt;k@p˔N N&quot;4!3~HٜSG yX(*jW) -Ho( *uW+򫏋ˮ-.K(bk&quot;.&amp;򎋋q! +87gxm&quot;sbK&quot;&#x27;Ν ni q&quot;6 &#x27;ĺř3(iqj8%:.z&quot;N;C5&amp;W)~8ѥU8!s8ީ2qd+}b后q&lt;[,K&#x27;+(HKX,*&gt;Ug8A[)bQS$0&amp; -ss\Tm7W;.Ok+fNpպRK#f, -&quot;d2YubsrҴI62v MMlj*%\b/8D+Zb,XTQZO -6CNb՚}և|1WZYhpqWvI!}rVoBvTo;ƷmތzWT{r%Ff7P尻N6_܎Yڽy Wل!)r&amp;` etaxB&#x27;ӸnF!QAo#,S0iAkt&#x27;Þ}H}fx FPGF`h t-ﴕ3|,X2B &#x27;逛8c1q%kHo w; {P}|.(pCsgO=(,!sp94ζ;F7Crpi6#+Jl~ -Yb0Azux[p;{P#v$r\2&amp;sdsKԁ,:,ΏNl^(r&#x27; )D&lt;&amp;UuL&lt;ZݍDOrI&#x27;#`/|Փǣdt&#x27;IY3L |b\ HS&amp;srrlZmɅكFdAR&lt;乑M[*s:Ssf-o;{,7S|ΧtnΝOa-&gt;m9&lt;q7O[b牅qUc%&#x27;cXNrO)y~=J9#|D4=viH -xb-`4ЫWN } =Y=rnW&gt;#c:s߬ _aܜ_TfENJ2nL5/= 9^?sC&gt;=:I&gt;Gi|ŇwA*\/zļ&lt;cw@,%hBl&amp; -(5E;/.RDbmw -8P^魁֦s1C-F*dX79X }^tL3L \_x!cFq+&amp;YnsG&#x27; -:`[ :/#A meՓ5 -zp /ߓM]&lt;l١f&gt;_~ѻϟm[tK y׃gÙ8͗ HzҐ7-- Zu5r*/iܹ M75k,-,W1n_vӻքgv+$hfwo]ķL$yy&amp;mo&lt;&amp;q1Xf&amp;^&lt;ol5 &gt;yrXzfݵ[74z4!ygxvJ0|53P%zLp3?W!j2:65 g|`M]j C3+O-9r?^y۰iҲ{y [M߰齮@|8z-x[J׉)fOLo&gt;U&quot;c./zYsE} om^(tI+*Iͱ|m-n$11մFkwFcw;}ո2&gt;Ms &#x27;TD7 - -,$;W0l4^ Dd.*0st 3xæߙ0tlŅ9ܶٿiyb8c&gt;3EUn2Xx})s`x\lQY-ꪇS*7! -vn`7 &#x27;c2ί~?Ïv -6h =qF] ֌( -Mxyx깇 5o{}7B8?ߏ -τ4+:7&lt;$\ƪ V{ +9udqfl$ZN%مFo -fs@0ѪF6G]1£F*a`v8m$x&lt;tNK4f&#x27;!SȠs8\cَL -h9J,춂$[E5N/wCn룥nKin3斫G?$һ{}_~uOxH(t\D6J1BmP⬃mL!D&lt;U:\l7ϙ[?\}f; -{¿ oW0lioJI ϱ=wO5,%r_XArXB! -Q= .9GJkI -s B -Ov9a봹96myy-ǿӝvswtSZ:n0&gt;ӯ/:Y~mּ -3#KpR - -?k +UJ2PmYάc\Ye rI7pS%ؚޒwM-o]j[u*d&lt;&#x27;y/n:xQ&#x27;:J_l-nAk/4 ӓXju=[b[UE;5XX.{g9$v5ſ_{Cپ[}Mqι9丢gkvu6-vTӼ[N.20y/=9 -zhkI=5 -9&quot;u -;=z\:,ߛWsw\D˶U}xS~4N 9nL|HӃZ_-$EI+%Ƣ&quot;Slo H.HYaOL η@G;I33ruh -&lt;5uҀiEsQ~ jik#&amp;ܸh&lt;3MǮ}ӈA{f87mAƜ0G9W&lt;䑌&quot;Ę jVyE-ۉȩke|@:g&amp;&lt;GLEw៴ԅ77*E~( -v\U^?9&lt;*?:obM_mc:Me4űs{,A)柽(oqTRE;.~pFqrjjy0DI+!F~lj&gt;3&quot;vmS_ƛ68en.[1B --;jp`h&#x27;XwgZf9QpF dr!IqbڂBK&amp;B)gbk4UexR ٯ߄ kۀ5ˋ,p#C-&quot;84g_pbdW596VEpa&#x27;=d fYOMS9^t~~.&quot;BqPqcν!&lt; /說{t93IBHT&amp; aT1p0 NOQ+&lt;kZJϥ&lt;[ZSۧhU ޼sϽIzVkڿ},R &#x27;Ə_7#OMP^Et|HbfT;q&lt; -3(\/ayA%y0PDjb5`FDӃMO OuMZT -˄0XYq 7s5NȒDU^&gt;&lt;p7:-Lŭx;h+PWlƴ%fPEk`Sk*UNҶj -*gu; ^dHtD-b! KE -*nPˑȦS~.io`?%2t -}d!-Po&amp;Qk16Ԏ.ϝ˘6ݕ5y`B5taI״paAckkJAZr-٬ښ@yPX]#Q@N䥼E?SW\_s G#⫗&lt;g#DG|5ԇAzs}Z -&gt;wP|V`) . o#D{mr -ANEXA/j4&gt;\Bc-&lt;b9?L7Ib o+HBHC;B$t\ki-7,O|E/Z$&lt;F@@] -PNq(}6JˀoÈb&gt;ڢk48&lt; -ANo&quot;ɿK{XƴXFb͡w5υuc;UM`y$sk-N6m$kcaHM^w_B`y -jԀ|27uSt -5ml7l$7p#H:,$@| -c6O3_ =:&gt; .z0c$~h4hHf\E/cO&lt;&amp;̱-&#x27; -w -I_(ٳabNtRCeuv@8#)2?iSO7qs__$]7P$W~2!@\rtI7~/&amp;c•+t$rBՐɛdGID&gt;&amp;8 #VwIAkb:Oz&gt;KrM$f9:!\EZc)&lt;&#x27;1Sa&amp;C*b.&#x27;`l,y&gt;CIkMdq/gܰR†-W? -ߐ//6`G3SvOIk3+DlZKR9]mm#`E]?%P:-s3ƹ%ŷ&gt;0?~ъE76J}#GN#`D טP/Rz[wI{#[c}xaKz&quot;W׏h0T* ƝJ);}u&lt;~&gt;w˵G$UdwКP_‡BrՋoZ+-&amp;Lsp(|9_y_!?pJ+{ՓǣSo$TJnOuR]LJ -e*ywNW!LК-3y#X7FO, RY۔@o#.r)+:Ň,y?j`qSnm0&gt;N&gt;1FR{{Y!45v߀\ qxzRn&amp;Y}\8رrXC:7F?K .qF i{ZCI($xrz,:z_NSCG4Jwajx?jHۆ -ƒ}Ćt 2D^uՂHgfsGE&#x27;^+1}ҿOc -tV9T&lt;siidTŒ 9%);R-2Q&gt;u/h,ӋE.DKM%&gt;&lt; x,d10r=̠S29]Ljc8ÏB%3\` uiuS۰EK6KP?Ox9YGïh;t -?-C o[CmZe:&gt;CÔ&amp;@:q|ѪxYp/7TxO^,^d{=aG -B&lt;g -&amp;lv!\tNK!v17.i,ߗ+&gt;1עKKce&quot;~q&amp;1$V p-at/ux+&quot;&gt;F,VbefW8f›CPPDn#REii,tKcpBl(ʟcYxTnRG -3*&quot;?2. !\.If nu &amp;gc [w&gt;#u19; -:9|8{1N#^wF~9Kh -y(:`QHqVkc(ii\ {tHpIzDY_$^ MVsm9lW(.R -PIiaRxG7-y^AdRZRܛ]@ɏ{cBzGj -=Q=x^esg=|g9gsV.L 友-k-dO?[+/sɓ/1[@hY!Yu%T{/7IN63( Pl-e塊PbCeRi 2-&lt;ʣw]@(&#x27;~_̟f3ZAR+t&lt;乗Db.ȥ̚ԛiV|Pخ1WFSHCsC %rd -HH)UP=DžqB0D=߼p(&quot;b+!alˑDx8vӕ%\;xB!|{/WN`+gF.fD㢈=5԰O-|s`)9pCxg`.88&#x27;|ʀ;oSԥ^z!z{)AT=z_xIDCǢr]6J9eIE鹶]+RlxW\%}FՐM -邅[&#x27;WuLmشw]{M\WR~xf -rjrr$%g}A΄g/gE݇[ e)c’ulӬ4Θ$x -3wq+=fd}c&#x27;I@^^vKoھ[\67oek~W\}ҕW7-Zq|.XggN kS!g8܎l.yE5-/$r&gt;63P//?bCidq0D84lGeSY,1Z&amp;`%=^zx-(xz;-Uhͭgl {9|¼NO)H&#x27;$B~YI[C= m7|k_Hަ|oƢuSmg]fm7u*0eZ% -,bw --qreiz{0&#x27;g⎵wbǃY^]W]tz+o͜?Aމ?4d|Ut/Țɾ;1^O+ʛQߴ R\}4mG -nx,xSg-X+&quot;Ⓐ?.B&amp;i*1?;5HI#ʠ&lt;ߚJ+-t)rXI*R|Io姯Llu&lt;k`v2䐊s6Օ. .L -c(f]*f&lt;|؉֢`r -8r()!6nX8  -gTNrrnfE%6浖Np좞9Sz.(gsc _ƌ &lt;-.dfn͚LUO.)^,9sR d O&lt;jЂuꉎ/hEdIGIE]}&lt;%72]S[ne r~QLa&#x27;{{ɕ s6.d`~2?b9|̝5{ȅH=z5: =e&amp; ^(&gt;(?ō|7#}.-%Ǧ0ޒѸAhi~ۨ3X7̔tz?H6@d̷[E2wLBnˎ -wSCq2I :Loiѱ 2_&amp;s/hC&lt;͡:2`ϓkF&#x27;:SOX -7A{zSMr/A-6QuܞذY4uj6 $ՋKl`/F/ޚԸՔC\nI,d[nse)K$7&#x27;4ni&#x27;x^U*3&lt;ҧHiѡSFlA39c2T/5\9&quot;NKW&quot;#6tbAWK!EFl*VψHDApSHsmmßDz;~3R&gt;$kGccp`oʗ x -%9JRV/i&amp;yōeJxQ__hդQR̫ղ|nOг-*!7F&quot;T8 TTMRA8y)&gt;i -yV&amp;DyI ŀ.DfMhXG  -:T3u@д-oIMHn#@ٔ8=&gt;x.]1&gt;=)́ z{ףQgU~^y6KEή +oy&gt;rr` n]c5ZlPf9yCSĨ+2hvFn;5A[B&gt;t^! !.2QȑFfBY(¹ C:El3l-&#x27;$NR!P浚W&#x27;0J n,i7˧ߞ@P/Uj -iM2lr0*4*xlGz)BY: F0Q,FP!G}#7:$̑y堃X,L,OE`9f&amp;C&gt;XA^Ĝ2ƁC):Z-ˈ8 -0 6nC_4/X&#x27;D//_lrx쿃6Խ+8ID[PrR0ϓDR*#`( WJi)50^T1d*g[xzwxc= Y&lt;)dO$(.wbFx01 = -rHO˒[3_&lt;&#x27;Ή;2~9&#x27;@Ƹ&#x27;%C3DA&lt;b䩋S= &quot;fۡ/GhR -fnxRLm@r5\;]92iiA-9D⑈? oBDd~z?QE&lt;]nĹB6&quot; 9?&quot;uIbx@ AHlI0 j( - -!s pf]`^G0h^ 28&lt;%CA -&#x27;r~3gAr5\ zp - -R2-ʌ (ĪݟijWJ;2rMo$;Ҷm+-;[g6 !GR4ϟpwJ[cIV 鍑P,tKw|Ib@OWKbIrc֏W{d6m1%g|t&gt;5JHB+I HjzZOY&gt;|3,MN.U&amp;؞sv/{}}}aqƹǹΓAݕ -Zh:;K\w{{O4^MmzӇ璼fow|:J{[[w/G䤶I$HmrzrqۓM&gt;~_)ԢԋSpiӢ5קؖqSgcZǼCctg.ͼ2Yvdz9lsvQvMv}ّ rnyɟGvr|I-OV{+~&gt;O&gt;Ot&gt;OO՘:+(Ee7Vge5ԲpZ/P*Z6q(oPoV6TeH9e&#x27; !{cZPZcjьk,jYBIz_}șZ ׊~GT?PB~V~x^$T5 -h$?ZV5PGug7yl~}0n;| AZ?|&#x27;}ȳ~:&gt;yz)|@jж#Q~i;RT(-8ౖ\RZ3yumhYƃby*%[%+nJv-i|~PCK&amp;ܡ -?oH2@)$s2K?2*??jIiGkMnh;2&gt;곇γZԾ(v:*KU?#:(֙\I/.֣jwؓU:edA. ˨yy9QMmr|dmV9%;jF=鳎}1|Сe -UѻHY/]3TszmtM6-C&gt;]ZdFv -ζ^5;ХQx~gQgBmj -Qzz?V`5ae%]xPI1ވ5JKtA{SMVf/hA@K- EM gRfIj\MCj;eRmikYZmnP}ׯRZjT[6bb̒ZUlsg)AkcQv(! [OJmKkB:tЕ;Th/ -ᵌ*͂ -}&gt;ibU@,Y@5Ey7d@oϙm賊NdFiou=dT_}&#x27;Wo=a0G0}붏!M]D[tP޿箷D:TLY[hJgUt70gzvJ&#x27;XT[ya_;PF̱z\,_aǰ/u :3ӧNC[~&lt;BYG$S1bx~9i#ݪl(W.:kiYXЭ^}/~]`O,&gt;64}j~EJ}^l&lt;r(gmy8lsjFEVJ13qfe!-*2Q/WN*c&quot;^=A(t|Rag&amp;FX#3$V-0uK&gt;VxӥF -y]3aBZ_D[&quot;y!Y5[3&lt;m&#x27;ТUϥZe2|Fbc, ~|c-h)Fk-ұSjQۑM - D|CZylxf5·0LƞE#QI&lt;* -TFdEtOh(/|&gt;#2:UjQC=㥅R4(j07i1ZD 3-R[Q ?ʹ?{)leRRʒAX?:h2?:BUDjstZh} -ʄFH60rB1n[, YښT 1u31ȰE*x.: Ǹ`rnP&amp;w&gt;&lt;UMFS[.%tŵV -TU:W`GT+S/_mh!X$l -[ui|P=p I8C3֒(w5:&lt;BC_]qPJy&gt;6^OaHFn0[i:xO!at#DWZ&#x27;IOk _B].oC&#x27;?şB~{+C!CCɅ _] VvpwC~;}Ð?= -/#C$$¦ŦNěM Ҵ]]@?ȴԴ̴njft=)z^?Ci+M -endstream -endobj -297 0 obj -[ 0[ 586] 224[ 586] 251[ 586 586] 258[ 586] 263[ 586] 286[ 586 586] 317[ 586] 326[ 586] 338[ 586 586] 348[ 586] 377[ 586] 380[ 586] 385[ 586] 394[ 586] 400[ 586] 420[ 586] 429[ 586] 777[ 586] 887[ 586] ] -endobj -298 0 obj -&lt;&lt;/Type/Metadata/Subtype/XML/Length 3060&gt;&gt; -stream -&lt;?xpacket begin=&quot;&quot; id=&quot;W5M0MpCehiHzreSzNTczkc9d&quot;?&gt;&lt;x:xmpmeta xmlns:x=&quot;adobe:ns:meta/&quot; x:xmptk=&quot;3.1-701&quot;&gt; -&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt; -&lt;rdf:Description rdf:about=&quot;&quot; xmlns:pdf=&quot;http://ns.adobe.com/pdf/1.3/&quot;&gt; -&lt;pdf:Producer&gt;Microsoft® Word 2016&lt;/pdf:Producer&gt;&lt;/rdf:Description&gt; -&lt;rdf:Description rdf:about=&quot;&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&gt; -&lt;dc:creator&gt;&lt;rdf:Seq&gt;&lt;rdf:li&gt;Amit Dutta&lt;/rdf:li&gt;&lt;/rdf:Seq&gt;&lt;/dc:creator&gt;&lt;/rdf:Description&gt; -&lt;rdf:Description rdf:about=&quot;&quot; xmlns:xmp=&quot;http://ns.adobe.com/xap/1.0/&quot;&gt; -&lt;xmp:CreatorTool&gt;Microsoft® Word 2016&lt;/xmp:CreatorTool&gt;&lt;xmp:CreateDate&gt;2025-11-27T22:07:02+05:30&lt;/xmp:CreateDate&gt;&lt;xmp:ModifyDate&gt;2025-11-27T22:07:02+05:30&lt;/xmp:ModifyDate&gt;&lt;/rdf:Description&gt; -&lt;rdf:Description rdf:about=&quot;&quot; xmlns:xmpMM=&quot;http://ns.adobe.com/xap/1.0/mm/&quot;&gt; -&lt;xmpMM:DocumentID&gt;uuid:9D00B1CA-14A4-4889-B00B-F7EBECDEE165&lt;/xmpMM:DocumentID&gt;&lt;xmpMM:InstanceID&gt;uuid:9D00B1CA-14A4-4889-B00B-F7EBECDEE165&lt;/xmpMM:InstanceID&gt;&lt;/rdf:Description&gt; - - - - - - - - - - - - - - - - - - - - -&lt;/rdf:RDF&gt;&lt;/x:xmpmeta&gt;&lt;?xpacket end=&quot;w&quot;?&gt; -endstream -endobj -299 0 obj -&lt;&lt;/DisplayDocTitle true&gt;&gt; -endobj -300 0 obj -&lt;&lt;/Type/XRef/Size 300/W[ 1 4 2] /Root 1 0 R/Info 49 0 R/ID[&lt;CAB1009DA4148948B00BF7EBECDEE165&gt;&lt;CAB1009DA4148948B00BF7EBECDEE165&gt;] /Filter/FlateDecode/Length 670&gt;&gt; -stream -x=iPMaEkUvZ)KU!K-,EȒPKeV*kBx Du33sQGKQ -YPPՂ=rACQS0v743?s-B^$4x -itW=g]B{&#x27;njh/54@xA{-C 7?8-c Ƃ78`&quot;$0!- s -&lt; `!,hX K`),V* e/FUI_-VA5 z-p98&quot;\&quot;(PPW*\P7&amp;܂p*BTC -endstream -endobj -xref -0 301 -0000000050 65535 f -0000000017 00000 n -0000000165 00000 n -0000000249 00000 n -0000000625 00000 n -0000003862 00000 n -0000004008 00000 n -0000004036 00000 n -0000004209 00000 n -0000004282 00000 n -0000004548 00000 n -0000004602 00000 n -0000004656 00000 n -0000004841 00000 n -0000005108 00000 n -0000005251 00000 n -0000005281 00000 n -0000005452 00000 n -0000005526 00000 n -0000005788 00000 n -0000005968 00000 n -0000006230 00000 n -0000006376 00000 n -0000006406 00000 n -0000006580 00000 n -0000006654 00000 n -0000006908 00000 n -0000007091 00000 n -0000007345 00000 n -0000007490 00000 n -0000007520 00000 n -0000007693 00000 n -0000007767 00000 n -0000008022 00000 n -0000012699 00000 n -0000017414 00000 n -0000017740 00000 n -0000020430 00000 n -0000020788 00000 n -0000021718 00000 n -0000027017 00000 n -0000032473 00000 n -0000032851 00000 n -0000036125 00000 n -0000041203 00000 n -0000046154 00000 n -0000046532 00000 n -0000049196 00000 n -0000054590 00000 n -0000060194 00000 n -0000000051 65535 f -0000000052 65535 f -0000000053 65535 f -0000000054 65535 f -0000000055 65535 f -0000000056 65535 f -0000000057 65535 f -0000000058 65535 f -0000000059 65535 f -0000000060 65535 f -0000000061 65535 f -0000000062 65535 f -0000000063 65535 f -0000000064 65535 f -0000000065 65535 f -0000000066 65535 f -0000000067 65535 f -0000000068 65535 f -0000000069 65535 f -0000000070 65535 f -0000000071 65535 f -0000000072 65535 f -0000000073 65535 f -0000000074 65535 f -0000000075 65535 f -0000000076 65535 f -0000000077 65535 f -0000000078 65535 f -0000000079 65535 f -0000000080 65535 f -0000000081 65535 f -0000000082 65535 f -0000000083 65535 f -0000000084 65535 f -0000000085 65535 f -0000000086 65535 f -0000000087 65535 f -0000000088 65535 f -0000000089 65535 f -0000000090 65535 f -0000000091 65535 f -0000000092 65535 f -0000000093 65535 f -0000000094 65535 f -0000000095 65535 f -0000000096 65535 f -0000000097 65535 f -0000000098 65535 f -0000000099 65535 f -0000000100 65535 f -0000000101 65535 f -0000000102 65535 f -0000000103 65535 f -0000000104 65535 f -0000000105 65535 f -0000000106 65535 f -0000000107 65535 f -0000000108 65535 f -0000000109 65535 f -0000000112 65535 f -0000063089 00000 n -0000063152 00000 n -0000000113 65535 f -0000000116 65535 f -0000063202 00000 n -0000063265 00000 n -0000000117 65535 f -0000000118 65535 f -0000000119 65535 f -0000000120 65535 f -0000000121 65535 f -0000000122 65535 f -0000000123 65535 f -0000000124 65535 f -0000000125 65535 f -0000000126 65535 f -0000000127 65535 f -0000000128 65535 f -0000000129 65535 f -0000000130 65535 f -0000000131 65535 f -0000000132 65535 f -0000000133 65535 f -0000000134 65535 f -0000000135 65535 f -0000000136 65535 f -0000000137 65535 f -0000000138 65535 f -0000000139 65535 f -0000000140 65535 f -0000000141 65535 f -0000000142 65535 f -0000000143 65535 f -0000000144 65535 f -0000000145 65535 f -0000000146 65535 f -0000000147 65535 f -0000000148 65535 f -0000000149 65535 f -0000000150 65535 f -0000000151 65535 f -0000000152 65535 f -0000000153 65535 f -0000000154 65535 f -0000000155 65535 f -0000000156 65535 f -0000000157 65535 f -0000000158 65535 f -0000000159 65535 f -0000000160 65535 f -0000000161 65535 f -0000000162 65535 f -0000000163 65535 f -0000000164 65535 f -0000000165 65535 f -0000000166 65535 f -0000000167 65535 f -0000000168 65535 f -0000000169 65535 f -0000000170 65535 f -0000000171 65535 f -0000000172 65535 f -0000000173 65535 f -0000000174 65535 f -0000000175 65535 f -0000000176 65535 f -0000000177 65535 f -0000000180 65535 f -0000063314 00000 n -0000063377 00000 n -0000000183 65535 f -0000063427 00000 n -0000063490 00000 n -0000000184 65535 f -0000000185 65535 f -0000000186 65535 f -0000000187 65535 f -0000000188 65535 f -0000000189 65535 f -0000000190 65535 f -0000000191 65535 f -0000000192 65535 f -0000000193 65535 f -0000000194 65535 f -0000000195 65535 f -0000000196 65535 f -0000000197 65535 f -0000000198 65535 f -0000000199 65535 f -0000000200 65535 f -0000000201 65535 f -0000000202 65535 f -0000000203 65535 f -0000000204 65535 f -0000000205 65535 f -0000000206 65535 f -0000000207 65535 f -0000000208 65535 f -0000000209 65535 f -0000000210 65535 f -0000000211 65535 f -0000000212 65535 f -0000000213 65535 f -0000000214 65535 f -0000000215 65535 f -0000000216 65535 f -0000000217 65535 f -0000000218 65535 f -0000000219 65535 f -0000000220 65535 f -0000000221 65535 f -0000000222 65535 f -0000000223 65535 f -0000000226 65535 f -0000063538 00000 n -0000063601 00000 n -0000000227 65535 f -0000000230 65535 f -0000063651 00000 n -0000063714 00000 n -0000000231 65535 f -0000000232 65535 f -0000000233 65535 f -0000000234 65535 f -0000000235 65535 f -0000000236 65535 f -0000000237 65535 f -0000000238 65535 f -0000000239 65535 f -0000000240 65535 f -0000000241 65535 f -0000000242 65535 f -0000000243 65535 f -0000000244 65535 f -0000000245 65535 f -0000000246 65535 f -0000000247 65535 f -0000000248 65535 f -0000000249 65535 f -0000000250 65535 f -0000000251 65535 f -0000000252 65535 f -0000000253 65535 f -0000000254 65535 f -0000000255 65535 f -0000000256 65535 f -0000000257 65535 f -0000000258 65535 f -0000000259 65535 f -0000000260 65535 f -0000000261 65535 f -0000000262 65535 f -0000000263 65535 f -0000000264 65535 f -0000000265 65535 f -0000000266 65535 f -0000000267 65535 f -0000000268 65535 f -0000000269 65535 f -0000000270 65535 f -0000000271 65535 f -0000000272 65535 f -0000000273 65535 f -0000000274 65535 f -0000000275 65535 f -0000000276 65535 f -0000000279 65535 f -0000063763 00000 n -0000063826 00000 n -0000000280 65535 f -0000000000 65535 f -0000063874 00000 n -0000063937 00000 n -0000063985 00000 n -0000064394 00000 n -0000090093 00000 n -0000090309 00000 n -0000090337 00000 n -0000090756 00000 n -0000134684 00000 n -0000134998 00000 n -0000135026 00000 n -0000135628 00000 n -0000160826 00000 n -0000161371 00000 n -0000161399 00000 n -0000161823 00000 n -0000181491 00000 n -0000181734 00000 n -0000184878 00000 n -0000184924 00000 n -trailer -&lt;&lt;/Size 301/Root 1 0 R/Info 49 0 R/ID[&lt;CAB1009DA4148948B00BF7EBECDEE165&gt;&lt;CAB1009DA4148948B00BF7EBECDEE165&gt;] &gt;&gt; -startxref -185797 -%%EOF -xref -0 0 -trailer -&lt;&lt;/Size 301/Root 1 0 R/Info 49 0 R/ID[&lt;CAB1009DA4148948B00BF7EBECDEE165&gt;&lt;CAB1009DA4148948B00BF7EBECDEE165&gt;] /Prev 185797/XRefStm 184924&gt;&gt; -startxref -191977 -%%EOF</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">assignment01.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment01.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-assignment-assignment01_c', 'assignment01.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-assignment-assignment01_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment01.c"> - <pre><code class="language-c">/* Author: Amit Dutta, Date: 27-11-2025*/ -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int isPrime(int); - -int main() -{ - int n; - printf(&quot;Enter the number: &quot;); - scanf(&quot;%d&quot;, &amp;n); - - if (isPrime(n)) - { - printf(&quot;\nInput %d is a Prime Number.&quot;, n); - } - else - { - printf(&quot;\nInput %d is not a Prime Number.&quot;, n); - } - - return 0; -} - -int isPrime(int n) -{ - if (n &lt;= 1) - return 0; - if (n == 2) - return 1; - if (n % 2 == 0) - return 0; - - int temp = (int)sqrt(n); - int i; - for (i = 3; i &lt;= temp; i += 2) - { - if (n % i == 0) - { - return 0; - } - } - return 1; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">assignment02.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment02.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-assignment-assignment02_c', 'assignment02.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-assignment-assignment02_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment02.c"> - <pre><code class="language-c">/* Author: Amit Dutta, Date: 27-11-2025*/ -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int isArmstrong(int); -int count(int); - -int main() -{ - int n; - printf(&quot;Enter the number: &quot;); - scanf(&quot;%d&quot;, &amp;n); - - if (isArmstrong(n)) - { - printf(&quot;\nInput %d is a Armstrong Number.&quot;, n); - } - else - { - printf(&quot;\nInput %d is Not a Armstrong Number.&quot;, n); - } - - return 0; -} - -int count(int n) -{ - int count = 0; - while (n &gt; 0) - { - count++; - n = n / 10; - } - return count; -} - -int isArmstrong(int n) -{ - if (n &lt; 0) - return 0; - if (n == 0) - return 1; - - int power = count(n); - int temp = n; - int checker = 0; - - while (temp &gt; 0) - { - int digit = temp % 10; - checker = checker + (int)round(pow(digit, power)); - temp = temp / 10; - } - return n == checker; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">assignment03.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment03.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-assignment-assignment03_c', 'assignment03.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-assignment-assignment03_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment03.c"> - <pre><code class="language-c">/* Author: Amit Dutta, Date: 27-11-2025*/ -#include &lt;stdio.h&gt; - -int isPerfect(int); - -int main() -{ - int n; - printf(&quot;Enter the number: &quot;); - scanf(&quot;%d&quot;, &amp;n); - if (isPerfect(n)) - { - printf(&quot;\nInput %d is a Perfect Number.&quot;, n); - } - else - { - printf(&quot;\nInput %d is not a Perfect Number.&quot;, n); - } - return 0; -} - -int isPerfect(int n) -{ - if (n &lt;= 1) - return 0; - int temp = 1; - int i; - for (i = 2; i &lt;= n / 2; i++) - { - if (n % i == 0) - { - temp += i; - } - } - return temp == n; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">assignment04.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment04.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-assignment-assignment04_c', 'assignment04.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-assignment-assignment04_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment04.c"> - <pre><code class="language-c">/* Author: Amit Dutta, Date: 27-11-2025*/ -#include &lt;stdio.h&gt; - -int main() -{ - int month, year, days; - printf(&quot;Enter the month (1 to 12) and year: &quot;); - scanf(&quot;%d %d&quot;, &amp;month, &amp;year); - - switch (month) - { - case 1: // jan - case 3: // mar - case 5: // may - case 7: // july - case 8: // aug - case 10: // oct - case 12: // dec - days = 31; - break; - case 4: // apr - case 6: // jun - case 9: // sep - case 11: // nov - days = 30; - break; - case 2: // feb - if ((year % 400 == 0) || ((year % 4 == 0) &amp;&amp; (year % 100 != 0))) - { - days = 29; - } - else - { - days = 28; - } - break; - default: - printf(&quot;\nYou entered something wrong.&quot;); - return 0; - } - - printf(&quot;\nNumber of days: %d&quot;, days); - return 0; -} -</code></pre> - </div> - </li> - </ul> - </div> - </li> - - <li class="border rounded-lg overflow-hidden"> - <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('c')"> - <div class="flex items-center justify-between"> - <div class="flex items-center"> - <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> - <span class="font-medium text-gray-800">c</span> - <span class="ml-2 text-sm text-gray-500">(7 files)</span> - </div> - <div class="flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/tree/main/c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <div class="chevron" id="chevron-c"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> - </div> - </div> - </div> - <div class="folder-content hidden bg-white" id="folder-c"> - <ul class="divide-y divide-gray-200"> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">1.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/c/1.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-c-1_c', '1.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-c-1_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/1.c"> - <pre><code class="language-c">// Write a program (WAP) to print the sum and product of digits of an integer. -// Author - Amit Dutta, Date - 13th SEP, 2025 - -#include&lt;stdio.h&gt; - -int main() { - int inp, result_sum = 0, result_product = 1, temp; - printf(&quot;Please enter the number : &quot;); - scanf(&quot;%d&quot;,&amp;inp); - printf(&quot;\n&quot;); - - if (inp &lt; 0) { - printf(&quot;\nPlease enter a valid non negetive integer.&quot;); - return 1; - } - - temp = inp; - while (temp != 0 ) { - result_sum = result_sum + (temp % 10); - result_product = result_product * (temp % 10); - temp = temp / 10; - } - - printf(&quot;\nSum of the digits of the input number &#x27;%d&#x27; is : %d&quot; - &quot;\nProduct of the digits of the input number &#x27;%d&#x27; is : %d&quot;, - inp, result_sum, inp, result_product); - return 0; -} - -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">2.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/c/2.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-c-2_c', '2.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-c-2_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/2.c"> - <pre><code class="language-c">//WAP to reverse a non-negative integer. -// Author - Amit Dutta, Date - 13th SEP, 2025 - -#include&lt;stdio.h&gt; - -int main() { - int inp, result = 0, temp; - printf(&quot;PLease enter the number you want to reverse : &quot;); - scanf(&quot;%d&quot;,&amp;inp); - printf(&quot;\n&quot;); - - if (inp &lt; 0) { - printf(&quot;\nPlease enter a non negetive integer.&quot;); - return 1; - } - - temp = inp; - while ( temp != 0) { - result = (result * 10) + (temp % 10); - temp = temp / 10; - } - - printf(&quot;\nReverse of the input &#x27;%d&#x27; is : %d&quot;, inp, result); - return 0; -} - -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">3.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/c/3.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-c-3_c', '3.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-c-3_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/3.c"> - <pre><code class="language-c">// WAP to compute the sum of the first n terms of the following series S =1+1/2+1/3+1/4+...... -// Author - Amit Dutta, Date - 13th SEP, 2025 - -#include&lt;stdio.h&gt; - -int main() { - int n, i; - float result = 0; - printf(&quot;Please enter the value for &#x27;n&#x27; : &quot;); - scanf(&quot;%d&quot;, &amp;n); - printf(&quot;\n&quot;); - - if (n &lt;= 0) { - printf(&quot;\nPlease enter a positve number greater than ZERO.&quot;); - return 1; - } - - for (i = 1; i &lt;= n; i++) { - result = result + (1.0 / i); - } - - printf(&quot;\nSum of the first %d terms of the following series S =1+1/2+1/3+1/4+...... is : %f&quot;,n,result); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">4.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/c/4.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-c-4_c', '4.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-c-4_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/4.c"> - <pre><code class="language-c">//WAP to compute the sum of the first n terms of the following series,S =1-2+3-4+5...... -// Author - Amit Dutta, Date - 13th SEP, 2025 - -#include&lt;stdio.h&gt; - -int main() { - int n, result = 0, temp, i; - printf(&quot;Please enter the value for &#x27;n&#x27; for this series &#x27;s = 1-2+3-4+5-....&#x27;: &quot;); - scanf(&quot;%d&quot;,&amp;n); - printf(&quot;\n&quot;); - - if (n &lt;= 0) { - printf(&quot;\nPlease enter a positive integer.&quot;); - return 1; - } - - for (i = 1; i&lt;= n; i++) { - if (i % 2 == 0) { - result = result - i; - } - else { - result = result + i; - } - } - - printf(&quot;\nAns : %d&quot;, result); -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">5.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/c/5.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-c-5_c', '5.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-c-5_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/5.c"> - <pre><code class="language-c">/*Write a function to find whether a given no. is prime or not. -Use the same to generate the prime numbers less than 100.*/ -// Author - Amit Dutta, Date - 13th SEP, 2025 - -#include&lt;stdio.h&gt; - -int isPrime(int inp) { - int i, is_prime = 1; - - if (inp &lt; 2) is_prime = 0; - - for (i = 2; i &lt;= inp / 2; i++) if (inp % i == 0) { - is_prime = 0; - break; - } - - return is_prime; -} - - -int main() { - int inp, i; - printf(&quot;Enter the number you want to check : &quot;); - scanf(&quot;%d&quot;,&amp;inp); - printf(&quot;\n&quot;); - - if (isPrime(inp)) printf(&quot;\nGiven input &#x27;%d&#x27; is a Prime Number.&quot;,inp); - else printf(&quot;\nGiven input &#x27;%d&#x27; is not a Prime Number.&quot;,inp); - - printf (&quot;\nSeries of prime number upto 100 : &quot;); - for (i = 2; i &lt; 100; i++) if (isPrime(i)) printf(&quot; %d&quot;,i); - - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">6.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/c/6.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-c-6_c', '6.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-c-6_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/6.c"> - <pre><code class="language-c">/*Write a function that checks whether a given string is Palindrome or not. -Use this function to find whether the string entered by the user is Palindrome or not.*/ -// Author - Amit Dutta, Date - 13th SEP, 2025 - -#include&lt;stdio.h&gt; -#include&lt;string.h&gt; - -int isPalindrome(char inp[]) { - int len = strlen(inp); - int i = 0; //starting point - int j = len - 1; //end point - - while (i &lt; j) { - if (inp[i] != inp[j]) { - return 0; - } - i++; - j--; - } - - return 1; -} - -int main() { - char inp[20]; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%s&quot;,inp); - if (isPalindrome(inp)) printf(&quot;\n\nInput &#x27;%s&#x27; is a Palindrome number.&quot;, inp); - else printf(&quot;\n\nInput &#x27;%s&#x27; is not a Palindrome number.&quot;, inp); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">7.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/c/7.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-c-7_c', '7.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-c-7_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/7.c"> - <pre><code class="language-c">// WAP to compute the factors of a given number -// Author - Amit Dutta, Date - 13th SEP, 2025 - -#include&lt;stdio.h&gt; -#include&lt;stdlib.h&gt; - -int main() { - int inp, num, i; - printf(&quot;Please enter the number to get the factors from it : &quot;); - scanf(&quot;%d&quot;, &amp;inp); - - num = abs(inp); - - if (num == 0) { - printf(&quot;\n\n0 has infinitely many factors (all integers).&quot;); - return 1; - } - - printf(&quot;\n\nThe factors of &#x27; %d &#x27; is :- &quot;, inp); - printf(&quot;\nPositive : &quot;); - for (i = 1; i &lt;= num ; i++) if (num % i == 0) printf(&quot; %d&quot;, i); - printf(&quot;\nNegative : &quot;); - for (i = 1; i &lt;= num ; i++) if (num % i == 0) printf(&quot; %d&quot;, -i); - return 0; -} -</code></pre> - </div> - </li> - </ul> - </div> - </li> - - <li class="border rounded-lg overflow-hidden"> - <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('challenge')"> - <div class="flex items-center justify-between"> - <div class="flex items-center"> - <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> - <span class="font-medium text-gray-800">challenge</span> - <span class="ml-2 text-sm text-gray-500">(2 files)</span> - </div> - <div class="flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/tree/main/challenge" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <div class="chevron" id="chevron-challenge"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> - </div> - </div> - </div> - <div class="folder-content hidden bg-white" id="folder-challenge"> - <ul class="divide-y divide-gray-200"> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">sudipto1.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/challenge/sudipto1.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-challenge-sudipto1_c', 'sudipto1.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-challenge-sudipto1_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/challenge/sudipto1.c"> - <pre><code class="language-c">/* A smart home security controller monitors the state of several sensors to decide what action to take. - * Each second, the system reads data from sensors that can either be active or inactive. Based on the current - * state of all sensors, the controller must perform exactly one action, such as activating a warning, checking - * a specific zone, or declaring an intrusion. Write a C program that reads the sensor states as input and - * prints the corresponding system action. - -- Conditions: - * 1. You must determine exactly one action for every possible combination of sensor states. - * 2. You are not allowed to use any conditional statements (if, else if, else, or the ternary operator?). - * 3. You are not allowed to use logical operators. - * 4. You must use a single switch statement to control the program&#x27;s behaviour. - * 5. Loops may only be used for reading input, not for making decisions. - * 6. The program should handle all possible combinations of the sensors&#x27; active/inactive states and print the appropriate response each time. - -- Example (for understanding): - * If all sensors are inactive, the system should remain idle. - * If some sensors are active, the system should issue warnings or alerts based on the situation. - * If all sensors are active, the system should declare a confirmed intrusion. - */ - -/* - * This program monitors the state of four sensors (Door, Window, Motion, Glass Break) - * and determines the appropriate action without using any conditional (if, else) - * or logical (&amp;&amp;, ||) operators. - * - * It works by combining the state of all sensors into a single integer value - * using bitmasking. Each bit in the integer represents the state of one sensor - * (1 for active, 0 for inactive). This combined state is then used in a single - * switch statement to select the correct action for every possible combination. - * - * Then, enter the state of the four sensors separated by spaces, - * for example: 1 0 1 0 - */ - -/* Author - Amit Dutta, Date - 12th October, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - - // variables to hold the state of a sensor (0 or 1) - int doorSensorState, windowSensorState, motionSensorState, glassbreakSensorState; - - // variable to check the combined state of all four sensor - int combinedState = 0; - - // a invalid flag to check the input are valid or not - unsigned int invalidFlag; - - // printing the way to usage the program - printf(&quot;------ Home Security Controller ------\n&quot;); - printf(&quot;Enter sensor states (1 for active, 0 for inactive).\n&quot;); - printf(&quot;Format: [Door] [Window] [Motion] [Glass Break]\n&quot;); - printf(&quot;Example: 0 1 1 0\n&quot;); - printf(&quot;Enter states (or press Ctrl+D for MacOS or Linux / Ctrl+Z for Windows to exit): &quot;); - - // doing the main calculation - // chacking the combined state and taking a decision - while (scanf(&quot;%d %d %d %d&quot;, &amp;doorSensorState, &amp;windowSensorState, &amp;motionSensorState, &amp;glassbreakSensorState) == 4) - { - // validating input - // The expression (variable &amp; ~1) results in 0 only if &#x27;variable&#x27; is 0 or 1. - // For any other positive number, it&#x27;s non-zero. - // We combine all checks with a bitwise OR. If any sensor state is invalid, - // the flag will become non-zero. - invalidFlag = (doorSensorState &amp; ~1) | (windowSensorState &amp; ~1) | (motionSensorState &amp; ~1) | (glassbreakSensorState &amp; ~1); - - // Combine the four sensor states into a single integer using bitwise operations. - // This creates a unique number from 0 to 15 for each possible combination. - // Bit 0: Door Sensor - // Bit 1: Window Sensor - // Bit 2: Motion Sensor - // Bit 3: Glass Break Sensor - combinedState = (glassbreakSensorState &lt;&lt; 3) | (motionSensorState &lt;&lt; 2) | (windowSensorState &lt;&lt; 1) | doorSensorState; - - // If the invalid_input_flag is non-zero, we add 16 to the state. - // This pushes it outside the 0-15 range and forces the &#x27;default&#x27; case in the switch. - // We achieve this by multiplying the flag (which is &gt; 0) by 16. - combinedState += invalidFlag * 16; - - // printing the given state - printf(&quot;\n\nState : [Door : %d, Window : %d, Motion : %d, Glass Break : %d]\nState Id : %d&quot;, - doorSensorState, windowSensorState, motionSensorState, glassbreakSensorState, combinedState); - printf(&quot;\nSystem Action : &quot;); - - // taking decision based on combined state - // A single switch statement controls the program&#x27;s behavior. - // It handles all 2^4 = 16 possible combinations of sensor states, - // ensuring exactly one action is taken for every scenario. - switch (combinedState) - { - case 0: // Binary: 0000 - printf(&quot;System Idle. All sensors inactive.\n&quot;); - break; - case 1: // Binary: 0001 - printf(&quot;Check front door camera.\n&quot;); - break; - case 2: // Binary: 0010 - printf(&quot;Check window sensors.\n&quot;); - break; - case 3: // Binary: 0011 - printf(&quot;Warning: Perimeter breach suspected. Check doors and windows.\n&quot;); - break; - case 4: // Binary: 0100 - printf(&quot;Check interior cameras for movement.\n&quot;); - break; - case 5: // Binary: 0101 - printf(&quot;Warning: Potential entry and movement detected. Check front door and interior. Ask for patrol.\n&quot;); - break; - case 6: // Binary: 0110 - printf(&quot;Warning: Potential entry and movement detected. Check windows and interior. Ask for patrol.\n&quot;); - break; - case 7: // Binary: 0111 - printf(&quot;Alert: High probability of unauthorized entry. Ask for patrol.\n&quot;); - break; - case 8: // Binary: 1000 - printf(&quot;Alert: Glass break detected. High-priority event. Ask for patrol.\n&quot;); - break; - case 9: // Binary: 1001 - printf(&quot;Severe Alert: Forced entry likely (door + glass). Activate Alarm and Contact authorities.\n&quot;); - break; - case 10: // Binary: 1010 - printf(&quot;Severe Alert: Forced entry likely (window + glass). Activate Alarm and Contact authorities.\n&quot;); - break; - case 11: // Binary: 1011 - printf(&quot;Intrusion Alert: Multiple perimeter breaches. Activate Alarm and Contact authorities.\n&quot;); - break; - case 12: // Binary: 1100 - printf(&quot;Intrusion Alert: Confirmed interior presence after breach. Activate Alarm and Contact authorities.\n&quot;); - break; - case 13: // Binary: 1101 - printf(&quot;INTRUSION CONFIRMED! Activate maximum response protocol. Activate Alarm and Contact authorities.\n&quot;); - break; - case 14: // Binary: 1110 - printf(&quot;INTRUSION CONFIRMED! Activate maximum response protocol. Activate Alarm and Contact authorities.\n&quot;); - break; - case 15: // Binary: 1111 - printf(&quot;CATASTROPHIC EVENT! ALL SENSORS TRIGGERED. ACTIVATE ALARM AND CONTACT COPS.\n&quot;); - break; - default: - // This case should not be reached with valid 0/1 input but is included for completeness. - printf(&quot;Error: Invalid sensor state detected.\n&quot;); - break; - } - - // discarding extra characters (if any) left - while (getchar() != &#x27;\n&#x27;) - ; - - // asking for next set of input - printf(&quot;\nEnter next set of states: &quot;); - } - printf(&quot;\nSecurity system shutting down.\n&quot;); -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">sudiptoown01.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/challenge/sudiptoown01.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-challenge-sudiptoown01_c', 'sudiptoown01.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-challenge-sudiptoown01_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/challenge/sudiptoown01.c"> - <pre><code class="language-c">/* - * A smart home security controller monitors the state of several sensors to decide what action to take. - * Each second, the system reads data from sensors that are either an active or inactive. Based on the current - * state of all sensors, the controller must perform exactly one action, such as activating a warning, checking - * a specific zone, or declaring an intrusion. Write a C program that reads the sensor status as input and - * prints the corresponding system action. - * Hints: - * 1. The most determinative action wins for every possible combination of sensor states. - * 2. You are not allowed to use any conditional statements (if, else if, else, or the ternary operator?). - * 3. You are not allowed to use logical operators. - * 4. You must use a single switch statement to control the program&#x27;s behavior. - * 5. The program should handle all possible combinations of the sensors&#x27; active/inactive states and print the appropriate response each time. - * 6. All sensors are inactive, the system should remain idle. - * 7. If some sensors are active, the system should issue warnings or alerts based on the situation. - * 8. If all sensors are active, the system should declare a confirmed intrusion. - * Solution: - * We can solve this problem simply by assigning each case its own distinct integer. - * There are 2 possibilities for a sensor and therefore there are 2^4 = 16 cases. - * Using arrays we can assign each case its own index value and print it as per the encoded binary integer. - */ -#include &lt;stdio.h&gt; - -int casekey(int door, int window, int motion, int glass) { - int key = (door &lt;&lt; 3) | (window &lt;&lt; 2) | (motion &lt;&lt; 1) | glass; - return key; -} - -int main() { - int door, window, motion, glass, key; - char choice; - - static const char *action[16] = { - &quot;IDLE&quot;, &quot;CHECK WINDOW&quot;, &quot;WARN MOTION&quot;, &quot;WARN MOTION WINDOW&quot;, - &quot;CHECK DOOR&quot;, &quot;WARN DOOR WINDOW&quot;, &quot;INTRUSION SUSPECTED&quot;, &quot;INTRUSION CONFIRMED&quot;, - &quot;GLASS ONLY&quot;, &quot;DOOR GLASS&quot;, &quot;MOTION GLASS&quot;, &quot;MOTION WINDOW GLASS&quot;, - &quot;DOOR WINDOW&quot;, &quot;DOOR WINDOW GLASS&quot;, &quot;DOOR MOTION GLASS&quot;, &quot;ALL SENSORS&quot; - }; - - do { - printf(&quot;Sensors: Door, Window, Motion, Glass\n&quot;); - printf(&quot;Enter the state of each sensor in binary (0 or 1): &quot;); - scanf(&quot;%d %d %d %d&quot;, &amp;door, &amp;window, &amp;motion, &amp;glass); - - key = casekey(door, window, motion, glass); - printf(&quot;Action: %s\n&quot;, action[key]); - - printf(&quot;Want to continue? (y/n): &quot;); - scanf(&quot; %c&quot;, &amp;choice); - printf(&quot;\n&quot;); - } while (choice == &#x27;y&#x27; || choice == &#x27;Y&#x27;); - - return 0; -}</code></pre> - </div> - </li> - </ul> - </div> - </li> - - <li class="border rounded-lg overflow-hidden"> - <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('khurapati-idea')"> - <div class="flex items-center justify-between"> - <div class="flex items-center"> - <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> - <span class="font-medium text-gray-800">khurapati-idea</span> - <span class="ml-2 text-sm text-gray-500">(2 files)</span> - </div> - <div class="flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/tree/main/khurapati-idea" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <div class="chevron" id="chevron-khurapati-idea"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> - </div> - </div> - </div> - <div class="folder-content hidden bg-white" id="folder-khurapati-idea"> - <ul class="divide-y divide-gray-200"> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">KI001.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/khurapati-idea/KI001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-khurapati-idea-KI001_c', 'KI001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-khurapati-idea-KI001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/khurapati-idea/KI001.c"> - <pre><code class="language-c">// khurapati idea no. : 1 -// Idea : we can use the side effect of printf function to get length of any string or number -// Author - Amit Dutta, Date - 16-10-2025 - -#include &lt;stdio.h&gt; -int main() -{ - // testing number - int num, len = -13 /* here minus 13 because we will remove the massage characters in line 10 */; - printf(&quot;Enter a number to get the length : &quot;); - scanf(&quot;%d&quot;, &amp;num); - len += printf(&quot;Your input : %d&quot;, num); // here the &quot;Your input : &quot;, this 13 characters are extra - printf(&quot;\nLength : %d&quot;, len); - - // testing char - char a[20]; - len = -13; - while (getchar() != &#x27;\n&#x27;) - ; - printf(&quot;\nEnter a word to get the length : &quot;); - scanf(&quot;%19s&quot;, &amp;a); - len += printf(&quot;Your input : %s&quot;, a); // here the &quot;Your input : &quot;, this 13 characters are extra - printf(&quot;\nLength : %d&quot;, len); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">KI002.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/khurapati-idea/KI002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-khurapati-idea-KI002_c', 'KI002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-khurapati-idea-KI002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/khurapati-idea/KI002.c"> - <pre><code class="language-c">/* Author - Amit Dutta, Date - 05th November, 2025 */ - -/* Plan - checking for edge case */ - -#include &lt;stdio.h&gt; -int main() -{ - printf(&quot;Starting.....\n&quot;); - - for (int i = 1; ; i++) - { - printf(&quot;i = %d\n&quot;, i); - } - return 0; -}</code></pre> - </div> - </li> - </ul> - </div> - </li> - - <li class="border rounded-lg overflow-hidden"> - <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('letusc')"> - <div class="flex items-center justify-between"> - <div class="flex items-center"> - <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> - <span class="font-medium text-gray-800">letusc</span> - <span class="ml-2 text-sm text-gray-500">(69 files)</span> - </div> - <div class="flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/tree/main/letusc" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <div class="chevron" id="chevron-letusc"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> - </div> - </div> - </div> - <div class="folder-content hidden bg-white" id="folder-letusc"> - <ul class="divide-y divide-gray-200"> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc001.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc001_c', 'luc001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc001.c"> - <pre><code class="language-c">/* Temperature of a city in fahrenheit degrees is input through -the keyboard. WAP to convert this temperature into Centigrade -degrees. */ -/* Author - Amit Dutta, Date - 13 sep, 2025 */ -/* Chapter 1; Page 19; Question NO.: F(a) */ - -#include&lt;stdio.h&gt; -int main() { - float f, c; - printf(&quot;Enter the temperature of city in Fahrenheit : &quot;); - scanf(&quot;%f&quot;, &amp;f); - // formula (F - 32) 5/9 - c = ((f - 32) * 5) / 9; - printf(&quot;\nTemperature in centigrade : %f&quot;, c); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc002.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc002_c', 'luc002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc002.c"> - <pre><code class="language-c">/* The length and breadth of a rectangle and radius of a circle -are input through the keyboard. Write a program to calculate the -area and perimeter of the rectangle, and the area and circumference -of the circle. */ -/* Author - Amit Dutta, Date - 16th SEP, 2025 */ -/* Let Us C; Page - 19; Chap- 1; QNo.: F(b) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - double len, bre, r, area_r, per, area_c, cir; - printf(&quot;Enter the length and breadth of the rectangle : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;len, &amp;bre); - printf(&quot;Enter the Radius of the circle : &quot;); - scanf(&quot;%lf&quot;, &amp;r); - area_r = len * bre; - per = 2 * (len + bre); - area_c = M_PI * r * r; - cir = 2 * M_PI * r; - printf(&quot;\nArea of Rectangle : %lf&quot; - &quot;\nPerimeter of Rectangle : %lf&quot; - &quot;\nArea of Circle : %lf&quot; - &quot;\nCircumference of Circle : %lf&quot;, - area_r, per, area_c, cir); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc003.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc003_c', 'luc003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc003.c"> - <pre><code class="language-c">/* Paper of size AO has dimensions 1189 mm x 841 mm. -Each subsequent size A(n) is defined as A(n-1) cut in -half, parallel to its shorter sides. Thus, paper of -size A1 would have dimensions 841 mm x 594 mm. Write -a program to calculate and print paper sizes A0,� -A1,�A2,�...�A8. */ -/* Author - Amit Dutta, Date - 16th SEP, 2025 */ -/* Let Us C; Page - 19; Chap- 1; QNo.: F(c) */ - -#include&lt;stdio.h&gt; -#include&lt;math.h&gt; -int main() { - double s_long = 1189.0, s_short = 841.0, temp; - int i; - printf(&quot;A0 Dimension : %g mm x %g mm&quot;, floor(s_long), floor(s_short)); - for (i = 1; i &lt;= 8; i++) { - temp = s_long; - s_long = s_short; - s_short = temp / 2; - printf(&quot;\nA%d Dimension : %g mm x %g mm&quot;, i, floor(s_long), floor(s_short)); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc004.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc004_c', 'luc004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc004.c"> - <pre><code class="language-c">/* If a five digit number is input through the keyboard, -write a program to calculate the sum of it&#x27;s digit. -(Hint : Use the modulus operator %) */ -/* Author - Amit Dutta, Date - 28th SEP, 2025 */ -/* Let Us C; Page - 37; Chap- 2; QNo.: G(a) */ - -#include &lt;stdio.h&gt; -int main() -{ - int inp, result = 0, i, temp; - printf(&quot;Enter a five digit number : &quot;); - scanf(&quot;%d&quot;, &amp;inp); - if (inp &lt; 10000 || inp &gt; 99999) - { - printf(&quot;\nPlease enter a valid five digit number.&quot;); - return 1; - } - temp = inp; - for (i = 1; i &lt;= 5; i++) - { - result = result + (inp % 10); - inp = inp / 10; - } - printf(&quot;\nSum of the digit &#x27;%d&#x27; is : %d&quot;, temp, result); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc005.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc005_c', 'luc005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc005.c"> - <pre><code class="language-c">/* Write a program to recive Cartesian -co-ordinates (x, y) of a point and convert -them into Polar co-ordinates (r, phi) - Hint : r = sqrt (x^2 + y^2) and phi = tan^-1 (y/x) */ -/* Author - Amit Dutta, Date - 28th SEP, 2025 */ -/* Let Us C; Page - 37; Chap- 2; QNo.: G(b) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - double x, y, r, phi; - printf(&quot;Enter the Cartesian Co-Ordinates in this format &#x27;x, y&#x27; : &quot;); - scanf(&quot;%lf, %lf&quot;, &amp;x, &amp;y); - r = sqrt(pow(x, 2) + pow(y, 2)); - phi = atan2(y, x); - printf(&quot;\nPolar Co-Ordinates are : (%g, %g Rad)&quot;, r, phi); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc006.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc006_c', 'luc006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc006.c"> - <pre><code class="language-c">/* Write a program to receive values of latitude (L1, L2) and longitude -(G1, G2), in degrees, of two places on the earth and output the distance -(D) between them in nautical miles. The formula for distance in nautical -miles is : - D = 3963 cos^-1(sin L1 sin L2 + cos L1 cos L2 * cos(G2 - G1)) -*/ -/* Author - Amit Dutta, Date - 29th SEP, 2025 */ -/* Let Us C, Chap - 2, Page - 37, Qn no.: G(c) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - double l1, l2, g1, g2, d; - printf(&quot;Enter the Latitude in &#x27;L1, L2&#x27; format : &quot;); - scanf(&quot;%lf, %lf&quot;, &amp;l1, &amp;l2); - printf(&quot;Enter the Longitude in &#x27;G1, G2&#x27; format : &quot;); - scanf(&quot;%lf, %lf&quot;, &amp;g1, &amp;g2); - // Converting degree to radian because function from math.h use radian not degree - l1 = l1 * (M_PI / 180); - l2 = l2 * (M_PI / 180); - g1 = g1 * (M_PI / 180); - g2 = g2 * (M_PI / 180); - d = 3963 * acos(sin(l1) * sin(l2) + cos(l1) * cos(l2) * cos(g2 - g1)); - printf(&quot;Distance in nautical miles : %g&quot;, d); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc007.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc007_c', 'luc007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc007.c"> - <pre><code class="language-c">/* Wind-chill factor is the felt air temperature on exposed skin due to wind. -The wind-chill temperature is always lower than the air temperature, and is -calculated as per the following formula. - wcf = 35.74 + 0.6215t + (0.4275t - 35.75) * v^0.16 -Where t is temperature and v is wind velocity. Write a program to receive -values of t and v and calcualate wind-chill factor (wcf). */ -/* Author - Amit Dutta, Date - 30th SEP, 2025 */ -/* Let Us C, Chap - 2, Page - 37, Qn No.: G(d) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - double t, v, wcf; - printf(&quot;Enter the temperature and velociy of the wind : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;t, &amp;v); - wcf = 35.74 + (0.6215 * t) + (((0.4275 * t) - 35.75) * pow(v, 0.16)); - printf(&quot;\nWind-chill factor (wcf) : %g&quot;, wcf); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc008.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc008_c', 'luc008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc008.c"> - <pre><code class="language-c">/* If value of an angle is input through the keyboard, -write a program to print all its trigonometric ratios. */ -/* Author - Amit Dutta, Date - 30th SEP, 2025 */ -/* Let Us C, Chap - 2, Page - 37, Qn No.: G(e) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - double inp, rsin, rcos, rtan, rcosec, rsec, rcot; - printf(&quot;Enter the Angle in degree : &quot;); - scanf(&quot;%lf&quot;, &amp;inp); - inp = inp * (M_PI / 180); //changing degree to radian - rsin = sin(inp); - rcos = cos(inp); - rtan = tan(inp); - rcosec = 1 / rsin; - rsec = 1 / rcos; - rcot = 1 / rtan; - printf(&quot;\nTrigonometric ratios :-&quot; - &quot;\nsin = %g &quot; - &quot;\ncos = %g&quot; - &quot;\ntan = %g&quot; - &quot;\ncosec = %g&quot; - &quot;\nsec = %g&quot; - &quot;\ncot = %g&quot;, - rsin, rcos, rtan, rcosec, rsec, rcot); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc009.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc009_c', 'luc009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc009.c"> - <pre><code class="language-c">/* Two numbers are input through the keyboard into two locations -C and D. Write a program to interchange the contents of C and D. */ -/* Author - Amit Dutta, Date - 30th SEP, 2025 */ -/* Let Us C, Chap - 2, Page - 37, Qn No.: G(d) */ - -#include &lt;stdio.h&gt; -int main() -{ - double a, b; - printf(&quot;Enter the two number A and B : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;a, &amp;b); - printf(&quot;\nBefore Interchange : &quot;); - printf(&quot;\nA = %g (Memory location = %p)&quot;, a, &amp;a); - printf(&quot;\nB = %g (Memory location = %p)&quot;, b, &amp;b); - a = a + b; - b = a - b; - a = a - b; - printf(&quot;\nAfter Interchange :&quot;); - printf(&quot;\nA = %g (Memory location = %p)&quot;, a, &amp;a); - printf(&quot;\nB = %g (Memory location = %p)&quot;, b, &amp;b); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc010.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc010_c', 'luc010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc010.c"> - <pre><code class="language-c">/* A five-digit number is entered through the keyboard. Write a program -to obtain the reversed number and to etermine whether the original and reversed -numbers are equal or not. */ -/* Author - Amit Dutta, Date - 1st OCT, 2025 */ -/* Let Us C, Chap - 3, Page - 53, Qn No.: f(a) */ - -#include &lt;stdio.h&gt; -int main() -{ - int num, rev, temp, i; - printf(&quot;Please enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - if (num &lt; 10000 || num &gt; 99999) - { - printf(&quot;\nPlease enter a five digit number.&quot;); - return 1; - } - temp = num; - for (i = 1; i &lt;= 5; i++) - { - rev = (rev * 10) + num % 10; - num = num / 10; - } - printf(&quot;\nReverse of the Input number : %d&quot;, rev); - if (rev == temp) - printf(&quot;\nOriginal and reversed numbers are equal.&quot;); - else - printf(&quot;\nOrigianl and reversed numbers are not equal.&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc011.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc011_c', 'luc011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc011.c"> - <pre><code class="language-c">/* If ages of Ram, Shyam and Ajay are input through the keyboard, -write a program to determine the youngest of the three. */ -/* Author - Amit Dutta, Date - 1st OCT, 2025 */ -/* Let Us C, Chap- 3, Page - 53, Qn No.: f(b) */ - -#include &lt;stdio.h&gt; -int main() -{ - int ram, shyam, ajay; - printf(&quot;Please enter the age of Ram, Shyam and Ajay : &quot;); - scanf(&quot;%d %d %d&quot;, &amp;ram, &amp;shyam, &amp;ajay); - if (ram == shyam || ram == ajay || shyam == ajay) - printf(&quot;\nThree must have different age.&quot;); - if (ram &lt; shyam &amp;&amp; ram &lt; ajay) - printf(&quot;\nRam is the youngest. Age : %d&quot;, ram); - if (shyam &lt; ram &amp;&amp; shyam &lt; ajay) - printf(&quot;\nShyam is the youngest. Age : %d&quot;, shyam); - if (ajay &lt; ram &amp;&amp; ajay &lt; shyam) - printf(&quot;\nAjay is the youngest. Age : %d&quot;, ajay); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc012.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc012.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc012_c', 'luc012.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc012_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc012.c"> - <pre><code class="language-c">/* Write a program to check whether a triangle is valid or not, -if three angles of the triangle are entered through the keyboard. -A triangle is valid if the sum of all the three angles is equal to 180 degrees. */ -/* Author - Amit Dutta, Date - 1st OCT, 2025 */ -/* Let Us C, Chap- 3, Page - 53, Qn No.: f(c) */ - -#include &lt;stdio.h&gt; -int main() -{ - double angle1, angle2, angle3, sum; - printf(&quot;Enter the value of the three angle of the triangle : &quot;); - scanf(&quot;%lf %lf %lf&quot;, &amp;angle1, &amp;angle2, &amp;angle3); - sum = angle1 + angle2 + angle3; - if (sum == 180.0) - printf(&quot;\nThis Triangle is a valid one.&quot;); - else - printf(&quot;\nThis Triangle is not valid. Sum of the angles : %g&quot;, sum); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc013.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc013.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc013_c', 'luc013.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc013_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc013.c"> - <pre><code class="language-c">/* Write a program to find the absolute value -of a number entered through the keyboard. */ -/* Author - Amit Dutta, Date - 1st OCT, 2025 */ -/* Let Us C, Chap- 3, Page - 53, Qn No.: f(d) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - double num; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%lf&quot;, &amp;num); - num = abs(num); - printf(&quot;\nAbsolute value of the input is : %g&quot;, num); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc014.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc014.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc014_c', 'luc014.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc014_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc014.c"> - <pre><code class="language-c">/* Given the length and breadth of a rectangle, write a program to find -whether the area of the rectangle is greater than it&#x27;s perimeter. -For example, the area of the rectangle with length = 5 and breadth = 4 -is greater than its perimeter. */ -/* Author - Amit Dutta, Date - 1st OCT, 2025 */ -/* Let Us C, Chap- 3, Page - 53, Qn No.: f(e) */ - -#include &lt;stdio.h&gt; -int main() -{ - double len, bre, area, peri; - printf(&quot;Enter the length and breadth of the rectangle : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;len, &amp;bre); - area = len * bre; - peri = 2 * (len + bre); - if (area &gt; peri) - printf(&quot;\nThe area of the rectangle is greater than it&#x27;s perimeter.&quot;); - else if (area &lt; peri) - printf(&quot;\nThe area of the rectangle is lower than it&#x27;s perimeter.&quot;); - else - printf(&quot;\nThe area of the rectangle is same as it&#x27;s perimeter.&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc015.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc015.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc015_c', 'luc015.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc015_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc015.c"> - <pre><code class="language-c">/* Given three points (x1, y1), (x2, y2), and (x3, y3), -write a program to check if the three poins fall on one straight line. */ -/* Author - Amit Dutta, Date - 1st OCT, 2025 */ -/* Let Us C, Chap- 3, Page - 53, Qn No.: f(f) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -#define EPSILON 0.0001 -// Define a small tolerance value (EPSILON) for safe floating-point comparison -// This is critical because of minor rounding errors in computer arithmetic. -int main() -{ - double x1, x2, x3, y1, y2, y3, area; - printf(&quot;Enter the point A(x1, y1) : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;x1, &amp;y1); - printf(&quot;Enter the point B(x2, y2) : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;x2, &amp;y2); - printf(&quot;Enter the point C(x3, y3) : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;x3, &amp;y3); - area = 0.5 * ((x1 * (y2 - y3)) + (x2 * (y3 - y1)) + (x3 * (y1 - y2))); - if (fabs(area) &lt; EPSILON) // abs() for integer, fabs() for float, double - printf(&quot;\nA(%g, %g), B(%g, %g) and C(%g, %g) points fall on one straight line.&quot;, x1, y1, x2, y2, x3, y3); - else - printf(&quot;\nA(%g, %g), B(%g, %g) and C(%g, %g) points doesn&#x27;t fall on one straight line.&quot;, x1, y1, x2, y2, x3, y3); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc016.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc016.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc016_c', 'luc016.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc016_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc016.c"> - <pre><code class="language-c">/* Given the coordiantes (x, y) of center of a circle and its radius, -write a program that will determine whether a point lies inside the circle, -on the circle or outside the circle. (Hint : Use sqrt() and pow() functions.) */ -/* Author - Amit Dutta, Date - 1st OCT, 2025 */ -/* Let Us C, Chap- 3, Page - 53, Qn No.: f(g) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -// Define a small tolerance value (EPSILON) for reliable floating-point comparison -#define EPSILON 0.0001 - -int main() -{ - double h, k; - double R; - double x, y; - double distance_sq; - printf(&quot;Enter the center coordinates (h, k) : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;h, &amp;k); - printf(&quot;Enter the radius (R) : &quot;); - scanf(&quot;%lf&quot;, &amp;R); - printf(&quot;Enter the point P coordinates (x, y) : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;x, &amp;y); - distance_sq = pow(x - h, 2) + pow(y - k, 2); - double radius_sq = R * R; - // Case 1: On the circle (D^2 = R^2) - Use EPSILON for safety! - if (fabs(distance_sq - radius_sq) &lt; EPSILON) - { - printf(&quot;The point P(%g, %g) lies ON THE CIRCLE.\n&quot;, x, y); - } - // Case 2: Inside the circle (D^2 &lt; R^2) - else if (distance_sq &lt; radius_sq) - { - printf(&quot;The point P(%g, %g) lies INSIDE THE CIRCLE.\n&quot;, x, y); - } - // Case 3: Outside the circle (D^2 &gt; R^2) - else - { - printf(&quot;The point P(%g, %g) lies OUTSIDE THE CIRCLE.\n&quot;, x, y); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc017.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc017.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc017_c', 'luc017.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc017_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc017.c"> - <pre><code class="language-c">/* Given a point (x, y), write a program to find out if it lies on X-axis, Y-axis or origin. */ -/* Author - Amit Dutta, Date - 1st OCT, 2025 */ -/* Let Us C, Chap- 3, Page - 53, Qn No.: f(h) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -#define EPSILON 0.00001 - -int main() -{ - double x, y; - printf(&quot;Enter the point P(x, y) : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;x, &amp;y); - if (fabs(x) &lt; EPSILON &amp;&amp; fabs(y) &lt; EPSILON) - printf(&quot;\nPoint P(%g, %g) lies on the origin.&quot;, x, y); - else if (fabs(x) &lt; EPSILON) - printf(&quot;\nPoint P(%g, %g) lies on the Y-Axis.&quot;, x, y); - else if (fabs(y) &lt; EPSILON) - printf(&quot;\nPoint P(%G, %g) lies on the X-Axis.&quot;, x, y); - else - printf(&quot;\nThe point P(%g, %g) lies in a QUADRANT (not on an axis or the origin).&quot;, x, y); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc018-logic.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc018-logic.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc018-logic_c', 'luc018-logic.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc018-logic_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc018-logic.c"> - <pre><code class="language-c">/* According to Gregorian calender, it was Monday on the date 01/01/01. -Write a program to find out what is the day on 1st January of any input year. */ -/* Author - Amit Dutta, Date - 1st OCT, 2025 */ -/* Let Us C, Chap- 3, Page - 53, Qn No.: f(i) */ - -#include &lt;stdio.h&gt; - -/** - * @brief Determines if a given year is a leap year. - * * The rule: A year is a leap year if it is divisible by 4, UNLESS it is - * divisible by 100 but NOT by 400. - * * @param year The year to check. - * @return 1 if it is a leap year, 0 otherwise. - */ -int is_leap(int year) { - // Check if divisible by 400 OR (divisible by 4 AND not divisible by 100) - if ((year % 400 == 0) || (year % 4 == 0 &amp;&amp; year % 100 != 0)) { - return 1; - } - return 0; -} - -/** - * @brief Calculates the day of the week for January 1st of the given year. - * * The base date is 01/01/01, which was a Monday (index 1). - * * Day Mapping: 0:Sunday, 1:Monday, 2:Tuesday, 3:Wednesday, 4:Thursday, 5:Friday, 6:Saturday - */ -int main() { - long long year; // Use long long for year input if years far in the future/past are tested - int i; - long long total_days = 0; - int day_index; - - // Day names array for output - const char *day_names[] = {&quot;Sunday&quot;, &quot;Monday&quot;, &quot;Tuesday&quot;, &quot;Wednesday&quot;, &quot;Thursday&quot;, &quot;Friday&quot;, &quot;Saturday&quot;}; - - printf(&quot;Enter the year (e.g., 2025): &quot;); - if (scanf(&quot;%lld&quot;, &amp;year) != 1 || year &lt; 1) { - printf(&quot;Invalid year input. Please enter a positive integer year (&gt;= 1).\n&quot;); - return 1; - } - - // --- Core Logic: Calculate Total Days --- - - // We only need to consider the years that have *passed* before the target year. - // So, we count days from the end of year 0 up to the end of year (year - 1). - int years_passed = year - 1; - - // 1. Calculate the number of leap days up to the end of year (year - 1) - // Formula based on Gregorian calendar rules for years Y-1: - // (Y-1)/4 - (Y-1)/100 + (Y-1)/400 - long long leap_years = years_passed / 4 - years_passed / 100 + years_passed / 400; - - // 2. Total days = (Number of years * 365) + (Number of leap years) - // Note: The loop method (below) is more intuitive but the formula is faster. - // We will use the direct formula for efficiency. - total_days = years_passed * 365 + leap_years; - - // --- Alternate Loop Method (for conceptual simplicity) --- - /* - for (i = 1; i &lt; year; i++) { - total_days += 365; - if (is_leap(i)) { - total_days += 1; // Add 1 for the leap day - } - } - */ - - // --- Determine the Day of the Week --- - - // Since 01/01/01 was Monday (index 1), we use the following setup: - // Index 1 corresponds to Monday. - // The calculation gives the number of days *past* the Monday start (01/01/01). - // The modulo operation gives the remainder (0-6). - - // 0 days elapsed (Year 1): total_days=0. (0 + 1) % 7 = 1 (Monday). Correct. - // 365 days elapsed (Year 2): total_days=365. (365 + 1) % 7 = 2 (Tuesday). Correct. (365 mod 7 = 1, 1+1 = 2) - - day_index = (total_days + 1) % 7; - - // Correct the Day Index to match the array (0:Sun, 1:Mon, ..., 6:Sat) - // The +1 adjusts for the Monday starting point (index 1). - - printf(&quot;\nOn January 1st, %lld, the day was: **%s**.\n&quot;, year, day_names[day_index]); - - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc018.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc018.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc018_c', 'luc018.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc018_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc018.c"> - <pre><code class="language-c">/* According to Gregorian calender, it was Monday on the date 01/01/01. -if any year is input through the keyboard write a program to find out -what is the day on 1st January of this year. */ -/* Author - Amit Dutta, Date - 1st OCT, 2025 */ -/* Let Us C, Chap- 3, Page - 53, Qn No.: f(i) */ - -#include &lt;stdio.h&gt; - -int is_leap(int year) { - if ((year % 400 == 0) || (year % 4 == 0 &amp;&amp; year % 100 != 0)) { - return 1; - } - return 0; -} - -int main() { - long long year; // long long for year input if years far in the future/past are tested - int i; - long long total_days = 0; - int day_index; - - // Day names array for output - const char *day_names[] = {&quot;Sunday&quot;, &quot;Monday&quot;, &quot;Tuesday&quot;, &quot;Wednesday&quot;, &quot;Thursday&quot;, &quot;Friday&quot;, &quot;Saturday&quot;}; - - printf(&quot;Enter the year (e.g., 2025): &quot;); - if (scanf(&quot;%lld&quot;, &amp;year) != 1 || year &lt; 1) { - printf(&quot;Invalid year input. Please enter a positive integer year (&gt;= 1).\n&quot;); - return 1; - } - int years_passed = year - 1; - long long leap_years = years_passed / 4 - years_passed / 100 + years_passed / 400; - total_days = years_passed * 365 + leap_years; - day_index = (total_days + 1) % 7; - printf(&quot;\nOn January 1st, %lld, the day was: %s.\n&quot;, year, day_names[day_index]); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc019.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc019.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc019_c', 'luc019.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc019_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc019.c"> - <pre><code class="language-c">/* If the length of three sides of a triangle are entered through the -keyboard, write a program to check whether the triangle is an isosceles, -an equilateral, a scalene or a right-angled triangle. */ -/* Author - Amit Dutta, Date - 3rd OCT, 2025 */ -/* Let Us C, Chap- 4, Page - 71, Qn No.: D(a) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -#define EPSILON 0.000001 -/* EPSILON is used to compare double values for approximate equality, -mitigating floating-point precision errors. */ - -int main() -{ - double side1, side2, side3; - printf(&quot;Please enter the length of three side of the triangle : &quot;); - scanf(&quot;%lf %lf %lf&quot;, &amp;side1, &amp;side2, &amp;side3); - if (side1 &lt; 1 || side2 &lt; 1 || side3 &lt; 1) - { - printf(&quot;\nLength of a side of triangle should be a positive integer.&quot;); - return 1; - } - if (side1 + side2 &lt; side3 || side1 + side3 &lt; side2 || side2 + side3 &lt; side1) - { - printf(&quot;\nEntered triangle is not VALID.&quot;); - return 1; - } - // isosceles check - if (side1 == side2 || side2 == side3 || side3 == side1) - printf(&quot;\nEntered triangle is a ISOSCELES triangle.&quot;); - else - printf(&quot;\nEntered triangle is NOT a ISOSCELES triangle.&quot;); - // equilateral check - if (side1 == side2 &amp;&amp; side2 == side3) - printf(&quot;\nEntered triangle is a EQUILATERAL triangle.&quot;); - else - printf(&quot;\nEntered triangle is NOT a EQUILATERAL triangle.&quot;); - // scalene check - if (side1 != side2 &amp;&amp; side2 != side3) - printf(&quot;\nEntered triangle is a SCALENE triangle.&quot;); - else - printf(&quot;\nEntered triangle is NOT a SCALENE triangle.&quot;); - // right-angle check - if (fabs(((side1 * side1) + (side2 * side2)) - (side3 * side3)) &lt; EPSILON || - fabs(((side2 * side2) + (side3 * side3)) - (side1 * side1)) &lt; EPSILON || - fabs(((side3 * side3) + (side1 * side1)) - (side2 * side2)) &lt; EPSILON) - printf(&quot;\nEntered triangle is a RIGHT-ANGLED triangle.&quot;); - else - printf(&quot;\nEntered triangle is NOT a RIGHT-ANGLED triangle.&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc020.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc020.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc020_c', 'luc020.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc020_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc020.c"> - <pre><code class="language-c">/* In digital world colors are specified in Red-Green-Blue (RGB) format, -with values of R, G, B varying on an integer scale from 0 to 255. In print -publishing the colors are mentioned in Cyan-Magenta-Yellow-Black (CMYK) format, -with values of C, M, Y, and K varying on a real scale from 0.0 to 1.0. -Write a program that converts RGB color to CMYK color as per the following formulae: - White = Max(Red/255, Green/255, Blue/255) - Cyan = (White-Red/255) / White - Magenta = (White-Green/255) / White - Yellow = (White-Blue/255) / White - Black = 1 - White -Note that if the RGB values are all 0, then the CMY values are all 0 and the K value is 1. */ -/* Author - Amit Dutta, Date - 4th OCT, 2025 */ -/* Let Us C, Chap- 4, Page - 71, Qn No.: D(b) */ - -#include &lt;stdio.h&gt; - -// declaring function -double get_white(double red, double green, double blue) -{ - double max; - max = red / 255; - if (max &lt; (green / 255)) - max = green / 255; - if (max &lt; (blue / 255)) - max = blue / 255; - return max; -} - -int main() -{ - double r, g, b, w, c = 0, m = 0, y = 0, k = 0; - printf(&quot;Enter the RGB color code in &#x27;R G B&#x27; format : &quot;); - scanf(&quot;%lf %lf %lf&quot;, &amp;r, &amp;g, &amp;b); - - // checking for invalid input (negetive input) - if (r &lt; 0 || g &lt; 0 || b &lt; 0) - { - printf(&quot;\nRGB color code can not be a negetive number.&quot;); - return 1; - } - - // checking for invalid input (out of range color code) - if (r &gt; 255 || g &gt; 255 || b &gt; 255) - { - printf(&quot;\nRGB color code can be maximum (255, 255, 255).&quot;); - return 1; - } - - // converting RGB color code to CMYK color code - if (r == 0 &amp;&amp; g == 0 &amp;&amp; b == 0) - k = 1; - else - { - w = get_white(r, g, b); - c = (w - (r / 255)) / w; - m = (w - (g / 255)) / w; - y = (w - (b / 255)) / w; - k = 1 - w; - } - - printf(&quot;\nRGB color (%g, %g, %g) equivalent to CMYK color (%g, %g, %g, %g).&quot;, r, g, b, c, m, y, k); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc021.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc021.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc021_c', 'luc021.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc021_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc021.c"> - <pre><code class="language-c">/* A certain grade of steel is graded according to the following conditions: - (i) Hardness must be greater than 50 - (ii) Carbon content must be less than 0.7 - (iii) Tensile strength must be greater than 5600 - -The grades are as follows: - Grade is 10 if all three conditions are met - Grade is 9 if conditions (i) and (ii) are met - Grade is 8 if conditions (ii) and (iii) are met - Grade is 7 if conditions (i) and (iii) are met - Grade is 6 if only one condition is met - Grade is 5 if none of the conditions are met - -Write a program, which will require the user to give values of hardness, -carbon content and tensile strength of the steel under consideration and output -the grade of the steel. */ - -/* Author - Amit Dutta, Date - 4th OCT, 2025 */ -/* Let Us C, Chap- 4, Page - 71, Qn No.: D(c) */ - -#include &lt;stdio.h&gt; -int main() -{ - double hardness, carbon_content, tensile_strength; - printf(&quot;Enter the details of the steel below - \n&quot;); - printf(&quot;1. Hardness : &quot;); - scanf(&quot;%lf&quot;, &amp;hardness); - printf(&quot;2. Carbon Content : &quot;); - scanf(&quot;%lf&quot;, &amp;carbon_content); - printf(&quot;3. Tensile Strength : &quot;); - scanf(&quot;%lf&quot;, &amp;tensile_strength); - - // storing how many conditions are met as boolean result - int condition_met, condition1, condition2, condition3; - condition1 = hardness &gt; 50; - condition2 = carbon_content &lt; 0.7; - condition3 = tensile_strength &gt; 5600; - condition_met = condition1 + condition2 + condition3; - - // now grading according the result - int grade; - if (condition_met == 3) - grade = 10; - else if (condition_met == 2) - { - if (condition1 &amp;&amp; condition2) - grade = 9; - else if (condition2 &amp;&amp; condition3) - grade = 8; - else if (condition1 &amp;&amp; condition3) - grade = 7; - } - else if (condition_met == 1) - grade = 6; - else - grade = 5; - - // printing the result - printf(&quot;\n------------- Result -------------&quot;); - printf(&quot;\n1. Hardness : Condition %s&quot;, condition1 ? &quot;MET&quot; : &quot;DID NOT MET&quot;); - printf(&quot;\n2. Carbon Content : Condition %s&quot;, condition2 ? &quot;MET&quot; : &quot;DID NOT MET&quot;); - printf(&quot;\n3. Tensile Strength : Condition %s&quot;, condition3 ? &quot;MET&quot; : &quot;DID NOT MET&quot;); - printf(&quot;\nTotal Condition Met : %d&quot;, condition_met); - printf(&quot;\n\nGrade : %d\n\n&quot;, grade); - return 0; -} - -/* I did not used this long variable names. I used very short just the first letter of the word. -After writting the whole program, I just renamed the valiables. This is possible in Visual Stdio Code. */</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc022.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc022.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc022_c', 'luc022.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc022_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc022.c"> - <pre><code class="language-c">/* The Body Mass Index (BMI) is defined as ratio of weight of the -person (in Kilograms) to square of the height (in meters). -Write a program that receives weight and height, calculate the BMI, and reports -the BMI catagory as per the following table. - BMI Catagory BMI - Starvation &lt; 15 - Anorexic 15.1 to 17.5 - Underweight 17.6 to 18.5 - Ideal 18.6 to 24.9 - Overweight 25 to 25.9 - Obese 30 to 39.9 - Morbidly Obese &gt;= 40 -*/ -/* Author - Amit Dutta, Date - 4th OCT, 2025 */ -/* Let Us C, Chap- 4, Page - 72, Qn No.: D(d) */ - -#include &lt;stdio.h&gt; - -int main() -{ - double weight, height, bmi; - printf(&quot;Enter your Weight (in Kilograms) and Height (in Meters) : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;weight, &amp;height); - bmi = weight / (height * height); - printf(&quot;\nCalculated BMI : %g&quot;, bmi); - if (bmi &lt; 15) - printf(&quot;\nBMI Catagory : Starvation&quot;); - else if (bmi &gt;= 15.1 &amp;&amp; bmi &lt;= 17.5) - printf(&quot;\nBMI Catagory : Anorexic&quot;); - else if (bmi &gt;= 17.6 &amp;&amp; bmi &lt;= 18.5) - printf(&quot;\nBMI Catagory : Underweight&quot;); - else if (bmi &gt;= 18.6 &amp;&amp; bmi &lt;= 24.9) - printf(&quot;\nBMI Catagory : Ideal&quot;); - else if (bmi &gt;= 25 &amp;&amp; bmi &lt;= 25.9) - printf(&quot;\nBMI Catagory : Overweight&quot;); - else if (bmi &gt;= 30 &amp;&amp; bmi &lt;= 39.9) - printf(&quot;\nBMI Catagory : Obese&quot;); - else if (bmi &gt;= 40) - printf(&quot;\nBMI Catagory : Morbidly Obese&quot;); - else - printf(&quot;\nBMI Catagory : Unclassified&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc023.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc023.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc023_c', 'luc023.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc023_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc023.c"> - <pre><code class="language-c">/* Using conditional operators determine : - (1) Whether the character entered through the keyboard is a - lower case alphabet or not. - (2) Whether a character entered through the keyboard is a special - symbol or not. */ -/* Author - Amit Dutta, Date - 5th OCT, 2025 */ -/* Let Us C, Chap- 4, Page - 72, Qn No.: E(a) */ - -#include &lt;stdio.h&gt; -int main() -{ - char inp; - printf(&quot;Enter the character : &quot;); - scanf(&quot;%c&quot;, &amp;inp); - printf(&quot;\nInput Character &#x27;%c&#x27; is %s a LOWER CASE ALPHABET.&quot;, inp, - (inp &gt;= &#x27;a&#x27; &amp;&amp; inp &lt;= &#x27;z&#x27;) ? &quot;&quot; : &quot;NOT&quot;); - printf(&quot;\nInput Character &#x27;%c&#x27; is %s a SPECIAL SYMBOL.&quot;, inp, - (inp &gt;= &#x27;a&#x27; &amp;&amp; inp &lt;= &#x27;z&#x27; || inp &gt;= &#x27;A&#x27; &amp;&amp; inp &lt;= &#x27;Z&#x27; - || inp &gt;= &#x27;0&#x27; &amp;&amp; inp &lt;= &#x27;9&#x27;) ? &quot;NOT&quot; : &quot;&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc024.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc024.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc024_c', 'luc024.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc024_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc024.c"> - <pre><code class="language-c">/* Write a program using conditional operators to determine whether -a year entered through the keyboard is a leap year or not. */ -/* Author - Amit Dutta, Date - 5th OCT, 2025 */ -/* Let Us C, Chap- 4, Page - 72, Qn No.: E(b) */ - -#include &lt;stdio.h&gt; -int main() -{ - int year; - printf(&quot;Enter the year : &quot;); - scanf(&quot;%d&quot;, &amp;year); - printf(&quot;\nYear %d is %s a Leapyear.&quot;, year, (year % 400 == 0 || year % 4 == 0 &amp;&amp; year % 100 != 0) ? &quot;&quot; : &quot;NOT&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc025.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc025.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc025_c', 'luc025.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc025_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc025.c"> - <pre><code class="language-c">/* Write a program to find the greates of the three numbers entered -through the keyboard. Use conditional operators. */ -/* Author - Amit Dutta, Date - 6th OCT, 2025 */ -/* Let Us C, Chap- 4, Page - 72, Qn No.: E(c) */ - -#include &lt;stdio.h&gt; -int main() -{ - double num1, num2, num3, max; - printf(&quot;Enter three number : &quot;); - scanf(&quot;%lf %lf %lf&quot;, &amp;num1, &amp;num2, &amp;num3); - printf(&quot;\nGreatest of the three number &#x27;%g&#x27;, &#x27;%g&#x27; and &#x27;%g&#x27; is : &#x27;%g&#x27;&quot;, num1, num2, num3, - (num1 &gt; num2 &amp;&amp; num1 &gt; num3) ? num1 : ((num2 &gt; num1 &amp;&amp; num2 &gt; num3) ? num2 : num3)); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc026.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc026.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc026_c', 'luc026.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc026_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc026.c"> - <pre><code class="language-c">/* Write a program to recieve value of an angle in degreesand check -whether sum of squares of sine and cosine of this angle is equal to 1. */ -/* Author - Amit Dutta, Date - 6th OCT, 2025 */ -/* Let Us C, Chap- 4, Page - 73, Qn No.: E(d) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -#define EPSILON 0.0000001 - -int main() -{ - double angle, result; - printf(&quot;Enter the angle value in degree : &quot;); - // checking if the input is other than number. - if(scanf(&quot;%lf&quot;, &amp;angle) != 1) { - printf(&quot;\nPlease enter a number.&quot;); - return 1; - } - angle = angle * (M_PI / 180); // converting degree to radian - result = pow(sin(angle), 2) + pow(cos(angle), 2); - (fabs(result - 1.0) &lt; EPSILON) ? - printf(&quot;\nsum of squares of sine and cosine of this angle is equal to 1.&quot;) : - printf(&quot;\nsum of squares of sine and cosine of this angle is NOT equal to 1.&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc027.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc027.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc027_c', 'luc027.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc027_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc027.c"> - <pre><code class="language-c">/* Rewrite the folowing program using conditional operations - #include&lt;stdio.h&gt; - int main() - { - float sal; - printf(&quot;Enter the salary&quot;); - scanf(&quot;%f&quot;, &amp;sal); - if(sal &gt;= 25000 &amp;&amp; sal &lt;= 40000) - printf(&quot;Manager\n&quot;); - else - if(sal &gt;= 15000 &amp;&amp; sal &lt; 25000) - printf(&quot;Accountant\n&quot;); - else - printf(&quot;Clerk\n&quot;); - return 0; - } -*/ -/* Author - Amit Dutta, Date - 6th OCT, 2025 */ -/* Let Us C, Chap- 4, Page - 73, Qn No.: E(e) */ - -#include &lt;stdio.h&gt; -int main() -{ - float sal; - printf(&quot;Enter the salary&quot;); - scanf(&quot;%f&quot;, &amp;sal); - (sal &gt;= 25000 &amp;&amp; sal &lt;= 40000) ? printf(&quot;Manager\n&quot;) : - ((sal &gt;= 15000 &amp;&amp; sal &lt; 25000) ? printf(&quot;Accountant\n&quot;) : printf(&quot;Clerk\n&quot;)); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc028.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc028.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc028_c', 'luc028.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc028_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc028.c"> - <pre><code class="language-c">/* Write a program to print all the ASCII values and their equivalent -characters using a while loop. The ASCII may vary from 0 to 255. */ -/* Author - Amit Dutta, Date - 7th OCT, 2025 */ -/* Let Us C, Chap- 5, Page - 87, Qn No.: B(a) */ - -#include &lt;stdio.h&gt; -int main() -{ - int i = 0; - printf(&quot;ASCII Value\tCharacter&quot;); - printf(&quot;\n-----------\t---------\n&quot;); - while (i &lt;= 255) - { - printf(&quot;%d.\t%c\n\n&quot;, i, i); - i++; - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc029.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc029.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc029_c', 'luc029.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc029_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc029.c"> - <pre><code class="language-c">/* Write a program to print out all Armstrong numbers between 100 -and 500. If sum of cubes of each digit of the number is equal to the -number itself, then the number is called an Armstrong number. For -example, 153 = (1 * 1 * 1) + (5 * 5 * 5) + (3 * 3 * 3) */ -/* Author - Amit Dutta, Date - 7th OCT, 2025 */ -/* Let Us C, Chap- 5, Page - 87, Qn No.: B(b) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - int num = 100, temp1, temp2, res; - printf(&quot;Armstrong numbers between 100 and 500 :&quot;); - while (num &lt;= 500) - { - temp1 = num; - res = 0; - while (temp1 != 0) - { - temp2 = temp1 % 10; - res = res + pow(temp2, 3); - temp1 = temp1 / 10; - } - if (num == res) - printf(&quot; %d&quot;, num); - num++; - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc030.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc030.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc030_c', 'luc030.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc030_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc030.c"> - <pre><code class="language-c">/* Write a program for a matchstick game being played between the -computer and a user. Your program should ensure that the computer -always wins. Rules for the game are as follows : - - There are 21 matchsticks. - - The computer asks the player to pick 1, 2, 3, or 4 matchsticks. - - After the person picks, the computer does its picking. - - Whoever is forced to pick up the last matchstick loses the game. -*/ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ -/* Let Us C, Chap- 5, Page - 87, Qn No.: B(c) */ - -/* My Plan: The total number of matchsticks is 21. To guarantee a win, -the computer ensures that after its turn, the number of remaining -matchsticks is always a multiple of 5 plus 1 (i.e., 16, 11, 6, 1). -This is achieved by making the sum of the player&#x27;s pick and the -computer&#x27;s pick equal to 5 in each round. This forces the player -to pick the final matchstick. */ - -#include &lt;stdio.h&gt; -int main() -{ - int remaining_matchsticks = 21, player_pick, computer_pick; - printf(&quot; --- Matchstick Game ---\n&quot;); - printf(&quot;Rules: There are 21 matchsticks. You can pick 1, 2, 3, or 4.\n&quot;); - printf(&quot;Whoever is forced to pick the last matchstick loses the game.\n&quot;); - while (remaining_matchsticks &gt; 1) - { - // game start - printf(&quot;\n--------------------------&quot;); - printf(&quot;\nRemaining Matchsticks : %d&quot;, remaining_matchsticks); - - // player pick and checking input is valid or not - printf(&quot;\nYour turn: Pick 1, 2, 3, or 4 matchsticks: &quot;); - if (scanf(&quot;%d&quot;, &amp;player_pick) != 1) - { - printf(&quot;\n\tPlease enter a number.&quot;); - while (getchar() != &#x27;\n&#x27;) - ; - continue; - } - - // checking player pick is valid or not - if (player_pick &lt; 1 || player_pick &gt; 4) - { - printf(&quot;\n\tPlease enter a number among 1, 2, 3 and 4.&quot;); - while (getchar() != &#x27;\n&#x27;) - ; - continue; - } - - if (player_pick &gt; remaining_matchsticks) - { - printf(&quot;\nInvalid choice! There are not enough matchsticks left.&quot;); - while (getchar() != &#x27;\n&#x27;) - ; - continue; - } - - // computer_picks - computer_pick = 5 - player_pick; - printf(&quot;\ncomputer_picks : %d&quot;, computer_pick); - - // remaining matchsticks - remaining_matchsticks = remaining_matchsticks - (player_pick + computer_pick); - } - - // game over - printf(&quot;\n----------------------------------\n&quot;); - printf(&quot;Only 1 matchstick is left.\n&quot;); - printf(&quot;You are forced to pick the last matchstick. You lose!\n&quot;); - printf(&quot;The computer wins.\n&quot;); - - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc031-logic.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc031-logic.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc031-logic_c', 'luc031-logic.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc031-logic_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc031-logic.c"> - <pre><code class="language-c">/* Write a program to enter numbers till the user wants. At the end it -should display the count of positive, negative and zeros entered. */ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ -/* Let Us C, Chap- 5, Page - 87, Qn No.: B(d) */ - -/* - * DETAILED PROGRAM PLAN: - * 1. INITIALIZATION: Set three counters (positive_count, negative_count, zero_count) to zero. - * 2. INPUT LOOP: Start an infinite loop to continuously request user input. - * 3. READ INPUT: Use fgets() to read the user&#x27;s input as a generic string (char array). - * This allows the program to accept multi-digit numbers (e.g., &quot;-500&quot;) or the command (&#x27;n&#x27;). - * 4. TERMINATION CHECK: Immediately check if the input string is exactly &quot;n&quot; using strcmp(). - * If true, the user wants to quit, so break the loop. - * 5. VALIDATION &amp; CONVERSION: If the input is not &quot;n&quot;, use sscanf() to safely attempt to convert - * the string into an integer. - * 6. COUNTING LOGIC: If sscanf() successfully reads an integer (sscanf returns 1): - * - If the number is &gt; 0, increment positive_count. - * - If the number is &lt; 0, increment negative_count. - * - If the number is == 0, increment zero_count. - * 7. ERROR HANDLING: If the input is neither &quot;n&quot; nor a valid number (sscanf returns 0), - * inform the user of invalid input and continue the loop. - * 8. FINAL DISPLAY: After the loop terminates, print the final totals for positive, negative, and zero counts. - */ - -#include &lt;stdio.h&gt; -#include &lt;stdlib.h&gt; // for strtol -#include &lt;string.h&gt; // for strcmp - -// Maximum size of the input line -#define MAX_INPUT_LEN 15 - -int main() { - // Initialize counters - int positive_count = 0; - int negative_count = 0; - int zero_count = 0; - - // Buffer to store the user&#x27;s input as a string (e.g., &quot;123&quot;, &quot;-50&quot;, or &quot;n&quot;) - char input_buffer[MAX_INPUT_LEN]; - int number; - - printf(&quot;--- Number Analyzer ---\n&quot;); - printf(&quot;Enter numbers one by one. Type &#x27;n&#x27; and press Enter to finish.\n\n&quot;); - - // Loop until the user enters &#x27;n&#x27; - while (1) { - printf(&quot;Enter number or &#x27;n&#x27;: &quot;); - - // Read the entire line of input into the buffer - if (fgets(input_buffer, MAX_INPUT_LEN, stdin) == NULL) { - // Handle EOF (end of file) or reading error - break; - } - - // Remove the trailing newline character from the input_buffer - // The last character will be &#x27;\n&#x27; if the input was shorter than MAX_INPUT_LEN - size_t len = strlen(input_buffer); - if (len &gt; 0 &amp;&amp; input_buffer[len - 1] == &#x27;\n&#x27;) { - input_buffer[len - 1] = &#x27;\0&#x27;; - } - - // 1. Check for the termination condition - if (strcmp(input_buffer, &quot;n&quot;) == 0) { - printf(&quot;\n&#x27;n&#x27; received. Stopping input...\n&quot;); - break; // Exit the while loop - } - - // 2. Attempt to convert the input string to an integer - // sscanf attempts to read the string according to the format &quot;%d&quot; (decimal integer) - // It returns 1 if a number was successfully read. - int conversions = sscanf(input_buffer, &quot;%d&quot;, &amp;number); - - if (conversions == 1) { - // Conversion was successful, now check the number&#x27;s sign - if (number &gt; 0) { - positive_count++; - } else if (number &lt; 0) { - negative_count++; - } else { - zero_count++; - } - printf(&quot; -&gt; Number recorded: %d\n&quot;, number); - } else { - // Conversion failed. The input was neither &#x27;n&#x27; nor a valid integer. - printf(&quot; -&gt; Invalid input. Please enter a valid number or &#x27;n&#x27;.\n&quot;); - } - } - - // Display the final results - printf(&quot;\n====================================\n&quot;); - printf(&quot; Analysis Complete\n&quot;); - printf(&quot;====================================\n&quot;); - printf(&quot;Positive numbers entered: %d\n&quot;, positive_count); - printf(&quot;Negative numbers entered: %d\n&quot;, negative_count); - printf(&quot;Zeroes entered: %d\n&quot;, zero_count); - printf(&quot;Total numbers recorded: %d\n&quot;, positive_count + negative_count + zero_count); - printf(&quot;====================================\n&quot;); - - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc031.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc031.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc031_c', 'luc031.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc031_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc031.c"> - <pre><code class="language-c">/* Write a program to enter numbers till the user wants. At the end it -should display the count of positive, negative and zeros entered. */ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ -/* Let Us C, Chap- 5, Page - 87, Qn No.: B(d) */ - -#include &lt;stdio.h&gt; -int main() -{ - int choice = 1, num, positive_count = 0, negative_count = 0, zero_count = 0; - while (choice == 1) - { - printf(&quot;\nEnter the number (Type any character and press Enter to finish.) : &quot;); - choice = scanf(&quot;%d&quot;, &amp;num); // Checking whether the user has input any characters - if (choice == 1) - { - printf(&quot;Number recorded : %d&quot;, num); - if (num &lt; 0) - negative_count++; - else if (num &gt; 0) - positive_count++; - else if (num == 0) - zero_count++; - } - else - { - // If the user inputs any characters, then choice = 0, it means he doesn&#x27;t want to give any more input; - choice = 0; - printf(&quot;\nCharacter received. Stopping input...\n&quot;); - } - } - // Display the final results - printf(&quot;\n====================================\n&quot;); - printf(&quot; Analysis Complete\n&quot;); - printf(&quot;====================================\n&quot;); - printf(&quot;Positive numbers entered: %d\n&quot;, positive_count); - printf(&quot;Negative numbers entered: %d\n&quot;, negative_count); - printf(&quot;Zeroes entered: %d\n&quot;, zero_count); - printf(&quot;Total numbers recorded: %d\n&quot;, positive_count + negative_count + zero_count); - printf(&quot;====================================\n&quot;); -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc032.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc032.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc032_c', 'luc032.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc032_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc032.c"> - <pre><code class="language-c">/* Write a program to recieve an integer and find its octal equivalent. -(Hint : To obtain octal equivalent of an integer, Divide it continuously -by 8 till dividend does not become zero, then write the remainders -obtained in reverse derection.) */ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ -/* Let Us C, Chap- 5, Page - 87, Qn No.: B(e) */ - -// using array - -#include &lt;stdio.h&gt; -int main() -{ - int octal[20], decimal, index = 0, temp, rem; - printf(&quot;Enter the decimal number : &quot;); - scanf(&quot;%d&quot;, &amp;decimal); - temp = decimal; - while (temp != 0) - { - rem = temp % 8; - temp = temp / 8; - octal[index] = rem; - index++; - } - printf(&quot;\nDeciaml %d to octal : &quot;, decimal); - while ((index - 1) &gt;= 0) - { - printf(&quot;%d&quot;, octal[index - 1]); - index--; - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc033.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc033.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc033_c', 'luc033.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc033_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc033.c"> - <pre><code class="language-c">/* Write a program to find the range of a set of numbers entered -through the keyboard. Range is the difference between the smallest -and biggest number in the list. */ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ -/* Let Us C, Chap- 5, Page - 87, Qn No.: B(f) */ - -#include &lt;stdio.h&gt; -int main() -{ - int choice = 1, set_of_numbers[30], num, index = -1; - while (choice == 1) - { - printf(&quot;\nEnter the number (Type any character and press Enter to finish.) : &quot;); - choice = scanf(&quot;%d&quot;, &amp;num); // Checking whether the user has input any characters - if (choice != 1) - { - // If the user inputs any characters, then choice = 0, it means he doesn&#x27;t want to give any more input; - choice = 0; - printf(&quot;\nCharacter received. Stopping input...\n&quot;); - break; - } - index++; - set_of_numbers[index] = num; - } - int max = set_of_numbers[0], min = set_of_numbers[0]; - while (index &gt;= 0) - { - if (max &lt; set_of_numbers[index]) - max = set_of_numbers[index]; - if (min &gt; set_of_numbers[index]) - min = set_of_numbers[index]; - index--; - } - int range = max - min; - printf(&quot;\nBiggest number in the set : %d&quot;, max); - printf(&quot;\nSmallest number in the set : %d&quot;, min); - printf(&quot;\nRange : %d&quot;, range); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc034.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc034.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc034_c', 'luc034.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc034_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc034.c"> - <pre><code class="language-c">/* Write a program to print the multiplication table of the number -entered by the user. The table should get displayed in the following -form : - 29 * 1 = 29 - 29 * 2 = 58 -*/ -/* Author - Amit Dutta, Date - 20th OCT, 2025 */ -/* Let Us C, Chap- 6, Page - 105, Qn No.: B(a) */ - -#include &lt;stdio.h&gt; -int main() -{ - int i, num, res; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - printf(&quot;\n--- Multiplication Table ---\n&quot;); - for (i = 1; i &lt;= 10; i++) - printf(&quot;%d * %d = %d\n&quot;, num, i, num * i); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc035.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc035.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc035_c', 'luc035.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc035_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc035.c"> - <pre><code class="language-c">/* According to a study, the approximate level of intelligence of a -person can be calculated using the following formula. - i = 2 + (y + 0.5x) -write a program that will produce a table of values of i, y and x, -where y varies from 1 to 6, and, for each value of y, x varies from -5.5 to 12.5 in steps of 0.5 */ -/* Author - Amit Dutta, Date - 20th OCT, 2025 */ -/* Let Us C, Chap- 6, Page - 105, Qn No.: B(b) */ - -#include &lt;stdio.h&gt; -int main() -{ - double y, x; - printf(&quot;\n--- Approximate Intelligence ---\n&quot;); - for (y = 1; y &lt;= 6; y++) - { - printf(&quot;\tY = %d\n&quot;, y); - for (x = 5.5; x &lt;= 12.5; x += 0.5) - { - printf(&quot;Y: %g\t X: %.2g\t I: %g\n&quot;, y, x, 2 + (y + 0.5 * x)); - } - printf(&quot;-----------------------\n&quot;); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc036.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc036.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc036_c', 'luc036.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc036_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc036.c"> - <pre><code class="language-c">/* When interest compounds q times per year at an annual rate of -r % for n years, the principle p compounds to an amount a as per -the following formula - a = p (1 + r / q) ^ nq -Write a program to read 10 sets of p, r, n &amp; q and calculate the -corresponding as&#x27; */ -/* Author - Amit Dutta, Date - 20th OCT, 2025 */ -/* Let Us C, Chap- 6, Page - 106, Qn No.: B(c) */ - -// DEVELOPMENT STATUS: This implementation is currently untested. -// Please report any functional defects or errors by submitting a GitHub issue &quot;https://github.com/notamitgamer/bsc/issues&quot; with the updated code. - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - double interest, principalAmount, interestRate, timeInYears, compoundFactor, totalAmount; - int index; - for (index = 1; index &lt;= 10; index++) - { - printf(&quot;Enter Principle amount : &quot;); - scanf(&quot;%lf&quot;, &amp;principalAmount); - printf(&quot;Enter Rate of Interest : &quot;); - scanf(&quot;%lf&quot;, &amp;interestRate); - interestRate *= 0.01; - printf(&quot;Enter the Time (Years) : &quot;); - scanf(&quot;%lf&quot;, &amp;timeInYears); - printf(&quot;Compound count in one year : &quot;); - scanf(&quot;%lf&quot;, &amp;compoundFactor); - totalAmount = (principalAmount * pow((1 + interestRate / compoundFactor), (timeInYears * compoundFactor))); - interest = totalAmount - principalAmount; - printf(&quot;\nInterest : %.2f\nTotal Amount : %.2f\n\n&quot;, interest, totalAmount); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc037.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc037.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc037_c', 'luc037.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc037_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc037.c"> - <pre><code class="language-c">/* The natural logarithm can be approximated by the following series. - (x-1)/x + 1/2 ((x-1)/x)^2 + 1/2 ((x-1)/x)^3 + 1/2 ((x-1)/x)^4 + ... -If x is input through the keyboard, write a program to calculate the -sum of the first seven terms of this series. */ -/* Author - Amit Dutta, Date - 21st OCT, 2025 */ -/* Let Us C, Chap- 6, Page - 106, Qn No.: B(d) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -double series(double x) // made this fn only for fun, making a fn was not necessary -{ - double result = (x - 1) / x; - int i; - for (i = 2; i &lt;= 7; i++) - { - result += 0.5 * pow(((x - 1) / x), i); - } - return result; -} - -int main() -{ - double x; - printf(&quot;Enter the value for x : &quot;); - scanf(&quot;%lf&quot;, &amp;x); - printf(&quot;\nResult : %g&quot;, series(x)); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc038.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc038.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc038_c', 'luc038.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc038_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc038.c"> - <pre><code class="language-c">/* Write a program to generate all Pythagorean Triplets with slide -length less than or equal to 30. */ -/* Author - Amit Dutta, Date - 21st OCT, 2025 */ -/* Let Us C, Chap- 6, Page - 106, Qn No.: B(e) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int main() -{ - int a, b, c; - printf(&quot;Pythagorean Triplets with slide length less than or equal to 30 : \n&quot;); - for (a = 1; a &lt;= 30; a++) - { - for (b = a; b &lt;= 30; b++) - { - int c_square = a * a + b * b; - for (c = b + 1; c &lt;= 30; c++) - { - if (c * c == c_square) - printf(&quot;(%d, %d, %d)\n&quot;, a, b, c); - } - } - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc039.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc039.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc039_c', 'luc039.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc039_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc039.c"> - <pre><code class="language-c">/* Population of a town today is 100000. The population has increased -steadily at the rate of 10% per year for last 10 years. Write a -program to determine the population at the end of each year in the -last decade. */ -/* Author - Amit Dutta, Date - 21st OCT, 2025 */ -/* Let Us C, Chap- 6, Page - 106, Qn No.: B(f) */ - -#include &lt;stdio.h&gt; -int main() -{ - int i, population = 100000; - printf(&quot;Present year : %d\n&quot;, population); - for (i = 1; i &lt;= 10; i++) - { - population /= 1.10; - printf(&quot;%d year ago : %d\n&quot;, i, population); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc040-logic.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc040-logic.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc040-logic_c', 'luc040-logic.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc040-logic_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc040-logic.c"> - <pre><code class="language-c">/* Ramanujan number (1729) is the smallest number that can be -expressed as sum of cubes in two different ways - 1729 can be -expressed as 1^3 + 12^3 and 9^3 + 10^3. Write a program to print all such -numbers up to a reasonable limit. */ -/* Author - Amit Dutta, Date - 22nd - 23rd OCT, 2025 */ -/* Let Us C, Chap- 6, Page - 106, Qn No.: B(g) */ - -// 1. INCLUDE SECTION -#include &lt;stdio.h&gt; // Includes the standard input/output library, necessary for printf() - -// 2. CONSTANT DEFINITIONS (MACROS) -// These define fixed values we can easily use and change later. -#define LIMIT 100000 // The maximum number we want to search up to. -// The maximum base value (a, b, c, or d) we need to check. -// Since 47^3 is greater than 100,000, checking bases up to 47 covers the LIMIT. -#define MAX_BASE_VAL 47 - -// 3. MAIN FUNCTION -int main() -{ - // 4. VARIABLE DECLARATION - - // sum1 and sum2 store the results of a^3 + b^3 and c^3 + d^3. - // We use &#x27;long long&#x27; because cubes (like 47^3) are large and can exceed - // the capacity of a standard &#x27;int&#x27;, preventing errors. - long long sum1, sum2; - - int count = 0; // Counter to keep track of how many Ramanujan numbers we find. - - // This flag is used to optimize the search. If we find the second way (c^3 + d^3) - // to make sum1, we set this to 1 and immediately stop the inner loops. - int found_match; - - // Print introductory message to the user. - printf(&quot;Ramanujan Number Finder (a^3 + b^3 = c^3 + d^3)\n&quot;); - printf(&quot;Searching up to %d (Max base value is %d)\n&quot;, LIMIT, MAX_BASE_VAL); - printf(&quot;---------------------------------------------------\n&quot;); - - // 5. OUTER LOOPS: Establishing the FIRST SUM (a^3 + b^3 = sum1) - - // Loop for &#x27;a&#x27; (the smaller base of the first pair) - for (int a = 1; a &lt;= MAX_BASE_VAL; a++) - { - - // Loop for &#x27;b&#x27; (the larger base of the first pair) - // We start &#x27;b&#x27; at &#x27;a + 1&#x27; to enforce the rule a &lt; b. - // This prevents us from checking redundant pairs like (1, 12) and (12, 1). - for (int b = a + 1; b &lt;= MAX_BASE_VAL; b++) - { - - // Calculate the first sum: sum1 = a^3 + b^3 - // (long long) is a cast to ensure the math is done using the &#x27;long long&#x27; type. - sum1 = (long long)a * a * a + (long long)b * b * b; - - // Optimization 1: Check if the sum exceeds the global limit. - if (sum1 &gt; LIMIT) - { - // Since &#x27;b&#x27; is increasing, any further increase will also be over the limit. - // We stop the &#x27;b&#x27; loop and move to the next &#x27;a&#x27;. - break; - } - - // Reset the flag for every new sum1. - // We start searching for a second way for this new &#x27;sum1&#x27;, so we reset the flag to 0. - found_match = 0; - - // 6. INNER LOOPS: Searching for the SECOND SUM (c^3 + d^3 = sum2) - - // Loop for &#x27;c&#x27; (the smaller base of the second pair) - // We start &#x27;c&#x27; at &#x27;a + 1&#x27; to enforce the rule a &lt; c. - // This ensures the two pairs {(a, b) and (c, d)} are truly distinct (e.g., 1729 = 1^3 + 12^3 and 9^3 + 10^3). - for (int c = a + 1; c &lt;= MAX_BASE_VAL; c++) - { - - // Optimization 2: Check the flag to exit the &#x27;c&#x27; loop early. - if (found_match) - { - // If we already found the second way (c, d) in a previous iteration of &#x27;c&#x27;, stop searching and move to the next (a, b) pair. - break; - } - - // Loop for &#x27;d&#x27; (the larger base of the second pair) - // We start &#x27;d&#x27; at &#x27;c + 1&#x27; to enforce c &lt; d. - for (int d = c + 1; d &lt;= MAX_BASE_VAL; d++) - { - - // Calculate the second sum: sum2 = c^3 + d^3 - sum2 = (long long)c * c * c + (long long)d * d * d; - - // Optimization 3: Check if the second sum has passed the first sum. - if (sum2 &gt; sum1) - { - // Since &#x27;d&#x27; is increasing, any further increase will also be greater than sum1. - // We stop the &#x27;d&#x27; loop and move to the next &#x27;c&#x27;. - break; - } - - // 7. CONDITION CHECK: Have we found a Ramanujan number? - // Check if the two sums are equal. - if (sum1 == sum2) - { - count++; // Increment the counter - - // Print the result in the required format. - printf(&quot;[%d] %lld = %d^3 + %d^3 = %d^3 + %d^3\n&quot;, - count, sum1, a, b, c, d); - - // Set the flag to 1, confirming we found the second way. - found_match = 1; - - // Stop the &#x27;d&#x27; loop immediately, as we found the required second pair. - break; - } - } - // If found_match was set to 1, the &#x27;break&#x27; in the d loop will execute, - // then the &#x27;if (found_match) break;&#x27; in the c loop will execute, - // and the program will move to the next (a, b) pair. - } - } - } - - // 8. CONCLUSION - printf(&quot;---------------------------------------------------\n&quot;); - printf(&quot;Search complete. Found %d Ramanujan-type numbers.\n&quot;, count); - - return 0; // Standard way to indicate successful program execution. -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc040.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc040.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc040_c', 'luc040.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc040_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc040.c"> - <pre><code class="language-c">/* Ramanujan number (1729) is the smallest number that can be -expressed as sum of cubes in two different ways - 1729 can be -expressed as 1^3 + 12^3 and 9^3 + 10^3. Write a program to print all such -numbers up to a reasonable limit. */ -/* Author - Amit Dutta, Date - 22nd - 23rd OCT, 2025 */ -/* Let Us C, Chap- 6, Page - 106, Qn No.: B(g) */ - -#include &lt;stdio.h&gt; - -#define limit 100000 -#define max_base 47 - -int main() -{ - - long long sum1, sum2; - int count = 0; - - printf(&quot;Ramanujan numbers : \n&quot;); - - int found_match; - - for (int a = 1; a &lt;= max_base; a++) - { - for (int b = a + 1; b &lt;= max_base; b++) - { - sum1 = (long long)a * a * a + (long long)b * b * b; - if (sum1 &gt; limit) - { - break; - } - - found_match = 0; - - for (int c = a + 1; c &lt;= max_base; c++) - { - if (found_match) - { - break; - } - for (int d = c + 1; d &lt;= max_base; d++) - { - sum2 = (long long)c * c * c + (long long)d * d * d; - if (sum2 &gt; sum1) - { - break; - } - if (sum1 == sum2) - { - count++; - printf(&quot;(%d.) %lld = %d^3 + %d^3 = %d^3 + %d^3\n&quot;, count, sum1, a, b, c, d); - - found_match = 1; - break; - } - } - } - } - } - - printf(&quot;-------------------------------\n&quot;); - printf(&quot;Search complete.&quot;); - - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc041.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc041.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc041_c', 'luc041.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc041_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc041.c"> - <pre><code class="language-c">/* Write a program to print 24 hours of day with suitable suffixes like -AM, PM, Noon and Midnight. */ -/* Author - Amit Dutta, Date - 23rd OCT, 2025 */ -/* Let Us C, Chap- 6, Page - 106, Qn No.: B(h) */ - -#include &lt;stdio.h&gt; -int main() -{ - int hour, temp; - printf(&quot;Time \tSuffix\n&quot;); - for (int hour = 0; hour &lt;= 23; hour++) - { - if (hour == 0) - printf(&quot;12:00\tAM (Midnight)\n&quot;); - else if (hour == 12) - printf(&quot;12:00\tPM (Noon)\n&quot;); - else if (hour &gt;= 1 &amp;&amp; hour &lt;= 11) - printf(&quot;%02d:00\tAM\n&quot;, hour); - else if (hour &gt;= 13 &amp;&amp; hour &lt;= 23) - printf(&quot;%02d:00\tPM\n&quot;, hour - 12); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc042.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc042.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc042_c', 'luc042.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc042_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc042.c"> - <pre><code class="language-c">/* Write a program to produce the following output : - 1 - 2 3 - 4 5 6 -7 8 9 10 -*/ - -/* Author - Amit Dutta, Date - 23rd OCT, 2025 */ -/* Let Us C, Chap- 6, Page - 106, Qn No.: B(i) */ - -#include &lt;stdio.h&gt; -int main() -{ - int starter = 1; - int tab = 3; - printf(&quot;The pattern : \n&quot;); - for (int i = 1; i &lt;= 4; i++) - { - int count = 0; - for (int k = 1; k &lt;= tab; k++) - { - printf(&quot; &quot;); - } - tab = tab - 1; - for (int j = starter; j &lt;= 10; j++) - { - if (count &gt;= i) - { - break; - } - printf(&quot;%d &quot;, j); - count++; - starter++; - } - printf(&quot;\n&quot;); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc043.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc043.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc043_c', 'luc043.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc043_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc043.c"> - <pre><code class="language-c">/* Write a program to find the grace marks for a student using switch. -The user should enter the class obtained by the student and the -number of subjects he has failed in. Use the following logic. - - If the student gets first class and he fails in more than 3 - subjects, he does not get any grace, Otherwise, he gets a grace - of 5 marks per subject. - - If the student gets second class and he fails in more than 2 - subjects, he does not get any grace. Otherwise, he gets a grace - of 4 marks per subject. - - If the student gets third class and he fails in more than 1 - subject, then he does not get any grace. Otherwise, he gets a - grace of 5 marks. -*/ -/* Author - Amit Dutta, Date - 28th OCT, 2025 */ -/* Let Us C, Chap- 7, Page - 125, Qn No.: C */ - -#include &lt;stdio.h&gt; - -int main() -{ - int studentClass, failedSubjectCount, graceMarks = 0; - printf(&quot;Class obtained by the student (Enter 1 for First Class, 2 for Second Class, 3 for Third Class): &quot;); - scanf(&quot;%d&quot;, &amp;studentClass); - printf(&quot;Failed Subject Count: &quot;); - scanf(&quot;%d&quot;, &amp;failedSubjectCount); - - if (failedSubjectCount &lt; 0) { - printf(&quot;\nFailed subject count cannot be negative.&quot;); - return 1; - } - - switch (studentClass) - { - case 1: - if (failedSubjectCount &lt;= 3) - { - graceMarks += 5 * failedSubjectCount; - } - break; - - case 2: - if (failedSubjectCount &lt;= 2) - { - graceMarks += 4 * failedSubjectCount; - } - break; - - case 3: - if (failedSubjectCount &lt;= 1) - { - graceMarks += 5 * failedSubjectCount; - } - break; - - default: - printf(&quot;\nWrong Choice.&quot;); - return 1; - } - - printf(&quot;\nStudent will get %d grace marks.&quot;, graceMarks); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc044.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc044.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc044_c', 'luc044.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc044_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc044.c"> - <pre><code class="language-c">/* Any year is entered through the keyboard. Write a function to -determine whether the year is aleap year or not. */ -/* Author - Amit Dutta, Date - 17th November, 2025 */ -/* Let Us C, Chap- 8, Page - 144, Qn No.: C(1) */ - -#include &lt;stdio.h&gt; - -int leapYear(int); - -int leapYear(int year) -{ - if ((year % 400 == 0) || ((year % 4 == 0) &amp;&amp; (year % 100 != 0))) - return 1; - else - return 0; -} - -int main() -{ - int year; - printf(&quot;Enter the year : &quot;); - scanf(&quot;%d&quot;, &amp;year); - if (leapYear(year)) - printf(&quot;\nYear %d is a Leap Year.&quot;, year); - else - printf(&quot;\nYear %d is not a Leap Year.&quot;, year); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc045.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc045.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc045_c', 'luc045.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc045_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc045.c"> - <pre><code class="language-c">/* A position integer is entered through the keyboard. Write a Function -to obtain the prime factors of this number. -For example, prime factors of 24 are 2, 2, 2 and 3, whereas prime -factors of 35 are 5 and 7 -*/ -/* Author - Amit Dutta, Date - 17th November, 2025 */ -/* Let Us C, Chap- 8, Page - 144, Qn No.: C(2) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -void findPrimeFactors(int n) -{ - int temp_n = n; - - if (temp_n == 1) - { - printf(&quot;Prime factors of %d are: None.\n&quot;, n); - return; - } - - printf(&quot;Prime factors of %d are:&quot;, n); - - while (temp_n % 2 == 0) - { - printf(&quot; %d&quot;, 2); - temp_n = temp_n / 2; - } - - for (int i = 3; i &lt;= (int)sqrt(temp_n); i = i + 2) - { - while (temp_n % i == 0) - { - printf(&quot; %d&quot;, i); - temp_n = temp_n / i; - } - } - - if (temp_n &gt; 2) - { - printf(&quot; %d&quot;, temp_n); - } - - printf(&quot;\n&quot;); -} - -int main() -{ - int n; - printf(&quot;Enter a positive integer to get the prime factors: &quot;); - if (scanf(&quot;%d&quot;, &amp;n) != 1) - { - printf(&quot;Error: Invalid input. Please enter an integer.\n&quot;); - return 1; - } - if (n &lt;= 0) - { - printf(&quot;Error: Please enter a POSITIVE integer.\n&quot;); - return 1; - } - findPrimeFactors(n); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc046.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc046.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc046_c', 'luc046.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc046_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc046.c"> - <pre><code class="language-c">/* Given three variables x, y, z, write a function to circularly shift their -values to right. In other words, if x = 5, y = 8, z = 10, after circular -shift y = 5, z = 8, x = 10. cal the function with variables a, b, c to -circularly shift values. -*/ -/* Author - Amit Dutta, Date - 24th November, 2025 */ -/* Let Us C, Chap- 9, Page - 163, Qn No.: C(a) */ - -#include &lt;stdio.h&gt; - -void circularShift(int *, int *, int *); - -int main() -{ - int x = 5, y = 8, z = 10; - - printf(&quot;--- Before Shift ---\n&quot;); - printf(&quot;x: %d, y: %d, z: %d&quot;, x, y, z); - - circularShift(&amp;x, &amp;y, &amp;z); - - printf(&quot;\n--- After Shift ---\n&quot;); - printf(&quot;x: %d, y: %d, z: %d&quot;, x, y, z); - - return 0; -} - -void circularShift(int *x, int *y, int *z) -{ - int temp = *z; - *z = *y; - *y = *x; - *x = temp; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc047.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc047.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc047_c', 'luc047.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc047_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc047.c"> - <pre><code class="language-c">/* Define a function that receives weight of a commodity in kilograms -and returns the equivalent weight in Grams, Tons and pounds. Call -this fuction from main() and print the results in main() -*/ -/* Author - Amit Dutta, Date - 24th November, 2025 */ -/* Let Us C, Chap- 9, Page - 163, Qn No.: C(b) */ - -#include &lt;stdio.h&gt; - -void convertWeight(double, double *, double *, double *); - -int main() -{ - double weightGram, weightPound, weightKG, weightTON; - printf(&quot;Enter the weight of the comodity in Kilogram(s): &quot;); - scanf(&quot;%lf&quot;, &amp;weightKG); - - convertWeight(weightKG, &amp;weightGram, &amp;weightPound, &amp;weightTON); - printf(&quot;\n%g Kilogram(s) = %.04f Gram(s)&quot; - &quot;\n%g Kilogram(s) = %.04f Pound(s)&quot; - &quot;\n%g Kilogram(s) = %.04f TON(s)&quot;, - weightKG, weightGram, weightKG, weightPound, weightKG, weightTON); - return 0; -} - -void convertWeight(double weightKG, double *weightGram, double *weightPound, double *weightTON) -{ - *weightGram = weightKG * 1000.0; - *weightPound = weightKG * 2.2046226218; - *weightTON = weightKG / 1000.0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">luc048.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc048.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-luc048_c', 'luc048.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-luc048_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc048.c"> - <pre><code class="language-c">/* Define a function to compute the distance between two points and -use it to develop another function that will compute the area of the -triangle whose vertices are A(x1, y1), B(x2, y2), and C(x3, y3). Use -these functions to develop a function which returns a value 1 if the -point (x, y) lines inside the triangle ABC, otherwise returns a value -0. Would you get any advantage if you develop these functions to -work on call by reference principle? -*/ -/* Author - Amit Dutta, Date - 25th November, 2025 */ -/* Let Us C, Chap- 9 (Pointers), Page - 163, Qn No.: C(c) */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -#include &lt;ctype.h&gt; -#include &lt;stdlib.h&gt; - -void distance(double, double, double, double, double *); -void area(double, double, double, double, double, double, double *); -int is_inside(double, double, double, double, double, double, double, double); - -int main() -{ - - // Variables - double x, y, x1, x2, y1, y2, x3, y3, result_Distance, result_Area; - char choice; - - /* ********** Requirement: 1 ********** */ - - // Calculate the length of the line segment between two points, P1(x1, y1) and P2(x2, y2). - // Function Used: distance() - - printf(&quot;--- Compute the distance between two points ---\n\n&quot;); - printf(&quot;Enter the co-ordinates of Point 1 (Ex.: 5,6): &quot;); - scanf(&quot;%lf,%lf&quot;, &amp;x1, &amp;y1); - printf(&quot;Enter the co-ordinates of Point 2 (Ex.: 3,4): &quot;); - scanf(&quot;%lf,%lf&quot;, &amp;x2, &amp;y2); - - distance(x1, y1, x2, y2, &amp;result_Distance); - printf(&quot;\nDistance between P1(%g, %g) and P2(%g, %g) = %g&quot;, - x1, y1, x2, y2, result_Distance); - - /* ********** Requirement: 2 ********** */ - - // Calculate the area of a triangle ABC using its three vertices A(x1, y1), B(x2, y2), and C(x3, y3). - // Fuction Used: distance(), area() - - printf(&quot;\n\n--- Compute the area of a triangle ABC ---\n\n&quot;); - printf(&quot;Enter the co-ordinates of Point A (Ex.: 5,6): &quot;); - scanf(&quot;%lf,%lf&quot;, &amp;x1, &amp;y1); - printf(&quot;Enter the co-ordinates of Point B (Ex.: 3,4): &quot;); - scanf(&quot;%lf,%lf&quot;, &amp;x2, &amp;y2); - printf(&quot;Enter the co-ordinates of Point C (Ex.: 6,7): &quot;); - scanf(&quot;%lf,%lf&quot;, &amp;x3, &amp;y3); - - area(x1, y1, x2, y2, x3, y3, &amp;result_Area); - printf(&quot;\nArea of the A(%g, %g), B(%g, %g), C(%g, %g) = %g&quot;, - x1, y1, x2, y2, x3, y3, result_Area); - - /* ********** Requirement: 3 ********** */ - - // Check if a test point P(x, y) lies strictly inside the triangle ABC. - // Function Used: distance(), area(), is_inside() - - printf(&quot;\n\n--- Check if a test point P(x, y) lies strictly inside the triangle ABC ---\n\n&quot;); - printf(&quot;Do you wish to use previous entered triangle?&quot; - &quot;\nIf Yes, type &#x27;Y&#x27;; If No, type &#x27;N&#x27;: &quot;); - scanf(&quot; %c&quot;, &amp;choice); - choice = toupper(choice); - switch (choice) - { - case &#x27;Y&#x27;: - break; - case &#x27;N&#x27;: - printf(&quot;Enter the co-ordinates of Point A (Ex.: 5,6): &quot;); - scanf(&quot;%lf,%lf&quot;, &amp;x1, &amp;y1); - printf(&quot;Enter the co-ordinates of Point B (Ex.: 3,4): &quot;); - scanf(&quot;%lf,%lf&quot;, &amp;x2, &amp;y2); - printf(&quot;Enter the co-ordinates of Point C (Ex.: 6,7): &quot;); - scanf(&quot;%lf,%lf&quot;, &amp;x3, &amp;y3); - break; - default: - printf(&quot;\nYou entered invalid choice.&quot;); - break; - } - printf(&quot;Enter the co-ordinates of Test Point (Ex.: 3,5): &quot;); - scanf(&quot;%lf,%lf&quot;, &amp;x, &amp;y); - - if (is_inside(x, y, x1, y1, x2, y2, x3, y3)) - printf(&quot;\nTest Point (%g, %g) is inside ABC.&quot;, x, y); - else - printf(&quot;\nTest Point (%g, %g) is not inside ABC.&quot;, x, y); - - /* ANSWER TO THE QUESTION: - Qn.: - Would you get any advantage if you develop these functions to - work on call by reference principle? - - Ans: - NO, there is no advantage, and moreover, that would be a disadvantage. - It introduces unnecessary dereferencing overhead for every operation, - Which is less efficient than reading the simple value copy supplied by Call by Value. - */ - - // End of Program - return 0; -} - -void distance(double x1, double y1, double x2, double y2, double *result_Distance) -{ - *result_Distance = sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)); -} - -void area(double x1, double y1, double x2, double y2, double x3, double y3, double *result_Area) -{ - double s, ab, bc, ac; - - distance(x1, y1, x2, y2, &amp;ab); - distance(x2, y2, x3, y3, &amp;bc); - distance(x1, y1, x3, y3, &amp;ac); - - s = (ab + bc + ac) / 2.0; - double area_sq = s * (s - ab) * (s - bc) * (s - ac); - - if (area_sq &lt; 0) - // Handle cases where area_sq is slightly negative due to floating-point errors - *result_Area = 0.0; - else - *result_Area = sqrt(area_sq); -} - -int is_inside(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3) -{ - double area_ABC, area_PAB, area_PBC, area_PAC; - - const double EPSILON = 0.000001; - - area(x1, y1, x2, y2, x3, y3, &amp;area_ABC); - area(x, y, x1, y1, x2, y2, &amp;area_PAB); - area(x, y, x2, y2, x3, y3, &amp;area_PBC); - area(x, y, x1, y1, x3, y3, &amp;area_PAC); - - double sum_of_sub_areas = area_PAB + area_PBC + area_PAC; - - if (fabs(area_ABC - sum_of_sub_areas) &lt; EPSILON) - return 1; - else - return 0; -} - -/* - *************** SAMPLE OUTPUT *************** - -PS G:\bsc\letusc&gt; ./*.exe ---- Compute the distance between two points --- - -Enter the co-ordinates of Point 1 (Ex.: 5,6): 1234.56,7890.12 -Enter the co-ordinates of Point 2 (Ex.: 3,4): 1234.56,7891.12 - -Distance between P1(1234.56, 7890.12) and P2(1234.56, 7891.12) = 1 - ---- Compute the area of a triangle ABC --- - -Enter the co-ordinates of Point A (Ex.: 5,6): 100.10,200.20 -Enter the co-ordinates of Point B (Ex.: 3,4): 105.10,200.20 -Enter the co-ordinates of Point C (Ex.: 6,7): 100.10,205.20 - -Area of the A(100.1, 200.2), B(105.1, 200.2), C(100.1, 205.2) = 12.5 - ---- Check if a test point P(x, y) lies strictly inside the triangle ABC --- - -Do you wish to use previous entered triangle? -If Yes, type &#x27;Y&#x27;; If No, type &#x27;N&#x27;: y -Enter the co-ordinates of Test Point (Ex.: 3,5): 101.10,201.20 - -Test Point (101.1, 201.2) is inside ABC. - -*/</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem001.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem001_c', 'lucproblem001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem001.c"> - <pre><code class="language-c">/* Consider a currency system in which there are notes of six denominations, -namely, Rs. 1, Rs. 2, rs. 5, Rs. 10, Rs. 50, Rs. 100. If a sum -of Rs. N is entered through the keyboard, Write a program to compute -the smallest number of notes that will combine to give Rs. N. */ -/* Author - Amit Dutta, Date - 29th SEP, 2025 */ -/* Let Us C, Chap - 2, Page - 22, Problem 2.3 */ - -#include &lt;stdio.h&gt; -int main() -{ - int n, nonotes, temp; - printf(&quot;Enter the amount : &quot;); - scanf(&quot;%d&quot;, &amp;n); - if (n &lt; 1) - { - printf(&quot;\nAmount should be a positive integer.&quot;); - return 1; - } - temp = n; - nonotes = n / 100; - n = n % 100; - nonotes = nonotes + (n / 50); - n = n % 50; - nonotes = nonotes + (n / 10); - n = n % 10; - nonotes = nonotes + (n / 5); - n = n % 5; - nonotes = nonotes + (n / 2); - n = n % 2; - nonotes = nonotes + n; - printf(&quot;\nthe smallest number of notes that will combine to give Rs. %d : %d&quot;, temp, nonotes); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem002.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem002_c', 'lucproblem002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem002.c"> - <pre><code class="language-c">/* A year is entered through the keyboard, write a program to -determine whether the year is leap or not. Use the logical operators -&amp;&amp; and || . */ -/* Author - Amit Dutta, Date - 02th OCT, 2025 */ -/* Let Us C, Chap - 4, Page - 64, Problem 4.1 */ - -#include &lt;stdio.h&gt; -int main() -{ - int year; - printf(&quot;Enter year : &quot;); - scanf(&quot;%d&quot;, &amp;year); - if (year % 4 == 0 &amp;&amp; year &amp; 100 != 0 || year % 400 == 0) - printf(&quot;\nYear %d is a leapyear.&quot;, year); - else - printf(&quot;\nYear %d is not a leapyear.&quot;, year); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem003.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem003_c', 'lucproblem003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem003.c"> - <pre><code class="language-c">/* If a character is entered through the keyboard, Write a program -to determine whether the character is a capital letter, a small case letter, -a digit or a speacial symbol. -The following table shows the range of ASCII values for various characters : - Characters ASCII Values - A - Z 65 - 90 - a - z 97 - 122 - 0 - 9 48 - 57 - special symbols 0 - 47, 58 - 64, 91 - 96, 123 - 127 -*/ -/* Author - Amit Dutta, Date - 02th OCT, 2025 */ -/* Let Us C, Chap - 4, Page - 65, Problem 4.2 */ - -#include &lt;stdio.h&gt; -int main() -{ - char inp; - printf(&quot;Enter one character : &quot;); - scanf(&quot; %c&quot;, &amp;inp); - if (inp &gt;= 64 &amp;&amp; inp &lt;= 90) - printf(&quot;\nInput &#x27;%c&#x27; is a CAPITAL LETTER.&quot;, inp); - if (inp &gt;= 97 &amp;&amp; inp &lt;= 122) - printf(&quot;\nInput &#x27;%c&#x27; is a SMALL CASE LETTER.&quot;, inp); - if (inp &gt;= 48 &amp;&amp; inp &lt;= 57) - printf(&quot;\nInput &#x27;%c&#x27; is a DIGIT.&quot;, inp); - if (inp &gt;= 0 &amp;&amp; inp &lt;= 47 || inp &gt;= 58 &amp;&amp; inp &lt;= 64 - || inp &gt;= 91 &amp;&amp; inp &lt;= 96 || inp &gt;= 123 &amp;&amp; inp &lt;= 127) - printf(&quot;\nInput &#x27;%c&#x27; is a SPECIAL SYMBOL.&quot;, inp); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem004.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem004_c', 'lucproblem004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem004.c"> - <pre><code class="language-c">/* If the lengths of three sides of a triangle are entered through the -keyboard, write a program to check whether the triangle is valid or not. -The triangle is valid if the sum of two sides is greater that the largest -of the three sides. */ -/* Author - Amit Dutta, Date - 02th OCT, 2025 */ -/* Let Us C, Chap - 4, Page - 66, Problem 4.3 */ - -#include &lt;stdio.h&gt; -int main() -{ - double side1, side2, side3; - printf(&quot;Enter the length of side1, side2 and side3 of the triangle : &quot;); - scanf(&quot;%lf %lf %lf&quot;, &amp;side1, &amp;side2, &amp;side3); - if (side1 &lt;= 0 || side2 &lt;= 0 || side3 &lt;= 0) - { - printf(&quot;\nTriangle sides must be positive.\n&quot;); - return 1; - } - if ((side1 + side2 &gt; side3) &amp;&amp; (side1 + side3 &gt; side2) &amp;&amp; (side2 + side3 &gt; side1)) - // Triangle Inequality Theorem - printf(&quot;\nThis triangle is valid.&quot;); - else - printf(&quot;\nThis triangle is not valid.&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem005.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem005_c', 'lucproblem005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem005.c"> - <pre><code class="language-c">/* Write a program to calculate overtime pay of 10 employees. Overtime is -paid at the rate of Rs. 120.00 per hour for every hour worked above 40 -hours. Assume that employees do not work for fractional part of an hour. */ -/* ONLY WHILE LOOP ALLOWED */ -/* Author - Amit Dutta, Date - 07th OCT, 2025 */ -/* Let Us C, Chap - 5, Page - 83, Problem 5.1 */ - -#include &lt;stdio.h&gt; -#include &lt;conio.h&gt; -int main() -{ - int working_hour, i = 1; - double pay; - while (i &lt;= 10) - { - printf(&quot;Enter the working hour for the employee no. %d : &quot;, i); - if (scanf(&quot;%d&quot;, &amp;working_hour) != 1) - { - printf(&quot;\n\tPlease enter a number as woking hour.\n\n&quot;); - while (getchar() != &#x27;\n&#x27;) - ; - // above line discard the input characters untill getchar() reaches the new line character. - /* if I do not discard the input, after &#x27;continue;&#x27; statement that input will be again taken - by scanf (In the line 17). It will be a infinite loop of error. */ - continue; - } - // checking overtime - if (working_hour &gt; 40) - { - pay = (working_hour - 40) * 120.00; - printf(&quot;\n\tOvertime working hours of Employee %d : %d&quot;, i, (working_hour - 40)); - printf(&quot;\n\tPay of the overtime for Employee %d : Rs. %.2f\n\n&quot;, i, pay); - } - else - printf(&quot;\n\tEmployee %d did not work any overtime.\n\n&quot;, i); - i++; // changing to next employee - } -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem006.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem006_c', 'lucproblem006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem006.c"> - <pre><code class="language-c">/* Write a program to find the factorial value of any number entered -through the keyboard. */ -/* Author - Amit Dutta, Date - 07th OCT, 2025 */ -/* Let Us C, Chap - 5, Page - 84, Problem 5.2 */ - -#include &lt;stdio.h&gt; -int main() -{ - int num, i = 1; - long long fact = 1; - printf(&quot;Enter the number : &quot;); - // checking if the input is valid or not - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nPlease enter a number.&quot;); - return 1; - } - // result for the negetive input - if (num &lt; 0) - { - printf(&quot;\nFactorial of %d : Undefined&quot;, num); - return 1; - } - // Hard codded result for input &#x27;0&#x27; (zero) - if (num == 0) - { - printf(&quot;\nFactorial of 0 : 1&quot;); - return 0; - } - // calculating result - while (i &lt;= num) { - fact = fact * i; - i++; - } - printf(&quot;\nFactorial of %d : %d&quot;, num, fact); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem007.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem007_c', 'lucproblem007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem007.c"> - <pre><code class="language-c">/* Two numbers are entered through the keyboard. Write a program to -find the value of one number raised to the power of another */ -/* Author - Amit Dutta, Date - 07th OCT, 2025 */ -/* Let Us C, Chap - 5, Page - 84, Problem 5.3 */ - -#include &lt;stdio.h&gt; -int main() -{ - double num, result; - int power, i = 1; - printf(&quot;Enter the numbers in &#x27;num^power&#x27; format : &quot;); - // checking if the input is valid or not - if (scanf(&quot;%lf^%d&quot;, &amp;num, &amp;power) != 2) - { - printf(&quot;\nPlease enter numbers.&quot;); - return 1; - } - // result for the negetive input - if (power &lt; 0) - { - printf(&quot;\nPlease use a positive number as power.&quot;); - return 1; - } - // Hard codded result for input &#x27;0&#x27; (zero) - if (power == 0) - { - printf(&quot;\n%g to the power of %d is : 1&quot;, num, power); - return 0; - } - result = num; - while (i &lt;= power - 1) - { - result = result * num; - i++; - } - printf(&quot;\n%g to the power of %d is : %g&quot;, num, power, result); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem008.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem008_c', 'lucproblem008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem008.c"> - <pre><code class="language-c">/* Write a problem to print all the prime numbers from 1 to 300. */ -/* Author - Amit Dutta, Date - 24th OCT, 2025 */ -/* Let Us C, Chap - 6, Page - 101, Problem 6.1 */ - -// Method: Trial Division (Optimized to check up to sqrt(N)) - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -#include &lt;stdbool.h&gt; - -#define LIMIT 300 - -int main() -{ - printf(&quot;Prime numbers from 1 to 300 : 2&quot;); // as 2 is the only even prime number - for (int i = 3; i &lt;= LIMIT; i += 2) // skipping all other even number - { - int n = (int)sqrt(i); - bool prime = true; - - for (int j = 3; j &lt;= n; j += 2) - // an odd number is only devisable by another odd number. - // so, skipping even number. - { - if (i % j == 0) - { - prime = false; - break; - } - } - if (prime) - { - printf(&quot; %d&quot;, i); - } - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem009.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem009_c', 'lucproblem009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem009.c"> - <pre><code class="language-c">/* Write a program to add first seven terms of the following series using a -for loop. - 1 / 1! + 2 / 2! + 3 / 3! + ... -*/ -/* Author - Amit Dutta, Date - 24th OCT, 2025 */ -/* Let Us C, Chap - 6, Page - 102, Problem 6.2 */ - -#include &lt;stdio.h&gt; -#define N 7 // update N here - -int main() -{ - double sum = 0; int fact = 1; - for (int i = 1; i &lt;= N; i++) - { - fact *= i; - sum += (double)i / fact; - } - printf(&quot;Sum of the series : %g&quot;, sum); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem010-complex.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem010-complex.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem010-complex_c', 'lucproblem010-complex.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem010-complex_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem010-complex.c"> - <pre><code class="language-c">/* Write a program to generate all combinations (permutations) of 1, 2 and 3 - from 1-digit numbers up to 4-digit numbers using a main loop to control - the number of digits (1 to 3333). -*/ -/* Author - Amit Dutta, Date - 24th OCT, 2025 */ -/* Let Us C, Chap - 6, Page - 103, Problem 6.3 */ - -#include &lt;stdio.h&gt; - -// --- RECURSIVE FUNCTION TO ACHIEVE DYNAMIC NESTING --- -// current_digit: The digit being placed in the current position (1, 2, or 3) -// target_length: The total length of the number we are building (e.g., 3 for 3-digit numbers) -// current_number: The integer value built so far -// current_length: How many digits have been placed so far -void generate_combinations(int target_length, int current_number, int current_length) -{ - - // Base Case 1: The number is complete. Print it and return. - if (current_length == target_length) - { - printf(&quot; %d&quot;, current_number); - return; - } - - // Recursive Step: Try placing the next digit (1, 2, or 3) - // The for loop now iterates through the *possible values* for the next digit. - for (int next_digit = 1; next_digit &lt;= 3; next_digit++) - { - - // Build the new number: old_number * 10 + next_digit - int new_number = current_number * 10 + next_digit; - - // Recurse: Try to place the next digit - generate_combinations(target_length, new_number, current_length + 1); - } -} - -int main() -{ - printf(&quot;Combination of 1, 2 and 3 (1-digit up to 4-digits):\n&quot;); - - /* This outer loop achieves the structure you were going for: - iterating through the required number of digits (1, 2, 3, 4). - */ - for (int noOfDigits = 1; noOfDigits &lt;= 4; noOfDigits++) - { - printf(&quot;\n\n--- %d-DIGIT NUMBERS (%d total) ---\n&quot;, noOfDigits, (1 &lt;&lt; noOfDigits) * 3 / 4 * 4 / 3 * 3 * 3 / 9 * 3 + (noOfDigits == 1 ? 0 : 9) + (noOfDigits == 2 ? 0 : 9) + (noOfDigits == 3 ? 0 : 81) + (noOfDigits == 4 ? 0 : 0) + (noOfDigits == 1 ? 3 : 0) + (noOfDigits == 2 ? 9 : 0) + (noOfDigits == 3 ? 27 : 0) + (noOfDigits == 4 ? 81 : 0)); // Prints the count 3, 9, 27, or 81 - - // Start the recursive generation for the current length - generate_combinations(noOfDigits, 0, 0); - } - - printf(&quot;\n\nTotal permutations generated: 120\n&quot;); - - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem010.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem010_c', 'lucproblem010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem010.c"> - <pre><code class="language-c">/* Write a program to generate all combination of 1, 2 and 3 using for loop. */ -/* Author - Amit Dutta, Date - 24th OCT, 2025 */ -/* Let Us C, Chap - 6, Page - 103, Problem 6.3 */ - -#include &lt;stdio.h&gt; - -int main() -{ - printf(&quot;Combination of 1, 2 and 3 :&quot;); - - // for 1 digit numbers - for (int i = 1; i &lt;= 3; i++) - { - printf(&quot; %d&quot;, i); - } - - // for 2 digit numbers - for (int i = 1; i &lt;= 3; i++) - { - for (int j = 1; j &lt;= 3; j++) - { - printf(&quot; %d%d&quot;, i, j); - } - } - - // for 3 digit numbers - for (int i = 1; i &lt;= 3; i++) - { - for (int j = 1; j &lt;= 3; j++) - { - for (int k = 1; k &lt;= 3; k++) - { - printf(&quot; %d%d%d&quot;, i, j, k); - } - } - } - - // for 4 digit numbers - for (int i = 1; i &lt;= 3; i++) - { - for (int j = 1; j &lt;= 3; j++) - { - for (int k = 1; k &lt;= 3; k++) - { - for (int l = 1; l &lt;= 3; l++) - { - printf(&quot; %d%d%d%d&quot;, i, j, k, l); - } - } - } - } - - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem011.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem011_c', 'lucproblem011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem011.c"> - <pre><code class="language-c">/* Write a menu driven program which has following options : - 1. Factorial of a number - 2. Prime or not - 3. Odd or even - 4. Exit -Once a menu item is selected the appropriate action should be taken -and once this action is finished, the menu should reappear. Unless -the user selects the &#x27;Exit&#x27; option the program should continue work. -*/ -/* Author - Amit Dutta, Date - 26th OCT, 2025 */ -/* Let Us C, Chap - 7, Page - 118, Problem 7.1 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -#include &lt;stdlib.h&gt; -#include &lt;stdbool.h&gt; - -// Function to clear the input buffer after scanf to prevent issues in the next input. -void clearInputBuffer() -{ - int c; - while ((c = getchar()) != &#x27;\n&#x27; &amp;&amp; c != EOF) - ; -} - -// Calculates the factorial of the input number. -void factorial(int num) -{ - // Factorial is not defined for negative numbers. - if (num &lt; 0) - { - printf(&quot;\nFactorial is not defined for negative numbers.&quot;); - return; - } - // Checks for input over 20 to prevent long long integer overflow (20! is max safe). - if (num &gt; 20) - { - printf(&quot;\nFactorial of %d is too large to calculate (max safe integer factorial is 20!).&quot;, num); - return; - } - long long fact = 1; - // Calculate factorial iteratively. - for (int i = 1; i &lt;= num; i++) - { - fact *= i; - } - printf(&quot;\nFactorial of %d = %lld&quot;, num, fact); - return; -} - -// Checks if the input number is a prime number. -void prime(int num) -{ - // Handle special cases: 1 and 2. - if (num == 1) - { - printf(&quot;\nInput 1 is NOT a PRIME NUMBER.&quot;); - return; - } - else if (num == 2) - { - printf(&quot;\nInput 2 is a PRIME NUMBER. (Fact : 2 is only even prime number)&quot;); - return; - } - // Exclude all other even numbers. - if (num % 2 == 0) - { - printf(&quot;\nInput %d is NOT a PRIME NUMBER.&quot;, num); - return; - } - // Optimization: Only check divisors up to the square root of num. - int endCheckDigit = sqrt(num); - bool isPrime = true; - // Check only odd divisors (i += 2) starting from 3. - for (int i = 3; i &lt;= endCheckDigit; i += 2) - { - if (num % i == 0) - { - printf(&quot;\nInput %d is NOT a PRIME NUMBER.&quot;, num); - isPrime = false; - break; - } - } - if (isPrime) - { - printf(&quot;\nInput %d is a PRIME NUMBER.&quot;, num); - return; - } -} - -// Checks if the input number is odd or even. -void oddoreven(int num) -{ - // A number is even if it is perfectly divisible by 2. - if (num % 2 == 0) - { - printf(&quot;\nInput %d is a EVEN NUMBER.&quot;, num); - return; - } - else - { - printf(&quot;\nInput %d is a ODD NUMBER.&quot;, num); - return; - } -} - -// Main function: displays the menu and controls program flow. -int main() -{ - int choice, num; - // Infinite loop ensures the menu reappears after every operation until &#x27;Exit&#x27; is chosen. - while (1) - { - // Display menu options. - printf(&quot;\n\n===== MENU =====&quot; - &quot;\n1. Factorial of a number&quot; - &quot;\n2. Prime or not&quot; - &quot;\n3. Odd or Even&quot; - &quot;\n4. Exit&quot;); - printf(&quot;\nEnter your choice : &quot;); - - // Input validation for menu choice. - if (scanf(&quot;%d&quot;, &amp;choice) != 1) - { - printf(&quot;\nPlease enter a number.&quot;); - clearInputBuffer(); - continue; - } - clearInputBuffer(); - - // Handle menu selection using switch-case. - switch (choice) - { - case 1: - printf(&quot;\n=== FACTORIAL OF A NUMBER ===&quot;); - printf(&quot;\nEnter the number : &quot;); - // Input validation for the number to be factored. - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nPlease enter a number.&quot;); - clearInputBuffer(); - continue; - } - clearInputBuffer(); - factorial(num); - break; - case 2: - printf(&quot;\n=== PRIME OR NOT ===&quot;); - printf(&quot;\nEnter the number : &quot;); - // Input validation for the number to be checked. - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nPlease enter a number.&quot;); - clearInputBuffer(); - continue; - } - clearInputBuffer(); - // Require a non-negative, non-zero number for prime check. - if (num &lt; 0) - { - printf(&quot;\nPlease enter a postive number.&quot;); - continue; - } - else if (num == 0) - { - printf(&quot;\nPlease enter a non-zero number.&quot;); - continue; - } - prime(num); - break; - case 3: - printf(&quot;\n=== ODD OR EVEN ===&quot;); - printf(&quot;\nEnter the number : &quot;); - // Input validation for the number to be checked. - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nPlease enter a number.&quot;); - clearInputBuffer(); - continue; - } - clearInputBuffer(); - oddoreven(num); - break; - case 4: - // Exit the program cleanly. - printf(&quot;\nExiting the program.\n\nSAYONARA...\n\n&quot;); - exit(0); - default: - // Handle invalid menu choice input. - printf(&quot;\nPlease enter a valid choice.&quot;); - break; - } - } -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem012.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem012.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem012_c', 'lucproblem012.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem012_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem012.c"> - <pre><code class="language-c">/* Write a Function power(a, b), to calculate the value of a raised to b */ -/* Author - Amit Dutta, Date - 17th November, 2025 */ -/* Let Us C, Chap - 8, Page - 141, Problem 8.2 */ - -#include &lt;stdio.h&gt; - -double power(double, int); - -double power(double a, int b) -{ - if (b == 0) - return 1; - double res = 1; - int i; - if (b &gt; 0) - for (i = 1; i &lt;= b; i++) - res *= a; - return res; -} - -int main() -{ - double a, result; - int b; - printf(&quot;Enter the value and the power (Format A^B) : &quot;); - scanf(&quot;%lf^%d&quot;, &amp;a, &amp;b); - result = power(a, b); - printf(&quot;Result of %g^%d = %g&quot;, a, b, result); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem013.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem013.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem013_c', 'lucproblem013.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem013_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem013.c"> - <pre><code class="language-c">/* Define a function to convert any given year into its Roman equivalent. -Use these roman equivalent for decimal numbers : 1 - I, 5 - V, 10 - X, -50 - L, 100 - C, 500 - D, 1000 - M */ -/* Author - Amit Dutta, Date - 17th November, 2025 */ -/* Let Us C, Chap - 8, Page - 141, Problem 8.3 */ - -#include &lt;stdio.h&gt; - -void romanise(int); - -void romanise(int year) -{ - int values[] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; - const char *romanChar[] = {&quot;M&quot;, &quot;CM&quot;, &quot;D&quot;, &quot;CD&quot;, &quot;C&quot;, &quot;XC&quot;, &quot;L&quot;, &quot;XL&quot;, &quot;X&quot;, &quot;IX&quot;, &quot;V&quot;, &quot;IV&quot;, &quot;I&quot;}; - // including the two-character subtractive pairs. - int i = 0; - - printf(&quot;Year %d = &quot;, year); - while (year &gt; 0) - { - if (year &gt;= values[i]) - { - printf(&quot;%s&quot;, romanChar[i]); - year -= values[i]; - } - else - i++; - } -} - -int main() -{ - int year; - printf(&quot;Enter the year : &quot;); - scanf(&quot;%d&quot;, &amp;year); - romanise(year); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem014-short.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem014-short.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem014-short_c', 'lucproblem014-short.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem014-short_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem014-short.c"> - <pre><code class="language-c">/* Write a function that receives integers and returns the sum, average -and standard deviation of these numbers. Call this function from main() -and print the result in main() */ -/* Author - Amit Dutta, Date - 23th November, 2025 */ -/* Let Us C, Chap - 9, Page 159, Problem 9.1 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -void stats(double *, double *, double *); - -int main() -{ - double sum, average, standardDeviation; - stats(&amp;sum, &amp;average, &amp;standardDeviation); - - printf(&quot;\n--- Stats ---&quot; - &quot;\nSum: %g&quot; - &quot;\nAverage: %g&quot; - &quot;\nStandard Deviation: %g&quot;, - sum, average, standardDeviation); - return 0; -} - -void stats(double *sum, double *average, double *standardDeviation) -{ - int n; - printf(&quot;How many numbers you want to give input: &quot;); - scanf(&quot;%d&quot;, &amp;n); - - double inputNumber[n]; - int i; - - printf(&quot;\n--- Enter Numbers ---\n&quot;); - for (i = 0; i &lt; n; i++) - { - printf(&quot;Enter number %d: &quot;, i + 1); - scanf(&quot;%lf&quot;, &amp;inputNumber[i]); - } - - double tempSum = 0; - for (i = 0; i &lt; n; i++) - tempSum += inputNumber[i]; - - double tempAverage = tempSum / n; - - double tempStandardDeviation = 0.0; - - if (n &gt; 1) - { - double tempSumation = 0; - for (i = 0; i &lt; n; i++) - tempSumation += pow((inputNumber[i] - tempAverage), 2.0); - - tempStandardDeviation = sqrt(tempSumation / (n - 1)); - } - - *sum = tempSum; - *average = tempAverage; - *standardDeviation = tempStandardDeviation; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem014.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem014.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem014_c', 'lucproblem014.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem014_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem014.c"> - <pre><code class="language-c">/* Write a function that receives integers and returns the sum, average -and standard deviation of these numbers. Call this function from main() -and print the result in main() */ -/* Author - Amit Dutta, Date - 23th November, 2025 */ -/* Let Us C, Chap - 9, Page 158, Problem 9.1 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -// Function prototype: Using pointers for &#x27;call by reference&#x27; to return 3 values. -void stats(double *, double *, double *); - -int main() -{ - double sum, average, standardDeviation; - // Passing addresses of variables to receive results from the function. - stats(&amp;sum, &amp;average, &amp;standardDeviation); - - printf(&quot;\n--- Stats ---&quot; - &quot;\nSum: %g&quot; - &quot;\nAverage: %g&quot; - &quot;\nStandard Deviation: %g&quot;, - sum, average, standardDeviation); - return 0; -} - -// Function to calculate statistics on user-provided numbers. -void stats(double *sum, double *average, double *standardDeviation) -{ - int n; - // Input Validation Loop for N - do - { - printf(&quot;How many numbers you want to give input: &quot;); - - if (scanf(&quot;%d&quot;, &amp;n) == 1) - { - break; - } - else - { - printf(&quot;\nPlease enter a valid number.\n&quot;); - // Clearing input buffer to handle invalid input - while (getchar() != &#x27;\n&#x27; &amp;&amp; !feof(stdin)) - ; - } - } while (1); - - // Variable-Length Array (VLA) to store the input numbers. - double inputNumber[n]; - int i = 0; - - printf(&quot;\n--- Enter Numbers ---\n&quot;); - - // Input Loop for numbers - while (i &lt; n) - { - printf(&quot;Enter number %d: &quot;, i + 1); - - if (scanf(&quot;%lf&quot;, &amp;inputNumber[i]) == 1) - { - // Clearing input buffer after successful read - while (getchar() != &#x27;\n&#x27;) - ; - i++; - } - else - { - printf(&quot;Invalid input. Only integers are allowed. Please try again.\n&quot;); - // Clearing input buffer to handle invalid input - while (getchar() != &#x27;\n&#x27; &amp;&amp; !feof(stdin)) - ; - } - } - - // 1. Sum Calculation - double tempSum = 0; - for (i = 0; i &lt; n; i++) - tempSum += inputNumber[i]; - - // 2. Average (Mean) calculation - double tempAverage = tempSum / n; - - // 3. Standard Deviation (Sample SD formula used) - double tempStandardDeviation = 0.0; - - // Preventing division by zero if n is 1. SD is 0 for a single number. - if (n &gt; 1) - { - double tempSumation = 0; - // calculating the sum of squared differences from the mean - for (i = 0; i &lt; n; i++) - tempSumation += pow((inputNumber[i] - tempAverage), 2.0); - - // Calculating sample standard deviation - tempStandardDeviation = sqrt(tempSumation / (n - 1)); - } - - // Assigning final values back to the variables in main(). - *sum = tempSum; - *average = tempAverage; - *standardDeviation = tempStandardDeviation; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem015.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem015.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem015_c', 'lucproblem015.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem015_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem015.c"> - <pre><code class="language-c">/* Write a program that defines a function that calculates power of one -number reaised to another and factorial value of a number in one cell. */ -/* Author - Amit Dutta, Date - 24th November, 2025 */ -/* Let Us C, Chap - 9, Page 159, Problem 9.2 */ - -#include &lt;stdio.h&gt; - -void bothPowerFactorial(double, int, int, double *, long long *); - -int main() -{ - double a, resultPower; - int b, factN; - long long resultFactorial; - printf(&quot;Enter a and b for calculating a raised to b: &quot;); - scanf(&quot;%lf %d&quot;, &amp;a, &amp;b); - printf(&quot;Enter number to calculate the factorial: &quot;); - scanf(&quot;%d&quot;, &amp;factN); - if (b &lt; 0 || factN &lt; 0) - { - printf(&quot;\nOnly non-negative integer is allowed as input of b and factorial.&quot;); - return 1; - } - bothPowerFactorial(a, b, factN, &amp;resultPower, &amp;resultFactorial); - printf(&quot;\n%g Raised to %d: %g&quot; - &quot;\nFactorial of %d: %lld&quot;, - a, b, resultPower, factN, resultFactorial); - return 0; -} - -void bothPowerFactorial(double a, int b, int n, double *resultPower, long long *resultFactorial) -{ - double tempResultPower = 1; - long long tempResultFactorial = 1; - int i; - - for (i = 1; i &lt;= b; i++) - tempResultPower *= a; - - for (i = 1; i &lt;= n; i++) - tempResultFactorial *= i; - - *resultPower = tempResultPower; - *resultFactorial = tempResultFactorial; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">lucproblem016.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem016.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-letusc-lucproblem016_c', 'lucproblem016.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-letusc-lucproblem016_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem016.c"> - <pre><code class="language-c">/* Figure 9.4 shows three memory locations and values stored in them. -Write a program to declare variables that implement the relationship -shown. How will you print the values and addresses shown in the figure? -On which machine the program should be executed to get such addresses? - -Figure 9.4: - value: 3.14, memory_address: 7fff9489c79c - value: 7fff9489c7a0, memory_address: 7fff4fd134b8 - value: 7fff9489c79c, memory_address: 7fff9489c7a0 -*/ -/* Author - Amit Dutta, Date - 24th November, 2025 */ -/* Let Us C, Chap - 9, Page 160, Problem 9.3 */ - -#include &lt;stdio.h&gt; - -int main() -{ - float a = 3.14; - float *c = &amp;a; - float **b = &amp;c; - - printf(&quot;Location 1 (Variable a):\n&quot;); - printf(&quot;Value: %g\n&quot;, a); - printf(&quot;Address: %p\n&quot;, (void *)&amp;a); - printf(&quot;------------------------------\n&quot;); - - printf(&quot;Location 3 (Variable c: float *):\n&quot;); - printf(&quot;Value (Address stored): %p\n&quot;, (void *)c); - printf(&quot;Address of c itself: %p\n&quot;, (void *)&amp;c); - printf(&quot;Value pointed to (*c): %g\n&quot;, *c); - printf(&quot;------------------------------\n&quot;); - - printf(&quot;Location 2 (Variable b: float **):\n&quot;); - printf(&quot;Value (Address stored): %p\n&quot;, (void *)b); - printf(&quot;Address of b itself: %p\n&quot;, (void *)&amp;b); - printf(&quot;Value pointed to (*b): %p\n&quot;, (void *)*b); - printf(&quot;Value pointed to (**b): %g\n&quot;, **b); - printf(&quot;------------------------------\n&quot;); - - return 0; -}</code></pre> - </div> - </li> - </ul> - </div> - </li> - - <li class="border rounded-lg overflow-hidden"> - <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('practice-c')"> - <div class="flex items-center justify-between"> - <div class="flex items-center"> - <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> - <span class="font-medium text-gray-800">practice-c</span> - <span class="ml-2 text-sm text-gray-500">(11 files)</span> - </div> - <div class="flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/tree/main/practice-c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <div class="chevron" id="chevron-practice-c"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> - </div> - </div> - </div> - <div class="folder-content hidden bg-white" id="folder-practice-c"> - <ul class="divide-y divide-gray-200"> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">pc001.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-practice-c-pc001_c', 'pc001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-practice-c-pc001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc001.c"> - <pre><code class="language-c">/* Pattern : - 1 - 1 2 - 1 2 3 - 1 2 3 4 - 1 2 3 4 5 -for n = 5 -*/ -/* Author - Amit Dutta, Date - 02nd October, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int i, j, num; - printf(&quot;Enter n : &quot;); - scanf(&quot;%d&quot;, &amp;num); - for (i = 1; i &lt;= num; i++) - { - for (j = 1; j &lt;= i; j++) - { - printf(&quot;%d\t&quot;, j); - } - printf(&quot;\n&quot;); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">pc002.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-practice-c-pc002_c', 'pc002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-practice-c-pc002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc002.c"> - <pre><code class="language-c">/* Pattern : - 1 2 3 4 5 - 6 7 8 9 - 10 11 12 - 13 14 - 15 -for n = 5 -*/ - -/* Author - Amit Dutta, Date - 02nd NOVEMBER, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int i, j, n, temp = 1; - printf(&quot;Enter n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for (i = n; i &gt;= 1; i--) - { - for (j = 1; j &lt;= i; j++) - { - printf(&quot;%d\t&quot;, temp); - temp++; - } - printf(&quot;\n&quot;); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">pc003.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-practice-c-pc003_c', 'pc003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-practice-c-pc003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc003.c"> - <pre><code class="language-c">/* Pattern : - 1 - 2 4 - 3 6 9 - 4 8 12 16 - 5 10 15 20 25 -for n = 5 -*/ - -#include &lt;stdio.h&gt; -int main() -{ - int i, j, n; - printf(&quot;Enter n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for (i = 1; i &lt;= n; i++) - { - for (j = 1; j &lt;= i; j++) - { - printf(&quot;%d\t&quot;, i * j); - } - printf(&quot;\n&quot;); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">pc004.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-practice-c-pc004_c', 'pc004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-practice-c-pc004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc004.c"> - <pre><code class="language-c">/* Pattern : - 5 4 3 2 1 - 4 3 2 1 - 3 2 1 - 2 1 - 1 -for n = 5 -*/ - -#include &lt;stdio.h&gt; -int main() -{ - int i, j, k, n; - printf(&quot;Enter n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for (i = n; i &gt;= 1; i--) - { - for (j = 1; j &lt;= i - 1; j++) - { - printf(&quot;\t&quot;); - } - for (k = i; k &gt;= 1; k--) - { - printf(&quot;%d\t&quot;, k); - } - printf(&quot;\n&quot;); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">pc005.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-practice-c-pc005_c', 'pc005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-practice-c-pc005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc005.c"> - <pre><code class="language-c">/* Pattern : - 1 - 1 2 - 3 5 8 - 13 21 34 55 - 89 144 233 377 610 -for n = 5 -*/ - -#include &lt;stdio.h&gt; -int main() -{ - int i, j, n; - long long temp1 = 0, temp2 = 1, temp3; - printf(&quot;Enter n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - printf(&quot;1\n&quot;); - for (i = 2; i &lt;= n; i++) - { - for (j = 1; j &lt;= i; j++) - { - temp3 = temp1 + temp2; - printf(&quot;%lld\t&quot;, temp3); - temp1 = temp2; - temp2 = temp3; - } - printf(&quot;\n&quot;); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">pc006.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-practice-c-pc006_c', 'pc006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-practice-c-pc006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc006.c"> - <pre><code class="language-c">/* Prime number check */ -/* Author - Amit Dutta, Date - 03rd NOVEMBER, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int main() -{ - int num, i, temp; - printf(&quot;Enter the number : &quot;); - if(scanf(&quot;%d&quot;, &amp;num) != 1) { - printf(&quot;Only postive number allowed.&quot;); - return 1; - } - if(num &lt;= 0) { - printf(&quot;\nOnly potive number are allowed.&quot;); - return 1; - } - if(num == 1) { - printf(&quot;\nInput 1 is not a prime number.&quot;); - return 0; - } - if(num == 2) { - printf(&quot;\nInput 2 is a prime number.&quot;); - return 0; - } - if(num % 2 == 0) { - printf(&quot;\nInput %d is not a prime number.&quot;, num); - return 0; - } - temp = (int)sqrt(num); - for (i = 3; i &lt;= temp; i += 2) - { - if (num % i == 0) - { - printf(&quot;\nInput %d is not a prime number.&quot;, num); - return 0; - } - } - printf(&quot;\nInput %d is a prime number.&quot;, num); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">pc007.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-practice-c-pc007_c', 'pc007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-practice-c-pc007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc007.c"> - <pre><code class="language-c">/* Armstrong number check only for three digit */ -/* Author - Amit Dutta, Date - 03rd NOVEMBER, 2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int num, temp1, armstrongCheck = 0; - printf(&quot;Enter a three digit number : &quot;); - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nOnly positive number allowed.&quot;); - return 1; - } - if (num &lt; 100 || num &gt; 999) - { - printf(&quot;\nOnly Three digit postive number allowed.&quot;); - return 1; - } - temp1 = num; - while (temp1 &gt; 0) - { - armstrongCheck += (temp1 % 10) * (temp1 % 10) * (temp1 % 10); - temp1 /= 10; - } - if (armstrongCheck == num) - printf(&quot;\nInput %d is a armstrong number.&quot;, num); - else - printf(&quot;\nInput %d is not a armstrong number.&quot;, num); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">pc008.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-practice-c-pc008_c', 'pc008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-practice-c-pc008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc008.c"> - <pre><code class="language-c">/* Factorial upto N */ -/* Author - Amit Dutta, Date - 03rd November, 2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int n, i; - long long fact = 1; - printf(&quot;Enter n : &quot;); - if (scanf(&quot;%d&quot;, &amp;n) != 1) - { - printf(&quot;\nOnly non-negative number allowed.&quot;); - return 1; - } - if (n &lt; 0) - { - printf(&quot;\nOnly non-negative number allowed.&quot;); - return 1; - } - if (n == 0) - { - printf(&quot;\nFactorial of 0 : 1&quot;); - return 0; - } - for (i = 1; i &lt;= n; i++) - fact *= i; - printf(&quot;\nFactorial of %d : %lld&quot;, n, fact); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">pc009.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-practice-c-pc009_c', 'pc009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-practice-c-pc009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc009.c"> - <pre><code class="language-c">/* Sum of digit */ -/* Author - Amit Dutta, Date - 04th November, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int num, sumOfDigit = 0, temp; - printf(&quot;Enter the number : &quot;); - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nOnly a number is allowed.&quot;); - return 1; - } - temp = num; - while (temp &gt; 0) - { - sumOfDigit += temp % 10; - temp /= 10; - } - printf(&quot;\nSum of the digit %d : %d&quot;, num, sumOfDigit); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">pc010.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-practice-c-pc010_c', 'pc010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-practice-c-pc010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc010.c"> - <pre><code class="language-c">/* Reverse a number */ -/* Author - Amit Dutta, Date - 04th November, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int num, temp, rev = 0; - printf(&quot;\nEnter the number : &quot;); - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nOnly a number is allowed.&quot;); - return 1; - } - temp = num; - while (temp &gt; 0) - { - rev = (rev * 10) + (temp % 10); - temp /= 10; - } - printf(&quot;\nReverse of the number %d : %d&quot;, num, rev); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">pc011.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-practice-c-pc011_c', 'pc011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-practice-c-pc011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc011.c"> - <pre><code class="language-c">/* Write a C program that takes two positive integers, L (Lower Bound) -and U (Upper Bound), as input from the user. The program must find and print -the count of all numbers between L and U (inclusive) that -are also a Palindrome Number. */ -/* Author - Amit Dutta, Date - 11th November, 2025 */ - -#include &lt;stdio.h&gt; -#define true 1 -#define false 0 - -int isPalindrome(int num) -{ - int temp = num, numRev = 0; - while (temp &gt; 0) - { - numRev = (numRev * 10) + (temp % 10); - temp /= 10; - } - if (num == numRev) - return true; - else - return false; -} - -int main() -{ - int uBound, lBound, num, palindromeCount = 0; - printf(&quot;Enter the Lower Bound and Upper Bound : &quot;); - if (scanf(&quot;%d %d&quot;, &amp;lBound, &amp;uBound) != 2) - { - printf(&quot;\nOnly Integer values are allowed.&quot;); - return 1; - } - if (lBound &lt; 0 || uBound &lt; 0 || lBound &gt; uBound) - { - printf(&quot;\nPlease enter appropriate inforamtion.&quot;); - return 1; - } - printf(&quot;Palindrome Numbers from %d to %d :&quot;, lBound, uBound); - for (num = lBound; num &lt;= uBound; num++) - { - if (isPalindrome(num)) - { - printf(&quot; %d&quot;, num); - palindromeCount++; - } - } - printf(&quot;\nTotal Palindrome number found inside the range (%d to %d) : %d&quot;, lBound, uBound, palindromeCount); - return 0; -}</code></pre> - </div> - </li> - </ul> - </div> - </li> - - <li class="border rounded-lg overflow-hidden"> - <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('tuition-c')"> - <div class="flex items-center justify-between"> - <div class="flex items-center"> - <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> - <span class="font-medium text-gray-800">tuition-c</span> - <span class="ml-2 text-sm text-gray-500">(121 files)</span> - </div> - <div class="flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/tree/main/tuition-c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <div class="chevron" id="chevron-tuition-c"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> - </div> - </div> - </div> - <div class="folder-content hidden bg-white" id="folder-tuition-c"> - <ul class="divide-y divide-gray-200"> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-001.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-001_c', 'APC-PRAC-001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-001.c"> - <pre><code class="language-c">/* WAP to calculate area and perimeter of a rectangle -by accepting length and breadth as input. */ -// Author - Amit Dutta, Date - 18th SEP, 2025 - -#include&lt;stdio.h&gt; -int main() { - double length, breadth, area, perimeter; - printf(&quot;Enter the length and breadth of the Rectangle : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;length, &amp;breadth); - area = length * breadth; - perimeter = 2 * (length + breadth); - printf(&quot;\nArea of the Rectangle : %g&quot; - &quot;\nPerimeter of the Rectangle : %g&quot;, area, perimeter); - return 0; - -} - -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-002.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-002_c', 'APC-PRAC-002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-002.c"> - <pre><code class="language-c">/* WAP to calculate area of a circle using math library -method. Take radius of the circle as input. */ -/* Author - Amit Dutta, Date - 18th SEP, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - double r, area; - printf(&quot;Enter the radius of the circle : &quot;); - scanf(&quot;%lf&quot;, &amp;r); - area = M_PI * pow(r, 2); - printf(&quot;\nArea of the circle : %g&quot;, area); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-003.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-003_c', 'APC-PRAC-003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-003.c"> - <pre><code class="language-c">/* WAP to accept diagonal of a square and calculate area, parimeter */ -/* Author - Amit Dutta, Date - 18th SEP, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - double dia, side, area, peri; - printf(&quot;Enter the diagonal of the square : &quot;); - scanf(&quot;%lf&quot;, &amp;dia); - side = dia / sqrt(2); - area = pow(side, 2); - peri = 4 * side; - printf(&quot;\nArea of the square : %g&quot; - &quot;\nPerimeter of the square : %g&quot;, - area, peri); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-004.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-004_c', 'APC-PRAC-004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-004.c"> - <pre><code class="language-c">/* WAP to calculate and display radius of a circle by taking the area as input. */ -/* Author - Amit Dutta, Date - 18th SEP, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - double r, area; - printf(&quot;Enter the area of the circle : &quot;); - scanf(&quot;%lf&quot;, &amp;area); - r = sqrt(area / M_PI); - printf(&quot;\nRadius of the circle : %g&quot;, r); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-005.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-005_c', 'APC-PRAC-005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-005.c"> - <pre><code class="language-c">/* WAP a program that accept number of days -as input and represent it as years, months and days. */ -/* Author - Amit Dutta, Date - 19th SEP, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int days, months, years, temp; - printf(&quot;Enter the No. of days : &quot;); - scanf(&quot;%d&quot;, &amp;days); - temp = days; - years = days / 365; - days = days % 365; - months = days / 30; - days = days % 30; - printf(&quot;%d Days = %d Years, %d Months, %d Days&quot;, temp, years, months, days); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-006.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-006_c', 'APC-PRAC-006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-006.c"> - <pre><code class="language-c">/* WAP that accept seconds as input and represent it an hours, minutes and seconds. */ -/* Author - Amit Dutta, Date - 19th SEP, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int sec, hours, minutes, temp; - printf(&quot;Enter the no of seconds : &quot;); - scanf(&quot;%d&quot;, &amp;sec); - temp = sec; - hours = sec / 3600; - sec = sec % 3600; - minutes = sec / 60; - sec = sec % 60; - printf(&quot;\n%d Seconds = %d Hours, %d Minutes, %d Seconds.&quot;, temp, hours, minutes, sec); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-007.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-007_c', 'APC-PRAC-007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-007.c"> - <pre><code class="language-c">/* WAP that accept basic salary of an employee and display gross salary, -net salary generated by below formula. - DA = 25% of the basic salary. - HRA = 12.5% of the basic salary. - PF = 10% of the basic salary. - gross salary = basic salary + da + hra - net salary = gross salary - pf -*/ -/* Author - Amit Dutta, Date - 19th SEP, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - double bs, gs, ns, da, hra, pf; - printf(&quot;Enter the basic salary of the employee : &quot;); - scanf(&quot;%lf&quot;, &amp;bs); - da = bs * 0.25; - hra = bs * 0.125; - pf = bs * 0.10; - gs = bs + da + hra; - ns = gs - pf; - printf(&quot;\nGross Salary : %g&quot; - &quot;\nNet Salary : %g&quot;, - gs, ns); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-008.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-008_c', 'APC-PRAC-008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-008.c"> - <pre><code class="language-c">/* WAP to multiply and divide a number by 4 without -using multiplication and division operator. */ -/* Author - Amit Dutta, Date - 19th SEP, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int num, multi, div; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - multi = num &lt;&lt; 2; - div = num &gt;&gt; 2; - printf(&quot;Multiplication : %d&quot; - &quot;\nDivision : %d&quot;, - multi, div); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-009.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-009_c', 'APC-PRAC-009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-009.c"> - <pre><code class="language-c">/* WAP to swap two integer variable without using Third variable. */ -/* Author - Amit Dutta, Date - 19th SEP, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int a = 4, b = 6; - printf(&quot;Before swap : A = %d and B = %d&quot;, a, b); - a = a ^ b; - b = a ^ b; - a = a ^ b; - printf(&quot;\nAfter swap : A = %d and B = %d&quot;, a, b); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-010.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-010_c', 'APC-PRAC-010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-010.c"> - <pre><code class="language-c">/* WAP to calculate and display the valve of the given expression : - (1/a^3) + (1/(b+2)^3) + (1/(c^4 + root(2))) - take a, b, c as input. -*/ -/* Author - Amit Dutta, Date - 19th SEP, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - double a, b, c, result; - printf(&quot;Enter the value for a, b and c : &quot;); - scanf(&quot;%lf %lf %lf&quot;, &amp;a, &amp;b, &amp;c); - result = (1 / pow(a, 3)) + (1 / pow((b + 2), 3)) + (1 / (pow(c, 4) + sqrt(2))); - printf(&quot;\nResult = %g&quot;, result); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-011.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-011_c', 'APC-PRAC-011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-011.c"> - <pre><code class="language-c">/* Write a program to input positive number and check whether the number is -perfect square or not. If the number is negetive then display appropriate message */ -/* Author - Amit Dutta, Date - 31st October, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int main() -{ - int num, temp; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - if (num &lt; 0) - { - printf(&quot;\nYou entered a negetive number.&quot;); - return 1; - } - temp = (int)sqrt(num); - if (temp * temp == num) - { - printf(&quot;\nInput %d is a perfect square number.&quot;, num); - return 0; - } - else - printf(&quot;\nInput %d is not a perfect square number.&quot;, num); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-012.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-012.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-012_c', 'APC-PRAC-012.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-012_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-012.c"> - <pre><code class="language-c">/* Write a program to input three integer and find out second largest */ -/* Author - Amit Dutta, Date - 31st October, 2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int a, b, c, secondLargest; - printf(&quot;Enter three number : &quot;); - scanf(&quot;%d %d %d&quot;, &amp;a, &amp;b, &amp;c); - if ((a &lt; b &amp;&amp; a &gt; c) || (a &gt; b &amp;&amp; a &lt; c)) - secondLargest = a; - if ((b &lt; a &amp;&amp; b &gt; c) || (b &gt; a &amp;&amp; b &lt; c)) - secondLargest = b; - if ((c &lt; b &amp;&amp; c &gt; a) || (c &gt; b &amp;&amp; c &lt; a)) - secondLargest = c; - printf(&quot;\nSecond Largest : %d&quot;, secondLargest); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-013.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-013.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-013_c', 'APC-PRAC-013.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-013_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-013.c"> - <pre><code class="language-c">/* Write a program to input sum(p), rate of interest(r), time(t) and type of interest -(&#x27;s&#x27; for simple interes, &#x27;c&#x27; for compound interest), then calculate and display the earned interest */ -/* Author - Amit Dutta, Date - 31st October, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -#include &lt;ctype.h&gt; - -int main() -{ - double p, t, r, si, ci; - char mode; - printf(&quot;Enter the Principle, Time (Year) and the Rate of Interest : &quot;); - scanf(&quot;%lf %lf %lf&quot;, &amp;p, &amp;t, &amp;r); - printf(&quot;Enter the mode of calculation (&#x27;s&#x27; for simple interest, &#x27;c&#x27; for compound interest) : &quot;); - scanf(&quot; %c&quot;, &amp;mode); - mode = tolower(mode); - switch (mode) - { - case &#x27;s&#x27;: - si = (p * t * r) / 100; - printf(&quot;\nSimple Interest : %g&quot;, si); - return 0; - case &#x27;c&#x27;: - ci = (p * pow(1 + (r / 100), t)) - p; - printf(&quot;\nCompound Interest : %g&quot;, ci); - return 0; - default: - printf(&quot;\nYou entered a wrong choice.&quot;); - return 1; - } -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-014.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-014.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-014_c', 'APC-PRAC-014.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-014_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-014.c"> - <pre><code class="language-c">/* Write a program to calculate and display the maturity amount taking -the sum and number of days as input. - No. of Days Rate of Interest - =========== ================ - &lt;= 180 5.57 % - 181 - 364 7.75 % - 365 - 500 9.25 % - &gt; 500 9.15 % -*/ -/* Author - Amit Dutta, Date - 31st October, 2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - double p, t, r, si; - int days; - printf(&quot;Enter the Principle, Time (Days) : &quot;); - scanf(&quot;%lf %d&quot;, &amp;p, &amp;days); - if (days &gt; 0 &amp;&amp; days &lt;= 180) - r = 5.57; - else if (days &gt; 180 &amp;&amp; days &lt;= 364) - r = 7.75; - else if (days &gt; 364 &amp;&amp; days &lt;= 500) - r = 9.25; - else if (days &gt; 500) - r = 9.15; - si = (p * t * r) / 100; - printf(&quot;\nMaturity Amount : %d&quot;, si + p); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-015.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-015.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-015_c', 'APC-PRAC-015.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-015_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-015.c"> - <pre><code class="language-c">/* Write a program to display all numbers between lb (lower bound) and up (upper bound) -which ends with digit 7 or divisible by 7. */ -/* Author - Amit Dutta, Date - 06th November, 2025 */ -// File Name - amit0611202501.c (LAB), APC-PRAC-015.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - int lb, ub, i; - printf(&quot;Enter the lb, ub : &quot;); - scanf(&quot;%d %d&quot;, &amp;lb, &amp;ub); - printf(&quot;\nEnds with 7 :&quot;); - for (i = lb; i &lt;= ub; i++) - { - if (i % 10 == 7) - { - printf(&quot; %d&quot;, i); - } - } - printf(&quot;\nDivisible by 7 :&quot;); - for (i = lb; i &lt;= ub; i++) - { - if (i % 7 == 0) - { - printf(&quot; %d&quot;, i); - } - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-016.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-016.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-016_c', 'APC-PRAC-016.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-016_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-016.c"> - <pre><code class="language-c">/* Write a program to check palindrome number. */ -/* Author - Amit Dutta, Date - 06th November, 2025 */ -// File Name - amit0611202502.c (LAB), APC-PRAC-016.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - int num, temp, rev = 0; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - temp = num; - while (temp &gt; 0) - { - rev = (rev * 10) + (temp % 10); - temp /= 10; - } - if (rev == num) - printf(&quot;\nInput %d is a palindrome number.&quot;, num); - else - printf(&quot;\nInput %d is not a palindrome number.&quot;, num); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-017.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-017.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-017_c', 'APC-PRAC-017.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-017_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-017.c"> - <pre><code class="language-c">/* Write a program to check perfect number. */ -/* Author - Amit Dutta, Date - 06th November, 2025 */ -// File Name - amit0611202503.c (LAB), APC-PRAC-017.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - int num, i, divisibleSum = 0; - printf(&quot;Enter a number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - for (i = 1; i &lt;= num / 2; i++) - { - if (num % i == 0) - { - divisibleSum += i; - } - } - if (divisibleSum == num) - printf(&quot;\nInput %d ia a Perfect Number.&quot;, num); - else - printf(&quot;\nInput %d is NOT a Perfect Number.&quot;, num); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-018.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-018.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-018_c', 'APC-PRAC-018.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-018_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-018.c"> - <pre><code class="language-c">/* Write a program to check Automorphic Number. */ -/* Author - Amit Dutta, Date - 06th November, 2025 */ -// File Name - amit0611202504.c (LAB), APC-PRAC-018.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int main() -{ - int num, square, count = 0, temp, modNum; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - square = (int)pow(num, 2); - temp = num; - while (temp &gt; 0) - { - temp /= 10; - count++; - } - modNum = (int)pow(10, count); - temp = square % modNum; - if (num == temp) - printf(&quot;\nInput %d is a Automorphic Number.&quot;, num); - else - printf(&quot;\nInput %d is a Automorphic Number.&quot;, num); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-019.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-019.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-019_c', 'APC-PRAC-019.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-019_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-019.c"> - <pre><code class="language-c">/* Write a program to find hcf of two numbers */ -/* Author - Amit Dutta, Date - 07th November, 2025 */ -// File Name - amit0711202501.c (LAB), APC-PRAC-019.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - int a, b, temp, temp_a, temp_b; - printf(&quot;Enter the a and b : &quot;); - scanf(&quot;%d %d&quot;, &amp;a, &amp;b); - temp_a = a, temp_b = b; - while (b &gt; 0) - { - temp = a; - a = b; - b = temp % b; - } - printf(&quot;\nHCF of %d and %d is : %d\n&quot;, temp_a, temp_b, a); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-020.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-020.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-020_c', 'APC-PRAC-020.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-020_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-020.c"> - <pre><code class="language-c">/* Write a program to check if two number is co-prime or not */ -/* Author - Amit Dutta, Date - 07th November, 2025 */ -// File Name - amit0711202502.c (LAB), APC-PRAC-020.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - int a, b, temp, temp_a, temp_b; - printf(&quot;Enter the a and b : &quot;); - scanf(&quot;%d %d&quot;, &amp;a, &amp;b); - temp_a = a, temp_b = b; - while (b &gt; 0) - { - temp = a; - a = b; - b = temp % b; - } - if (a == 1) - printf(&quot;\n%d and %d is co-prime\n&quot;, temp_a, temp_b); - else - printf(&quot;\n%d and %d is NOT co-prime\n&quot;, temp_a, temp_b); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-021.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-021.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-021_c', 'APC-PRAC-021.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-021_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-021.c"> - <pre><code class="language-c">/* Write a program to check special number (sum of digit + product of digit = original number) */ -/* Author - Amit Dutta, Date - 07th November, 2025 */ -// File Name - amit0711202503.c (LAB), APC-PRAC-021.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - int num, temp, sumOfDigit = 0, productOfDigit = 1; - printf(&quot;Enter the number to check if it is a special number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - temp = num; - while (temp &gt; 0) - { - sumOfDigit += temp % 10; - productOfDigit *= temp % 10; - temp /= 10; - } - temp = sumOfDigit + productOfDigit; - if (num == temp) - printf(&quot;\nInput %d is a special number.&quot;, num); - else - printf(&quot;\nInput %d is not a special number.&quot;, num); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-022.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-022.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-022_c', 'APC-PRAC-022.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-022_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-022.c"> - <pre><code class="language-c">/* Write a program to accept a number and check whether the number is twisted prime or not */ -/* Author - Amit Dutta, Date - 07th November, 2025 */ -// File Name - amit0711202504.c (LAB), APC-PRAC-022.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -#include &lt;stdbool.h&gt; - -bool checkPrime(int num) -{ - if (num &lt; 2) - return false; - if (num == 2) - return true; - if (num % 2 == 0) - return false; - int limit = (int)sqrt(num); - for (int i = 3; i &lt;= limit; i += 2) - if (num % i == 0) - return false; - return true; -} - -int reverseNumber(int num) -{ - int reverse = 0; - while (num &gt; 0) - { - reverse = (reverse * 10) + (num % 10); - num /= 10; - } - return reverse; -} - -int main() -{ - int num; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - if (!checkPrime(num)) - { - printf(&quot;\nInput %d is not a prime number.&quot;, num); - return 0; - } - if (checkPrime(reverseNumber(num))) - printf(&quot;\nInput %d is a twisted prime number.&quot;, num); - else - printf(&quot;\nInput %d is not a twisted prime number.&quot;, num); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-023.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-023.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-023_c', 'APC-PRAC-023.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-023_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-023.c"> - <pre><code class="language-c">/* Pattern : - (a) 1, -3, 5, -7, 9, -11, ... upto n times - (b) 0, 3, 8, 15, ... upto n times -*/ -/* Author - Amit Dutta, Date - 07th November, 2025 */ -// File Name - amit0711202505.c (LAB), APC-PRAC-023.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; -#include &lt;stdbool.h&gt; - -int main() -{ - int n, i, temp = 1; - bool isNegative = true; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - printf(&quot;\nPattern A :&quot;); - for (i = 1; i &lt;= n; i++) - { - if (!isNegative) - { - printf(&quot; %d&quot;, temp * -1); - isNegative = true; - } - else - { - printf(&quot; %d&quot;, temp); - isNegative = false; - } - temp += 2; - } - printf(&quot;\nPattern B :&quot;); - for (i = 1; i &lt;= n; i++) - { - temp = (i * i) - 1; - printf(&quot; %d&quot;, temp); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-024.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-024.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-024_c', 'APC-PRAC-024.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-024_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-024.c"> - <pre><code class="language-c">/* -Pattern: - 1 - 2 1 - 3 2 1 - 4 3 2 1 - 5 4 3 2 1 -*/ -/* Author = Amit Dutta, Date - 13th November, 2025 */ -// File Name - amit1311202501.c (LAB), APC-PRAC-024.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include&lt;stdio.h&gt; -int main() { - int n, i, j; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for(i = 1; i &lt;= n; i++) { - for(j = i; j &gt;= 1; j--) { - printf(&quot;%d &quot;, j); - } - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-025.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-025.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-025_c', 'APC-PRAC-025.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-025_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-025.c"> - <pre><code class="language-c">/* -Pattern: - 5 4 3 2 1 - 5 4 3 2 - 5 4 3 - 5 4 - 5 -*/ -/* Author = Amit Dutta, Date - 13th November, 2025 */ -// File Name - amit1311202502.c (LAB), APC-PRAC-025.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include&lt;stdio.h&gt; -int main() { - int n, i, j; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for(i = 1; i &lt;= n; i++) { - for(j = n; j &gt;= i; j--) { - printf(&quot;%d &quot;, j); - } - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-026.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-026.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-026_c', 'APC-PRAC-026.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-026_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-026.c"> - <pre><code class="language-c">/* -Pattern: - 5 - 5 4 - 5 4 3 - 5 4 3 2 - 5 4 3 2 1 -*/ -/* Author = Amit Dutta, Date - 13th November, 2025 */ -// File Name - amit1311202503.c (LAB), APC-PRAC-026.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include&lt;stdio.h&gt; -int main() { - int n, i, j; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for(i = n; i &gt;= 1; i--) { - for(j = n; j &gt;= i; j--) { - printf(&quot;%d &quot;, j); - } - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-027.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-027.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-027_c', 'APC-PRAC-027.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-027_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-027.c"> - <pre><code class="language-c">/* -Pattern: - 1 2 3 4 5 - 2 3 4 5 - 3 4 5 - 4 5 - 5 -*/ -/* Author = Amit Dutta, Date - 13th November, 2025 */ -// File Name - amit1311202504.c (LAB), APC-PRAC-027.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include&lt;stdio.h&gt; -int main() { - int n, i, j; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for(i = 1; i &lt;= n; i++) { - for(j = i; j &lt;= n; j++) { - printf(&quot;%d &quot;, j); - } - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-028.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-028.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-028_c', 'APC-PRAC-028.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-028_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-028.c"> - <pre><code class="language-c">/* -Pattern: - 1 - 2 3 - 4 5 6 - 7 8 9 10 - 11 12 13 14 15 -*/ -/* Author = Amit Dutta, Date - 13th November, 2025 */ -// File Name - amit1311202505.c (LAB), APC-PRAC-028.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include&lt;stdio.h&gt; -int main() { - int n, i, j, temp = 1; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for(i = 1; i &lt;= n; i++) { - for(j = 1; j &lt;= i; j++) { - printf(&quot;%d\t&quot;, temp); - temp++; - } - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-029.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-029.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-029_c', 'APC-PRAC-029.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-029_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-029.c"> - <pre><code class="language-c">/* -Pattern: - 1 - 1 0 - 1 0 1 - 1 0 1 0 - 1 0 1 0 1 -*/ -/* Author = Amit Dutta, Date - 13th November, 2025 */ -// File Name - amit1311202506.c (LAB), APC-PRAC-029.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include&lt;stdio.h&gt; -int main() { - int n, i, j; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for(i = 1; i &lt;= n; i++) { - for(j = 1; j &lt;= i; j++) { - if(j % 2 == 0) printf(&quot;0 &quot;); - else printf(&quot;1 &quot;); - } - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-030.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-030.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-030_c', 'APC-PRAC-030.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-030_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-030.c"> - <pre><code class="language-c">/* -Pattern: - # - @ @ - # # # - @ @ @ @ - # # # # # -*/ -/* Author = Amit Dutta, Date - 13th November, 2025 */ -// File Name - amit1311202507.c (LAB), APC-PRAC-030.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include&lt;stdio.h&gt; -int main() { - int n, i, j; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for(i = 1; i &lt;= n; i++) { - for(j = 1; j &lt;= i; j++) { - if(i % 2 == 0) printf(&quot;@ &quot;); - else printf(&quot;# &quot;); - } - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-031.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-031.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-031_c', 'APC-PRAC-031.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-031_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-031.c"> - <pre><code class="language-c">/* -Pattern: - 1 2 3 4 5 - 6 7 8 9 - 10 11 12 - 13 14 - 15 -*/ -/* Author = Amit Dutta, Date - 13th November, 2025 */ -// File Name - amit1311202508.c (LAB), APC-PRAC-031.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include&lt;stdio.h&gt; -int main() { - int n, i, j, temp = 1; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for(i = n; i &gt;= 1; i--) { - for(j = 1; j &lt;= i; j++) { - printf(&quot;%d\t&quot;, temp); - temp++; - } - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-032.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-032.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-032_c', 'APC-PRAC-032.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-032_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-032.c"> - <pre><code class="language-c">/* -Pattern: - A - B B - C C C - D D D D - E E E E E -*/ -/* Author = Amit Dutta, Date - 13th November, 2025 */ -// File Name - amit1311202509.c (LAB), APC-PRAC-032.c (Local) - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include&lt;stdio.h&gt; -int main() { - int n, i, j; char temp = &#x27;A&#x27;; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for(i = 1; i &lt;= n; i++) { - for(j = 1; j &lt;= i; j++) { - printf(&quot;%c\t&quot;, temp); - } - temp++; - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-033.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-033.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-033_c', 'APC-PRAC-033.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-033_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-033.c"> - <pre><code class="language-c">/* Print the factorial of the digits off a number */ -/* Auhtor: Amit Dutta, Date: 20-11-2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int factorial(int); - -int factorial(int n) -{ - int i, fact = 1; - for (i = 1; i &lt;= n; i++) - fact *= i; - return fact; -} - -int main() -{ - int n, temp; - printf(&quot;Enter the number: &quot;); - scanf(&quot;%d&quot;, &amp;n); - if (n &lt; 0) - { - printf(&quot;Only non-negetive number is allowed.&quot;); - return 1; - } - temp = n; - while (temp &gt; 0) - { - printf(&quot;\nFactorial of %d: %d&quot;, temp % 10, factorial(temp % 10)); - temp /= 10; - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-034.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-034.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-034_c', 'APC-PRAC-034.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-034_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-034.c"> - <pre><code class="language-c">/* Take a Range as input from user and print the prime number between it. */ -/* Auhtor: Amit Dutta, Date: 20-11-2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int isPrime(int); - -int isPrime(int n) -{ - if (n &lt;= 1) - return 0; - if (n == 2) - return 1; - if (n % 2 == 0) - return 0; - int temp = (int)sqrt(n), i; - for (i = 3; i &lt;= temp; i += 2) - if (n % i == 0) - return 0; - return 1; -} - -int main() -{ - int lb, ub, i; - printf(&quot;Enter the lower bound and the upper bound: &quot;); - scanf(&quot;%d %d&quot;, &amp;lb, &amp;ub); - printf(&quot;\nPrime numbers between %d and %d: &quot;, lb, ub); - for (i = lb; i &lt;= ub; i++) - if (isPrime(i)) - printf(&quot;%d &quot;, i); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-035.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-035.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-035_c', 'APC-PRAC-035.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-035_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-035.c"> - <pre><code class="language-c">/* Print all the 3 and 4 digit palindrome number. */ -/* Auhtor: Amit Dutta, Date: 20-11-2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int palindromeCheck(int); - -int palindromeCheck(int n) -{ - int temp = n, rev = 0; - while (temp &gt; 0) - { - rev = (rev * 10) + (temp % 10); - temp /= 10; - } - if (rev == n) - return 1; - else - return 0; -} - -int main() -{ - int i; - printf(&quot;Palindrome number of 3 and 4 digits: &quot;); - for (i = 100; i &lt;= 9999; i++) - if (palindromeCheck(i)) - printf(&quot;%d &quot;, i); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-036.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-036.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-036_c', 'APC-PRAC-036.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-036_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-036.c"> - <pre><code class="language-c">/* Check krishnamurty number. */ -/* Auhtor: Amit Dutta, Date: 20-11-2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int factorial(int); -int checkKrishnamurty(int); - -int factorial(int n) -{ - int i, fact = 1; - for (i = 1; i &lt;= n; i++) - fact *= i; - return fact; -} - -int checkKrishnamurty(int n) -{ - int temp1 = n, temp2 = 0; - while (temp1 &gt; 0) - { - temp2 += factorial(temp1 % 10); - temp1 /= 10; - } - if (temp2 == n) - return 1; - else - return 0; -} - -int main() -{ - int n; - printf(&quot;Enter the number: &quot;); - scanf(&quot;%d&quot;, &amp;n); - if (checkKrishnamurty(n)) - printf(&quot;\nInput %d is a Krishnamurty number.&quot;, n); - else - printf(&quot;\ninput %d is not a Krishnamurty number.&quot;, n); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-037.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-037.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-037_c', 'APC-PRAC-037.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-037_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-037.c"> - <pre><code class="language-c">/* Show all the armstrong number between a range. */ -/* Author: Amit Dutta, Date: 21-11-2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -#define lowerBound 100 -#define upperBound 999 - -int isArmstrongNumber(int); - -int isArmstrongNumber(int n) -{ - int temp = n, sum = 0, count = 0; - while (temp &gt; 0) - { - count++; - temp /= 10; - } - temp = n; - while (temp &gt; 0) - { - sum += (int)pow(temp % 10, count); - temp /= 10; - } - return sum == n; -} - -int main() -{ - int n, i, count = 0; - printf(&quot;Armstrong number between %d and %d are: &quot;, lowerBound, upperBound); - for (i = lowerBound; i &lt;= upperBound; i++) - if (isArmstrongNumber(i)) - { - printf(&quot;%d &quot;, i); - count++; - } - printf(&quot;\n\nCount: %d\n&quot;, count); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-038.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-038.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-038_c', 'APC-PRAC-038.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-038_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-038.c"> - <pre><code class="language-c">/* -Print all combinations of two two-digit numbers such that the sum of digits of both numbers is equal. -Example: 23 and 41 → (2+3) = 5, (4+1) = 5. -*/ -/* Author: Amit Dutta, Date: 21-11-2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - printf(&quot;Combinations of two two-digit numbers such that the sum of digits of both numbers is equal: &quot;); - int i, j, sum1, sum2, count = 0; - for (i = 10; i &lt;= 99; i++) - { - sum1 = (i % 10) + (i / 10); - for (j = i + 1; j &lt;= 99; j++) - { - sum2 = (j % 10) + (j / 10); - if (sum1 == sum2) - { - printf(&quot;(%d, %d) &quot;, i, j); - count++; - } - } - } - printf(&quot;\nCount: %d\n&quot;, count); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-039.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-039.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-039_c', 'APC-PRAC-039.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-039_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-039.c"> - <pre><code class="language-c">/* -Write a C program to print all unique combinations of three numbers (a, b, c) such that: -1 ≤ a, b, c ≤ 30 and a² + b² = c² (Pythagorean triplets) -*/ -/* Author: Amit Dutta, Date: 21-11-2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - printf(&quot;a² + b² = c² : &quot;); - int i, j, k, sq1, sq2, count = 0; - for (i = 1; i &lt;= 30; i++) - { - sq1 = i * i; - for (j = i + 1; j &lt;= 30; j++) - { - sq2 = j * j; - for (k = j + 1; k &lt;= 30; k++) - { - if (sq1 + sq2 == k * k) - { - printf(&quot;(%d, %d, %d) &quot;, i, j, k); - count++; - } - } - } - } - printf(&quot;\n\nCount: %d\n&quot;, count); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-040.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-040.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-040_c', 'APC-PRAC-040.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-040_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-040.c"> - <pre><code class="language-c">/* -Write a C program to count how many numbers between 100 and 999 have all distinct digits (e.g., 123, 709, 981). -*/ -/* Author: Amit Dutta, Date: 21-11-2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - int i, count = 0, n1, n2, n3; - printf(&quot;Distinct numbers between 100 and 999: &quot;); - for (i = 100; i &lt;= 999; i++) - { - n1 = i / 100; - n2 = (i % 100) / 10; - n3 = i % 10; - if (n1 != n2 &amp;&amp; n2 != n3 &amp;&amp; n1 != n3) - { - printf(&quot;%d &quot;, i); - count++; - } - } - printf(&quot;\nCount: %d\n&quot;, count); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-PRAC-041.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-041.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-PRAC-041_c', 'APC-PRAC-041.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-PRAC-041_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-041.c"> - <pre><code class="language-c">/* -Write a C program to find and print all twin prime pairs between 1 and n using nested loops. -(Twin primes are prime numbers having a difference of 2, like 11 and 13) -*/ -/* Author: Amit Dutta, Date: 21-11-2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int isPrime(int n) -{ - if (n &lt; 2) - return 0; - if (n == 2) - return 1; - if (n % 2 == 0) - return 0; - int i, temp = (int)sqrt(n); - for (i = 3; i &lt;= temp; i += 2) - if (n % i == 0) - return 0; - return 1; -} - -int main() -{ - int n, i, count = 0; - printf(&quot;enter the n: &quot;); - scanf(&quot;%d&quot;, &amp;n); - printf(&quot;\nAll the twin numbers: &quot;); - for (i = 1; i &lt;= n - 2; i++) - { - if (isPrime(i)) - { - if (isPrime(i + 2)) - { - printf(&quot;(%d, %d) &quot;, i, i + 2); - count++; - } - } - } - printf(&quot;\nCount; %d&quot;, count); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-001.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-001_c', 'APC-S-001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-001.c"> - <pre><code class="language-c">#include&lt;stdio.h&gt; -int main() { - int a = 9, b = 4, c; - c = a + b; - printf(&quot;A + B = %d\n&quot;, c); - c = a / b; - printf(&quot;A / B = %d\n&quot;, c); - c = a % b; - printf(&quot;A %% B = %d\n&quot;, c); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-002.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-002_c', 'APC-S-002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-002.c"> - <pre><code class="language-c">#include&lt;stdio.h&gt; -int main() { - int a = 5, b = 5, c = 10; - printf(&quot;a = b = %d\n&quot;, a == b); - printf(&quot;a &gt; b = %d\n&quot;, a &gt; b); - printf(&quot;a &lt; b = %d\n&quot;, a &lt; b); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-003.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-003_c', 'APC-S-003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-003.c"> - <pre><code class="language-c">#include &lt;stdio.h&gt; -int main() { - int a = 5, b = 5, c = 10, result; - - result = (a == b) &amp;&amp; (c &gt; b); - printf(&quot;Result is %d\n&quot;, result); - - result = (a == b) &amp;&amp; (c &lt; b); - printf(&quot;Result is %d\n&quot;, result); - - result = (a != b) || (c &lt; b); - printf(&quot;Result is %d\n&quot;, result); - - result = (a != b) || (c &lt; b); - printf(&quot;Result is %d\n&quot;, result); - - result = !(a != b); - printf(&quot;Result is %d\n&quot;, result); - - result = !(a == b); - printf(&quot;Result is %d\n&quot;, result); - - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-004.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-004_c', 'APC-S-004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-004.c"> - <pre><code class="language-c">/* Program to print first 10 natural numbers using while loop. */ -/* Author - Amit Dutta, Date - 29th October, 2025 */ - -/* - * Compiler Note: This source code is specifically designed for compilation - * and execution within the ** Turbo C ** environment. - * - * Testing Disclaimer: Due to a lack of access to the required Turbo C - * compiler software, this code has not been formally compiled or tested. - */ - -#include &lt;stdio.h&gt; -#include &lt;conio.h&gt; - -void main() -{ - clrscr(); - int x; - x = 1; - while (x &lt;= 10) - { - printf(&quot;%d &quot;, x); - x++; - } - getch(); -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-005.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-005_c', 'APC-S-005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-005.c"> - <pre><code class="language-c">/* Write to reverse a number. */ -/* Author - Amit Dutta, Date - 29th October, 2025 */ - -/* - * Compiler Note: This source code is specifically designed for compilation - * and execution within the ** Turbo C ** environment. - * - * Testing Disclaimer: Due to a lack of access to the required Turbo C - * compiler software, this code has not been formally compiled or tested. - */ - -#include &lt;stdio.h&gt; -#include &lt;conio.h&gt; - -void main() -{ - clrscr(); - int n, reverse = 0, rem; - printf(&quot;Enter the numner : &quot;); - scanf(&quot;%d&quot;, &amp;n); - while (n != 0) - { - rem = n % 10; - reverse = reverse * 10 + rem; - n /= 10; - } - printf(&quot;Reversed Number : %d&quot;, reverse); - getch(); -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-006.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-006_c', 'APC-S-006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-006.c"> - <pre><code class="language-c">/* Write a program to print first 10 multiple of 5 */ -/* Author - Amit Dutta, Date - 29th October, 2025 */ - -/* - * Compiler Note: This source code is specifically designed for compilation - * and execution within the ** Turbo C ** environment. - * - * Testing Disclaimer: Due to a lack of access to the required Turbo C - * compiler software, this code has not been formally compiled or tested. - */ - -#include &lt;stdio.h&gt; -#include &lt;conio.h&gt; - -void main() -{ - clrscr(); - int a = 5, i = 1, res; - while (i &lt;= 10) - { - res = a * i; - printf(&quot;%d * %d = %d\n&quot;, a, i, res); - i++; - } - getch(); -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-007.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-007_c', 'APC-S-007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-007.c"> - <pre><code class="language-c">/* Write a program the sum of first 10 natural numbers. */ -/* Author - Amit Dutta, Date - 29th October, 2025 */ - -/* - * Compiler Note: This source code is specifically designed for compilation - * and execution within the ** Turbo C ** environment. - * - * Testing Disclaimer: Due to a lack of access to the required Turbo C - * compiler software, this code has not been formally compiled or tested. - */ - -#include &lt;stdio.h&gt; -#include &lt;conio.h&gt; - -void main() -{ - clrscr(); - int i, sum = 0; - for (i = 1; i &lt;= 10; i++) - { - sum += i; - } - printf(&quot;\nSum of the first natural number : %d&quot;, sum); - getch(); -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-008.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-008_c', 'APC-S-008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-008.c"> - <pre><code class="language-c">/* Write a program to print the sum of two matrix as input given by the user. */ -/* Author: Amit Dutta, Date: 18-11-2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int rows, cols, i, j; - printf(&quot;Enter the number of rows and columns: &quot;); - scanf(&quot;%d %d&quot;, &amp;rows, &amp;cols); - - int a[rows][cols], b[rows][cols], c[rows][cols]; - - printf(&quot;Enter the elements of matrix A (%d x %d): \n&quot;, rows, cols); - for (i = 0; i &lt; rows; i++) - for (j = 0; j &lt; cols; j++) - { - printf(&quot;Position %d%d: &quot;, i, j); - scanf(&quot;%d&quot;, &amp;a[i][j]); - } - printf(&quot;\nMatrix A: \n&quot;); - for (i = 0; i &lt; rows; i++) - { - for (j = 0; j &lt; cols; j++) - printf(&quot;%d &quot;, a[i][j]); - printf(&quot;\n&quot;); - } - - printf(&quot;\nEnter the elements of matrix B(%d x %d): \n&quot;, rows, cols); - for (i = 0; i &lt; rows; i++) - for (j = 0; j &lt; cols; j++) - { - printf(&quot;Position %d%d: &quot;, i, j); - scanf(&quot;%d&quot;, &amp;b[i][j]); - } - printf(&quot;\nMatrix B: \n&quot;); - for (i = 0; i &lt; rows; i++) - { - for (j = 0; j &lt; cols; j++) - printf(&quot;%d &quot;, b[i][j]); - printf(&quot;\n&quot;); - } - - for (i = 0; i &lt; rows; i++) - for (j = 0; j &lt; cols; j++) - c[i][j] = a[i][j] + b[i][j]; - - printf(&quot;\nResult Matrix: \n&quot;); - for (i = 0; i &lt; rows; i++) - { - for (j = 0; j &lt; cols; j++) - printf(&quot;%d &quot;, c[i][j]); - printf(&quot;\n&quot;); - } - - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-009.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-009_c', 'APC-S-009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-009.c"> - <pre><code class="language-c">/* Write a program to find the upper and lower triangular matrix. */ -/* Author: Amit Dutta, Date: 18-11-2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int i, j, rows, cols; - printf(&quot;\nEnter the number of rows and columns : &quot;); - scanf(&quot;%d %d&quot;, &amp;rows, &amp;cols); - - if (rows != cols) - { - printf(&quot;Triangular matrix definitions only apply to square matrices (rows == columns).\n&quot;); - return 1; - } - - int matrix[rows][cols]; - - printf(&quot;Enter the elements of matrix (%d x %d): \n&quot;, rows, cols); - for (i = 0; i &lt; rows; i++) - for (j = 0; j &lt; cols; j++) - { - printf(&quot;Position %d%d: &quot;, i, j); - scanf(&quot;%d&quot;, &amp;matrix[i][j]); - } - printf(&quot;\nMatrix: \n&quot;); - for (i = 0; i &lt; rows; i++) - { - for (j = 0; j &lt; cols; j++) - printf(&quot;%d &quot;, matrix[i][j]); - printf(&quot;\n&quot;); - } - - printf(&quot;\nUpper triangular of the Matrix: \n&quot;); - for (i = 0; i &lt; rows; i++) - { - for (j = 0; j &lt; cols; j++) - { - if (j &gt;= i) - printf(&quot;%d &quot;, matrix[i][j]); - else - printf(&quot;~ &quot;); - } - printf(&quot;\n&quot;); - } - - printf(&quot;\nLower triangular of the Matrix: \n&quot;); - for (i = 0; i &lt; rows; i++) - { - for (j = 0; j &lt; cols; j++) - { - if (j &lt;= i) - printf(&quot;%d &quot;, matrix[i][j]); - else - printf(&quot;~ &quot;); - } - printf(&quot;\n&quot;); - } - - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-010.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-010_c', 'APC-S-010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-010.c"> - <pre><code class="language-c">/* Write a program to input a new element at a specific position of an array. - a[] = {4, 5, 2, 10, 6, 9, 8}, newItem = 7, position = 3 -*/ -/* Author: Amit Dutta, Date: 18-11-2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int a[8] = {4, 5, 2, 10, 6, 9, 8}; - int i; - - printf(&quot;Elemnts of the array: &quot;); - for (i = 0; i &lt;= 6; i++) - printf(&quot;%d &quot;, a[i]); - - printf(&quot;\nMethod 1: &quot;); - for (i = 7; i &gt;= 4; i--) - a[i] = a[i - 1]; - a[3] = 7; - for (i = 0; i &lt;= 7; i++) - printf(&quot;%d &quot;, a[i]); - - // another method - printf(&quot;\nMethod 2: &quot;); - int b[8] = {4, 5, 2, 10, 6, 9, 8}; - int temp1 = 7; - for (i = 3; i &lt;= 7; i++) - { - int temp2 = b[i]; - b[i] = temp1; - temp1 = temp2; - } - for (i = 0; i &lt;= 7; i++) - printf(&quot;%d &quot;, b[i]); - - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-011.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-011_c', 'APC-S-011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-011.c"> - <pre><code class="language-c">/* Linear search */ -/* Author: Amit Dutta, Date: 19-11-2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int elementCount, i, keyElement; - - printf(&quot;Enter the number of element you want to add: &quot;); - scanf(&quot;%d&quot;, &amp;elementCount); - - int elements[elementCount]; - - for (i = 0; i &lt; elementCount; i++) - { - printf(&quot;Enter Element %d: &quot;, i + 1); - scanf(&quot;%d&quot;, &amp;elements[i]); - } - - printf(&quot;\nEnter the Key Element you want to search: &quot;); - scanf(&quot;%d&quot;, &amp;keyElement); - for (i = 0; i &lt; elementCount; i++) - if (elements[i] == keyElement) - { - printf(&quot;\nKey Element %d is found in %d position.&quot;, keyElement, i); - return 0; - } - printf(&quot;\nKey Element %d is not found.&quot;, keyElement); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-012.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-012.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-012_c', 'APC-S-012.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-012_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-012.c"> - <pre><code class="language-c">/* Write a program to check if a matrix is a sparx matrix. */ -/* Author: Amit Dutta, Date: 19-11-2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int i, j, row, col, count = 0; - - printf(&quot;Enter the number of rows and columns in the matrix: &quot;); - scanf(&quot;%d %d&quot;, &amp;row, &amp;col); - - int matrix[row][col]; - - for (i = 0; i &lt; row; i++) - for (j = 0; j &lt; col; j++) - { - printf(&quot;Postion %d%d: &quot;, i, j); - scanf(&quot;%d&quot;, &amp;matrix[i][j]); - if (matrix[i][j] == 0) - count++; - } - - printf(&quot;\nEntered Matrix: \n&quot;); - for (i = 0; i &lt; row; i++) - { - for (j = 0; j &lt; col; j++) - printf(&quot;%d &quot;, matrix[i][j]); - printf(&quot;\n&quot;); - } - - if (count &gt; (row * col) / 2) - printf(&quot;\nEntered matrix is a Sparx Matrix.&quot;); - else - printf(&quot;\nEntered matrix is not a Sparx Matrix&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-S-013.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-013.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-S-013_c', 'APC-S-013.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-S-013_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-013.c"> - <pre><code class="language-c">/* Write a fuction to calculate the average of an array */ -/* Author: Amit Dutta, Date: 26-11-2025 */ - -#include &lt;stdio.h&gt; - -double average(int []); - -int main() -{ - int marks[10], i; - printf(&quot;\nEnter 10 numbers: \n&quot;); - for (i = 0; i &lt;= 9; i++) - { - printf(&quot;Enter number %d: &quot;, i + 1); - scanf(&quot;%d&quot;, &amp;marks[i]); - } - printf(&quot;\nAverage = %g&quot;, average(marks)); - return 0; -} - -double average(int marks[10]) -{ - int sum = 0; - for (int i = 0; i &lt;= 9; i++) - sum += marks[i]; - return sum / 10.0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-SPS-001.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-SPS-001_c', 'APC-SPS-001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-SPS-001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-001.c"> - <pre><code class="language-c">// WAP to perform arithmatic operation on integer data - -#include&lt;stdio.h&gt; -int main() { - int a, b, sum, sub, multi, div, mod; - printf(&quot;Enter 1st number : &quot;); - scanf(&quot;%d&quot;, &amp;a); - printf(&quot;Enter 2nd number : &quot;); - scanf(&quot;%d&quot;, &amp;b); - sum = a + b; - sub = a - b; - multi = a * b; - div = a / b; - mod = a % b; - printf(&quot;\nSum = %d&quot;, sum); - printf(&quot;\nSubtraction = %d&quot;, sub); - printf(&quot;\nMultiplication = %d&quot;, multi); - printf(&quot;\nDivision = %d&quot;, div); - printf(&quot;\nModulas = %d&quot;, div); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-SPS-002.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-SPS-002_c', 'APC-SPS-002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-SPS-002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-002.c"> - <pre><code class="language-c">/* WAP to swap two integers. Display both numbers -before and after swap */ - -#include&lt;stdio.h&gt; -int main() { - int a = 10, b = 20, temp; - printf(&quot;Before swap A : %d, B : %d&quot;, a, b); - temp = a; - a = b; - b = temp; - printf(&quot;\nAfter swap A : %d, B : %d&quot;, a, b); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-SPS-003.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-SPS-003_c', 'APC-SPS-003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-SPS-003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-003.c"> - <pre><code class="language-c">/* Bitwise AND &#x27;&amp;&#x27; */ - -#include&lt;stdio.h&gt; -int main() { - unsigned int a = 4, b = 5, c = 6; - unsigned int x, y; - x = a &amp; b; - y = b &amp; c; - printf(&quot;x = %u y = %u&quot;, x, y); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-SPS-004.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-SPS-004_c', 'APC-SPS-004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-SPS-004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-004.c"> - <pre><code class="language-c">#include&lt;stdio.h&gt; -int main() { - int x = 25, y = 19, z; - z = x - y; - z = z &amp; x ; - printf(&quot;Z = %d&quot;, z); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-SPS-005.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-SPS-005_c', 'APC-SPS-005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-SPS-005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-005.c"> - <pre><code class="language-c">/* Bitwise OR &#x27;|&#x27; */ - -#include&lt;stdio.h&gt; -int main() { - int x = 12, y = 14, z = 10, res; - x++; - z++; - x = x + y + z; - res = x | y; - z = res | z; - printf(&quot;x = %d y = %d z = %d res = %d&quot;, x, y, z, res); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-SPS-006.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-SPS-006_c', 'APC-SPS-006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-SPS-006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-006.c"> - <pre><code class="language-c">/* Bitwise NOT &#x27;~&#x27; */ - -#include&lt;stdio.h&gt; -int main() { - int x = 12, y = 15, z = 21; - int res, res1, res2; - res = x &gt; 10; - res1 = ~res; - res2 = ~x; - printf(&quot;REs = %d, Res1 = %d, Res2 = %d&quot;, res, res1, res2); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-SPS-007.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-SPS-007_c', 'APC-SPS-007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-SPS-007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-007.c"> - <pre><code class="language-c">/* WAP to check a number is even or odd using bitwise operator */ - -#include&lt;stdio.h&gt; -int main() { - int x, res = 1; - printf(&quot;Enter a number : &quot;); - scanf(&quot;%d&quot;, &amp;x); - res = res &amp; x; - if (res == 0) { - printf(&quot;\nInput %d is a even number.&quot;, x); - } - else { - printf(&quot;\nInput %d is a odd number.&quot;, x); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">APC-SPS-008.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-APC-SPS-008_c', 'APC-SPS-008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-APC-SPS-008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-008.c"> - <pre><code class="language-c">/* WAP to calculate area of circle by accepting radius as input */ -/* Author : Amit Dutta, Date : 15th September, 2025 */ - -#include&lt;stdio.h&gt; -#include&lt;math.h&gt; -int main() { - double r, area; - printf(&quot;Enter the radius of circle : &quot;); - scanf(&quot;%lf&quot;, &amp;r); - area = M_PI * r * r; - printf(&quot;\nArea : %lf&quot;, area); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P001.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P001_c', 'P001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P001.c"> - <pre><code class="language-c">//sample code -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -int main() { - printf(&quot;Hello world&quot;); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P002.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P002_c', 'P002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P002.c"> - <pre><code class="language-c">//sample code with a new line charecter -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -int main() { - printf(&quot;Hello\nworld&quot;); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P003.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P003_c', 'P003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P003.c"> - <pre><code class="language-c">//WAP to perform addtion and multiplication of two integer numbers -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -int main() { - int a, b, sum, multi; - printf(&quot;Enter the 1st number : &quot;); - scanf(&quot;%d&quot;,&amp;a); - printf(&quot;Enter the 2nd number : &quot;); - scanf(&quot;%d&quot;,&amp;b); - sum = a + b; - multi = a * b; - printf(&quot;\nSum = %d&quot; - &quot;\nMultiplication = %d&quot;,sum,multi); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P004.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P004_c', 'P004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P004.c"> - <pre><code class="language-c">/* WAP to find and display the value of given expression : -((x+3)/4) - ((2x+4)/3) taking the value of x = 5 */ -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -int main() { - double x =5, result; - result = ((x + 3) / 4) - ((2 * x + 4) / 3); - printf(&quot;Result = %lf&quot;,result); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P005.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P005_c', 'P005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P005.c"> - <pre><code class="language-c">/* A person is paid Rs. 455 for each day he works and fined -Rs. 150 for each day he remains absent. WAP to calculate his -monthly income taking the number of days present as input. */ -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -int main() { - int daily_wage = 455, fine = 150, present, absent, income; - printf(&quot;No of days present : &quot;); - scanf(&quot;%d&quot;, &amp;present); - absent = 30 - present; - income = (present * 455) - (absent * 150); - printf(&quot;\nIncome : %d&quot;,income); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P006.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P006_c', 'P006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P006.c"> - <pre><code class="language-c">/* The normal temperature of human body -is 98.6 Degree Fahrenheit. WAP to convert the temperature -to Degree Celcius and display the output. */ -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -int main() { - double f = 98.6, c; - c = ((f - 32) * 5) / 9; - printf(&quot;Temperature in Celcius is : %lf&quot;,c); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P007.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P007_c', 'P007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P007.c"> - <pre><code class="language-c">/* A shopkeeper offers 10% discount on printed -price of a digital camera. However a customer has -to pay 6% GST on the remaining amount. WAP to -calculate and display the amount to paid by the -customer, taking the printed price as input. */ -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -int main() { - double mrp, final_price, temp; - printf(&quot;Enter the printed price : &quot;); - scanf(&quot;%lf&quot;, &amp;mrp); - temp = mrp * 0.90; - final_price = temp * 1.06; - printf(&quot;\nCustomer have to pay : %lf&quot;, final_price); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P008.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P008_c', 'P008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P008.c"> - <pre><code class="language-c">/* A shopkeeper offers 30% discount on purchasing an -item whereas the other shopkeeper offers 2 successive -discount of 20% and 10% for purchasing the same item. -WAP to caompute and display the discounted price of the -item by taking the price as input. */ -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -int main() { - double mrp, shop1, shop2, temp; - printf(&quot;Enter the price : &quot;); - scanf(&quot;%lf&quot;, &amp;mrp); - shop1 = mrp * 0.70; - temp = mrp * 0.80; - shop2 = temp * 0.90; - printf(&quot;\nShopkeeper 1 price : %lf&quot; - &quot;\nShopkeeper 2 price : %lf&quot;,shop1,shop2); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P009.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P009_c', 'P009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P009.c"> - <pre><code class="language-c">/* WAP to calculate gross and net salary -by accepting basic salary as input. -IMP : DA = 30% of Basic Pay - HRA = 20% of Basic Pay - PF = 12.5% of Basic Pay - Gross Salary = Basic Pay + DA + HRA - Net Salary = Gross Salary - PF -*/ -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -int main() { - double bs, da, hra, pf, gs, ns; - printf(&quot;Enter the Basic Salary : &quot;); - scanf(&quot;%lf&quot;, &amp;bs); - da = bs * 0.3; - hra = bs * 0.2; - pf = bs * 0.125; - gs = bs + da + hra; - ns = gs - pf; - printf(&quot;\nGross Salary : %lf&quot; - &quot;\nNet Salary : %lf&quot;, gs, ns); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P010.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P010_c', 'P010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P010.c"> - <pre><code class="language-c">/* WAP to find and display the difference -between compound Interest and Simple Interest. -Take principle amount as input. -Hint : si = (p * r * t) / 100 - a = p * ((1 + (r / 100)) ^ t) - ci = a - p -*/ -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -#include&lt;math.h&gt; -int main() { - double p, r, t, si, a, ci, dif; - printf(&quot;Enter the principle amount, rate of interest, time in year : &quot;); - scanf(&quot;%lf %lf %lf&quot;, &amp;p, &amp;r, &amp;t); - si = (p * r * t) / 100; - a = p * pow((1 + (r / 100)), t); - ci = a - p; - dif = ci - si; - printf(&quot;\nSimple Interest : %lf&quot; - &quot;\nCompound Interest : %lf&quot; - &quot;\nInterest Difference : %lf&quot;, si, ci, dif); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P011.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P011_c', 'P011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P011.c"> - <pre><code class="language-c">/* The time period of a simple pendulam is -given by the formula : - t = 2 * pi * square_root(l / g) -WAP to calculate T take length(L) and gravity -as input -*/ -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -#include&lt;math.h&gt; -int main() { - double l, g, t; - printf(&quot;Enter the Length and Gravity measures : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;l, &amp;g); - t = 2 * M_PI * sqrt(l / g); - // using M_PI variable for PI value from math.h header file - printf(&quot;\nTime Period : %lf&quot;, t); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P012.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P012.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P012_c', 'P012.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P012_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P012.c"> - <pre><code class="language-c">/* WAP to swap two integer variable without -using third variable */ -// using Approch Mode : simple, slow, time consuming -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -int main() { - int a = 4, b = 6; - printf(&quot;Before Swap : A = %d, B = %d&quot;, a, b); - a = a + b; - b = a - b; - a = a - b; - printf(&quot;\nAfter Swap : A = %d, B = %d&quot;, a, b); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P013.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P013.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P013_c', 'P013.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P013_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P013.c"> - <pre><code class="language-c">/* WAP to swap two integer variable without -using third variable */ -// using Approch Mode : complex, fast, less time consumimg -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -#include&lt;math.h&gt; -int main() { - int a = 4, b = 6; - printf(&quot;Before Swap : A = %d, B = %d&quot;, a, b); - a = a ^ b; - b = a ^ b; - a = a ^ b; - printf(&quot;\nAfter Swap : A = %d, B = %d&quot;, a, b); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P014.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P014.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P014_c', 'P014.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P014_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P014.c"> - <pre><code class="language-c">/* WAP to accept the diagonal of -square. Find and display the area and -perimeter of the square. */ -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -#include&lt;math.h&gt; -int main() { - double d, side, area, per; - printf(&quot;Enter the diagonal : &quot;); - scanf(&quot;%lf&quot;, &amp;d); - side = d / sqrt (2); - area = side * side; - per = 4 * side; - printf(&quot;\nArea of the Square : %lf&quot; - &quot;\nPerimeter of the Square : %lf&quot;, area, per); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P015.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P015.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P015_c', 'P015.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P015_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P015.c"> - <pre><code class="language-c">/*WAP to accept number of days and -display it after converting into -number of years, months and days */ -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -int main() { - int day, month, year, temp; - printf(&quot;Enter the number of days : &quot;); - scanf(&quot;%d&quot;, &amp;day); - temp = day; - year = day / 365; - day = day % 365; - month = day / 30; - day = day % 30; - printf(&quot;\n%d Days = %d Years %d Months %d Days&quot;, temp, year, month, day); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P016.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P016.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P016_c', 'P016.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P016_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P016.c"> - <pre><code class="language-c">/* WAP to calculate and display radius of a -circle by taking the area as input */ -// Author - Amit Dutta, Date - Unknown - -#include&lt;stdio.h&gt; -#include&lt;math.h&gt; -int main() { - double area, r; - printf(&quot;Enter the area of a circle : &quot;); - scanf(&quot;%lf&quot;, &amp;area); - r = sqrt((7 * area) / 22); - printf(&quot;\nRadius : %lf&quot;, r); - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P017.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P017.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P017_c', 'P017.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P017_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P017.c"> - <pre><code class="language-c">/* Find maximum between three number. */ -// Author - Amit Dutta, Date - Unknown - -#include &lt;stdio.h&gt; -int main() -{ - int a, b, c, max; - printf(&quot;Enter the value for a, b, c : &quot;); - scanf(&quot;%d %d %d&quot;, &amp;a, &amp;b, &amp;c); - max = a; - if (max &lt; b) - max = b; - if (max &lt; c) - max = c; - printf(&quot;Maximum : %d&quot;, max); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P018.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P018.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P018_c', 'P018.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P018_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P018.c"> - <pre><code class="language-c">/* WAP to input the cost price and selling price and -calculate profit, profit percentage, loss percentage or -display the manage nither profit nor loss. */ -// Author - Amit Dutta, Date - Unknown - -#include &lt;stdio.h&gt; -int main() -{ - double cost, sell, pro, prop, loss, lossp; - printf(&quot;Enter the cost and selling price : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;cost, &amp;sell); - if (sell &gt; cost) - { - pro = sell - cost; - prop = (pro / cost) * 100; - printf(&quot;Profit : RS %g, Profit Percentage : %g&quot;, pro, prop); - } - else if (sell &lt; cost) - { - loss = cost - sell; - lossp = (loss / cost) * 100; - printf(&quot;Loss : RS %g, Loss Percentage : %g&quot;, loss, lossp); - } - else - printf(&quot;Neither loss nor Profit.&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P019.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P019.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P019_c', 'P019.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P019_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P019.c"> - <pre><code class="language-c">/* WAP to input the distance covered and calculate -the amount to be paid by the passanger. - Distance Rate - =&lt;5KM RS 90 - next 10KM RS 20/KM - next 10KM RS 10/KM - more than 25KM RS 9/KM -*/ -// Author - Amit Dutta, Date - Unknown - -#include &lt;stdio.h&gt; -int main() -{ - double dis, amt; - printf(&quot;Enter the distance : &quot;); - scanf(&quot;%lf&quot;, &amp;dis); - if (dis &lt;= 5.0) - amt = 90.0; - else if (dis &gt; 5.0 &amp;&amp; dis &lt;= 15.0) - amt = 90.0 + (dis - 5.0) * 20; - else if (dis &gt; 15.0 &amp;&amp; dis &lt;= 25.0) - amt = 90.0 + 200.0 + (dis - 15.0) * 10; - else if (dis &gt; 25.0) - amt = 90.0 + 200.0 + 100.0 + (dis - 25.0) * 9; - printf(&quot;\nAmount to be paid : %g&quot;, amt); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P020.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P020.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P020_c', 'P020.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P020_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P020.c"> - <pre><code class="language-c">/* WAP to calculate and display the maturity amount -taking the sum and number of days as input. - No. of Days Rate of Interest - Upto 180 days 5.5 % - 181 to 364 days 7.5 % - exact 365 days 9.0 % - more than 365 days 8.5 % -*/ -// Author - Amit Dutta, Date - Unknown - -#include &lt;stdio.h&gt; -int main() -{ - double nod, amt, s, i; - printf(&quot;Enter the amount and the time in days : &quot;); - scanf(&quot;%lf %lf&quot;, &amp;s, &amp;nod); - if (nod &lt;= 180) - i = (s * 5.5 * (nod / 365)) / 100; - else if (nod &gt; 180.0 &amp;&amp; nod &lt;= 364.0) - i = (s * 7.5 * (nod / 365)) / 100; - else if (nod == 365.0) - i = (s * 9.0 * 1) / 100; - else if (nod &gt; 365.0) - i = (s * 8.5 * (nod / 365)) / 100; - amt = s + i; - printf(&quot;Amount to be paid : %g&quot;, amt); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P021.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P021.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P021_c', 'P021.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P021_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P021.c"> - <pre><code class="language-c">/* WAP to input a positive number and check if it is a perfect -square number or not. */ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -int main() -{ - int n, temp; - double sr; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;n); - sr = sqrt(n); - temp = (int)sr; - if (temp * temp == n) - printf(&quot;\nThis is a perfect square.&quot;); - else - printf(&quot;\nThis is not a perfect square.&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P022.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P022.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P022_c', 'P022.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P022_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P022.c"> - <pre><code class="language-c">/* WAP to find out smallest of three numbers without using if_else block. */ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. - -#include &lt;stdio.h&gt; -int main() -{ - int a, b, c, min; - printf(&quot;Enter three number : &quot;); - scanf(&quot;%d %d %d&quot;, &amp;a, &amp;b, &amp;c); - min = (a &lt; b &amp;&amp; a &lt; c) ? a : (b &lt; a &amp;&amp; b &lt; c) ? b - : c; - printf(&quot;Minimum = %d&quot;, min); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P023.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P023.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P023_c', 'P023.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P023_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P023.c"> - <pre><code class="language-c">/* WAP to input the total cost and compute the amount to be paid -by the customer. */ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. - -#include &lt;stdio.h&gt; -int main() -{ - double cost, amt; - printf(&quot;Enter the total cost : &quot;); - scanf(&quot;%lf&quot;, &amp;cost); - if (cost &lt;= 2000) - amt = cost * 0.94; - else if (cost &gt; 2000 &amp;&amp; cost &lt;= 5000) - amt = cost * 0.9; - else if (cost &gt; 5000 &amp;&amp; cost &lt;= 10000) - amt = cost * 0.85; - else if (cost &gt; 10000) - amt = cost * 0.8; - printf(&quot;\nAmount to be paid : %g&quot;, amt); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P024.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P024.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P024_c', 'P024.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P024_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P024.c"> - <pre><code class="language-c">/* WAP to check whether a year is leapyear or not. */ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. - -#include &lt;stdio.h&gt; -int main() -{ - int year; - printf(&quot;Enter the year : &quot;); - scanf(&quot;%d&quot;, &amp;year); - if (year % 4 == 0 &amp;&amp; year % 100 != 0) - printf(&quot;\nYear %d is a leapyear.&quot;, year); - else if (year % 400 == 0) - printf(&quot;\nYear %d is a leapyear (Century).&quot;, year); - else - printf(&quot;\nYear %d is not a leapyear.&quot;, year); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P025.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P025.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P025_c', 'P025.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P025_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P025.c"> - <pre><code class="language-c">/* WAP to input the electricity unit consumed and calculate the total -bill amount according to the given condition : - for 1st 50 unit Rs. 0.50 per unit - next 100 unit Rs. 0.75 per unit - next 100 unit Rs. 1.20 per unit - above 250 unit Rs. 1.50 per unit -And additional charge of 20 percent is added to the bill. -*/ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. - -#include &lt;stdio.h&gt; -int main() -{ - double unit, amt; - printf(&quot;Enter the electricity consp(unit) : &quot;); - scanf(&quot;%lf&quot;, &amp;amt); - if (unit &lt;= 50) - amt = unit * 0.50; - else if (unit &gt; 50 &amp;&amp; unit &lt;= 50) - amt = 25 + ((unit - 50) * 0.75); - else if (unit &gt; 150 &amp;&amp; unit &lt;= 250) - amt = 25 + 75 + ((unit - 150) * 1.20); - else if (unit &gt; 250) - amt = 25 + 75 + 120 + ((unit - 250) * 1.50); - amt = amt * 1.20; - printf(&quot;\nAmount to be paid : %g&quot;, amt); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P026.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P026.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P026_c', 'P026.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P026_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P026.c"> - <pre><code class="language-c">/* WAP to input sum (p), rate of interest (r), time (t) and type of interest -(&#x27;s&#x27; for simple interest amd &#x27;c&#x27; for compound interest). Calculate and display -the interest earned - si = (p * r * t) / 100 - compoundInterest = p * ((1 + r / 100)^t - 1) -*/ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -#include &lt;ctype.h&gt; -int main() -{ - double principalAmount, rateOfInterest, timePeriod, simpleInterest, compoundInterest; - char mode; - printf(&quot;Enter the principle amount, Rate of interest, Time : &quot;); - scanf(&quot;%lf %lf %lf&quot;, &amp;principalAmount, &amp;rateOfInterest, &amp;timePeriod); - printf(&quot;\nEnter the mode (&#x27;s&#x27; : simple interest, &#x27;c&#x27; : compound interest) : &quot;); - scanf(&quot; %c&quot;, &amp;mode); - mode = tolower(mode); - switch (mode) - { - case &#x27;s&#x27;: - simpleInterest = (principalAmount * rateOfInterest * timePeriod) / 100; - printf(&quot;\nSimple Interest : %g&quot;, simpleInterest); - break; - case &#x27;c&#x27;: - compoundInterest = principalAmount * (pow((1 + rateOfInterest / 100), timePeriod) - 1); - printf(&quot;\nCompound Interest : %g&quot;, compoundInterest); - break; - default: - printf(&quot;\nInvalid Input&quot;); - return 1; - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P027.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P027.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P027_c', 'P027.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P027_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P027.c"> - <pre><code class="language-c">/* Purchase Discount on Discount on - Amount Laptop Desktop - -------- ----------- ----------- - Upto 20k 3.0% 5.0% - 20001 - 50k 5.0% 7.5% - 50001 - 75k 7.5% 10.5% - more than 75k 10.0% 15.0% -WAP to input amount of purchase and type of purchase (&#x27;L&#x27; : laptop, &#x27;D&#x27; : desktop) -and display the discount amount and the discounted price (Net Amount). -*/ -/* Author - Amit Dutta, Date - 8th OCT, 2025 */ -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. - -#include &lt;stdio.h&gt; -#include &lt;ctype.h&gt; -int main() -{ - double principal_amount, desktop_discount, laptop_discount, discount_amount, discounted_price; - char choice; - printf(&quot;Enter the purchase amount : &quot;); - scanf(&quot;%lf&quot;, &amp;principal_amount); - printf(&quot;Type of purchase (&#x27;L&#x27; : Laptop, &#x27;D&#x27; : Desktop) : &quot;); - scanf(&quot; %c&quot;, &amp;choice); - choice = toupper(choice); - if (principal_amount &lt;= 20000) - { - laptop_discount = 0.03; - desktop_discount = 0.05; - } - else if (principal_amount &gt; 20000 &amp;&amp; principal_amount &lt;= 50000) - { - laptop_discount = 0.05; - desktop_discount = 0.075; - } - else if (principal_amount &gt; 50000 &amp;&amp; principal_amount &lt;= 75000) - { - laptop_discount = 0.075; - desktop_discount = 0.105; - } - else if (principal_amount &gt; 75000) - { - laptop_discount = 0.1; - desktop_discount = 0.15; - } - switch (choice) - { - case &#x27;L&#x27;: - discount_amount = principal_amount * laptop_discount; - discounted_price = principal_amount - discount_amount; - printf(&quot;\nDiscount Amount : %g&quot; - &quot;\nDiscounted Price : %g&quot;, - discount_amount, discounted_price); - break; - case &#x27;D&#x27;: - discount_amount = principal_amount * desktop_discount; - discounted_price = principal_amount - discount_amount; - printf(&quot;\nDiscount Amount : %g&quot; - &quot;\nDiscounted Price : %g&quot;, - discount_amount, discounted_price); - break; - default: - printf(&quot;\nInvalid Input.&quot;); - return 1; - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P028.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P028.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P028_c', 'P028.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P028_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P028.c"> - <pre><code class="language-c">/* WAP to calculate factorial of a number */ -/* Author - Amit Dutta, Date - 11th OCT, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int i = 1, num, fact = 1; - printf(&quot;Enter the number : &quot;); - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nPlease enter a number.&quot;); - return 1; - } - if (num == 0) - { - printf(&quot;\nFactorial of 0 : 1&quot;); - return 0; - } - if (num &lt; 0) - { - printf(&quot;\nFactorial of %d : UNDEFINED&quot;, num); - return 0; - } - while (i &lt;= num) - { - fact = fact * i; - i++; - } - printf(&quot;Factorial of %d : %d&quot;, num, fact); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P029.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P029.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P029_c', 'P029.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P029_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P029.c"> - <pre><code class="language-c">/* WAP to perform addition of first n natural numbers. sum = 1 + 2 + 3 + ... */ -/* Author - Amit Dutta, Date - 11th OCT, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int num, i = 0, result = 0; - printf(&quot;Enter the value for n : &quot;); - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nPlease enter a number.&quot;); - return 1; - } - if (num &lt; 1) - { - printf(&quot;\nPlease enter a positive number.&quot;); - return 1; - } - while (i &lt;= num) - { - result = result + i; - i++; - } - printf(&quot;\nResult : %d&quot;, result); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P030.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P030.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P030_c', 'P030.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P030_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P030.c"> - <pre><code class="language-c">/* Display the first 15 terms of the series. */ -/* Author - Amit Dutta, Date - 11th OCT, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int main() -{ - int i, r; - - // 3, 6, 9, 12, ... - { - i = 3, r = 0; - printf(&quot;Series 1 (3, 6, 9, 12, ...) :&quot;); - while (i &lt;= 15) - { - r = r + 3; - printf(&quot; %d&quot;, r); - i++; - } - } - - // 1, 4, 9, 16, ... - { - i = 1; - printf(&quot;\nSeries 2 (1, 4, 9, 16, ...) :&quot;); - while (i &lt;= 15) - { - printf(&quot; %d&quot;, i * i); - i++; - } - } - - // 4, 8, 16, 32, ... - { - i = 1, r = 2; - printf(&quot;\nSeries 3 (4, 8, 16, 32, ...) :&quot;); - while (i &lt;= 15) - { - r = r * 2; - printf(&quot; %d&quot;, r); - i++; - } - } - - // 0, 7, 26, ... - { - i = 1, r; - printf(&quot;\nSeries 4 (0, 7, 26, ...) :&quot;); - while (i &lt;= 15) - { - r = (int)pow(i, 3) - 1; - printf(&quot; %d&quot;, r); - i++; - } - } - - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P031.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P031.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P031_c', 'P031.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P031_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P031.c"> - <pre><code class="language-c">/* Find the sum of the series */ -/* Author - Amit Dutta, Date - 11th OCT, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int main() -{ - double a, res, n; - int i; - - // s = (a ^ 2) + (a ^ 2 / 2) + (a ^ 2 / 3) + ... + (a ^ 2 / 10) - { - res = 0, i = 1; - printf(&quot;--- s = (a ^ 2) + (a ^ 2 / 2) + (a ^ 2 / 3) + ... + (a ^ 2 / 10) ---&quot;); - printf(&quot;\nEnter the number : &quot;); - scanf(&quot;%lf&quot;, &amp;a); - while (i &lt;= 10) - { - res = res + ((a * a) / i); - i++; - } - printf(&quot;S = %g&quot;, res); - } - - // s = 1 + (2 ^ 2 / a) + (3 ^ 3 / a ^ 2) + ... + n - { - res = 0, i = 0; - printf(&quot;\n--- // s = 1 + (2 ^ 2 / a) + (3 ^ 3 / a ^ 2) + ... + n ---&quot;); - printf(&quot;\nEnter the value for a and n : &quot;); - scanf(&quot; %lf %lf&quot;, &amp;a, &amp;n); - while (i &lt;= n - 1) - { - res = res + (pow(i + 1, i + 1) / pow(a, i)); - i++; - } - printf(&quot;S = %g&quot;, res); - } - - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P032.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P032.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P032_c', 'P032.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P032_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P032.c"> - <pre><code class="language-c">/* WAP to input a number and check whether it is a Niven number -or not. (When a number is divisible by its sum of digit) e.g. : n = 126*/ -/* Author - Amit Dutta, Date - 11th OCT, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int n, temp, sod = 0; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;n); - temp = n; - while (temp &gt; 0) - { - sod = sod + (temp % 10); - temp = temp / 10; - } - if (n % sod == 0) - printf(&quot;\nIt is Niven number.&quot;); - else - printf(&quot;\nIt is not a Niven number.&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P033.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P033.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P033_c', 'P033.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P033_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P033.c"> - <pre><code class="language-c">/* WAP to calculate the sum of even digits and odd digits. Number will be provided by user. */ -/* Author - Amit Dutta, Date - 18th OCT, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int inp, odd = 0, even = 0, temp; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;inp); - temp = inp; - while (temp &gt; 0) - { - if ((temp % 10) % 2 == 0) - even += temp % 10; - else - odd += temp % 10; - temp /= 10; - } - printf(&quot;\nSum of even : %d&quot; - &quot;\nSum of odd : %d&quot;, - even, odd); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P034.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P034.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P034_c', 'P034.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P034_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P034.c"> - <pre><code class="language-c">/* Get sum of even position digit and odd position digit */ -/* Counting starts from the rightmost digit as position 1 (Odd). */ -/* Author - Amit Dutta, Date - 18th OCT, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int inp, temp, index = 1, even = 0, odd = 0; - printf(&quot;Enter the numebr : &quot;); - scanf(&quot;%d&quot;, &amp;inp); - temp = inp; - while (temp &gt; 0) - { - if (index % 2 == 0) - even += temp % 10; - else - odd += temp % 10; - temp /= 10; - index++; - } - printf(&quot;\nSum of even position digits : %d&quot; - &quot;\nSum of odd position digits : %d&quot;, - even, odd); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P035.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P035.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P035_c', 'P035.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P035_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P035.c"> - <pre><code class="language-c">/* WAP to input an int number and display the product of the successors -of even digits of the number entered by user. */ -/* Author - Amit Dutta, Date - 18th OCT, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;stdbool.h&gt; -int main() -{ - int n, res = 1, temp; - bool status = false; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;n); - temp = n; - while (temp &gt; 0) - { - if ((temp % 10) % 2 == 0) - { - res *= (temp % 10) + 1; - status = true; - } - temp /= 10; - } - if (!status) - printf(&quot;\nThere is no even digits.&quot;); - else - printf(&quot;\nThe product of the successors of even digits of the number %d is : %d&quot;, n, res); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P036.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P036.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P036_c', 'P036.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P036_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P036.c"> - <pre><code class="language-c">/* sum = a + (a^2)/2 + (a^3)/3 + ... + (a^n)/n */ -/* Author - Amit Dutta, Date - 18th OCT, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int main() -{ - double a, sum = 0; - int n, i; - printf(&quot;Enter value for a and n : &quot;); - scanf(&quot;%lf %d&quot;, &amp;a, &amp;n); - for (i = 1; i &lt;= n; i++) - sum += pow(a, i) / i; - printf(&quot;\nSum = %g&quot;, sum); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P037.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P037.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P037_c', 'P037.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P037_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P037.c"> - <pre><code class="language-c">/* sum = 1 + 1+2/1*2 + 1+2+3/1*2*3 + ... + 1+2+3+...+n/1*2*3*...*n */ -/* Author - Amit Dutta, Date - 18th OCT, 2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - double sum = 0, temp1 = 0, temp2 = 1; - int n, i; - printf(&quot;Enter value for n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for (i = 1; i &lt;= n; i++) - { - temp1 += i; - temp2 *= i; - sum += temp1 / temp2; - } - printf(&quot;\nSum = %g&quot;, sum); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P038.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P038.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P038_c', 'P038.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P038_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P038.c"> - <pre><code class="language-c">/* Write a program to check prime number */ -/* Author - Amit Dutta, Date - 27th OCT, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -#include &lt;stdbool.h&gt; - -int main() -{ - int num, i, endCheckDigit; - bool isPrime = true; - printf(&quot;Enter the number : &quot;); - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nOnly a number is allowed, not a character.&quot;); - return 1; - } - if (num &lt;= 0) - { - printf(&quot;\nOnly postive number is allowed.&quot;); - return 1; - } - if (num == 1) - { - printf(&quot;\nInput 1 is not a prime number.&quot; - &quot;\nHas only one positive divisor (itself), not exactly two.&quot; - &quot;\nRule: Prime number should have exactly two distinct positive divisors: 1 and itself&quot;); - return 0; - } - if (num == 2) - { - printf(&quot;\nInput 2 is a prime number.&quot; - &quot;\n(Note: 2 is only Even Prime Number)&quot;); - return 0; - } - if (num % 2 == 0) - { - printf(&quot;\nInput %d is not a prime number.&quot;, num); - return 0; - } - endCheckDigit = sqrt(num); - for (i = 3; i &lt;= endCheckDigit; i += 2) - { - if (num % i == 0) - { - isPrime = false; - printf(&quot;\nInput %d is not prime number.&quot;, num); - return 0; - } - } - if (isPrime) - { - printf(&quot;\nInput %d is a prime number.&quot;, num); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P039.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P039.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P039_c', 'P039.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P039_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P039.c"> - <pre><code class="language-c">/* Write a program to print all the factors of a postive integer */ -/* Author - Amit Dutta, Date - 27th OCT, 2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int num, i; - printf(&quot;Enter a number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - printf(&quot;\nFactors of %d : &quot;, num); - for (i = 1; i &lt;= num / 2; i++) - { - if (num % i == 0) - { - printf(&quot; %d&quot;, i); - } - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P040.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P040.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P040_c', 'P040.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P040_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P040.c"> - <pre><code class="language-c">/* Write a program to calculate HCF of two positive number */ -/* Author - Amit Dutta, Date - 27th OCT, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int a, b, temp; - printf(&quot;Enter two number : &quot;); - scanf(&quot;%d %d&quot;, &amp;a, &amp;b); - while (b &gt; 0) - { - temp = a; - a = b; - b = temp % b; - } - printf(&quot;HCF = %d&quot;, a); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P041.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P041.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P041_c', 'P041.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P041_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P041.c"> - <pre><code class="language-c">/* Write a program to enter two numbers and check they are co-prime or not. - co-prime when HCF = 1 -*/ -/* Author - Amit Dutta, Date - 27th OCT, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int a, b, temp, temp_a, temp_b; - printf(&quot;Enter two number : &quot;); - scanf(&quot;%d %d&quot;, &amp;a, &amp;b); - temp_a = a; - temp_b = b; - while (b &gt; 0) - { - temp = a; - a = b; - b = temp % b; - } - if (a == 1) - { - printf(&quot;\n(%d, %d) is co-prime.&quot;, temp_a, temp_b); - } - else - { - printf(&quot;\n(%d, %d) is not co-prime.&quot;, temp_a, temp_b); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P042.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P042.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P042_c', 'P042.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P042_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P042.c"> - <pre><code class="language-c">/* Write a program to accept a number and check whether the number -is twisted prime or not. */ -/* Author - Amit Dutta, Date - 27th OCT, 2025 */ - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int main() -{ - int n, t, i, r, rev, prime = 1; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for (i = 2; i &lt;= (int)sqrt(n); i++) - { - if (n % i == 0) - { - prime = 0; - break; - } - } - if (prime) - { - printf(&quot;%d is a prime number.&quot;, n); - t = n; - rev = 0; - prime = 1; - while (t &gt; 0) - { - r = t % 10; - rev = rev * 10 + r; - t = t / 10; - } - for (i = 2; i &lt;= (int)sqrt(rev); i++) - { - if (rev % i == 0) - { - prime = 0; - break; - } - } - if (prime) - { - printf(&quot;\n%d and %d are prime numbers.. TWISTED PRIME&quot;, n, rev); - } - else - { - printf(&quot;\n%d is non prime&quot;, rev); - } - } - else - { - printf(&quot;\n%d is non prime.&quot;, n); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P043.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P043.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P043_c', 'P043.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P043_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P043.c"> - <pre><code class="language-c">/* Write a program to check palindrome number. */ -/* Author - Amit Dutta, Date - 27th OCT, 2025 */ - -#include &lt;stdio.h&gt; -int main() -{ - int num, temp, rev; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - temp = num; - rev = 0; - while (temp &gt; 0) - { - rev = (rev * 10) + (temp % 10); - temp /= 10; - } - if (num == rev) - { - printf(&quot;%d is a palindrome number.&quot;, num); - } - else - { - printf(&quot;%d is not a palindrome number.&quot;, num); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P044.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P044.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P044_c', 'P044.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P044_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P044.c"> - <pre><code class="language-c">/* Write a program to input a number and check whether the -number is Pronic number or not. - Pronic Number: The number which is the product of two numbers - which is the product of two consecutive integer. - Ex: 20 = 4 * 5 -*/ -/* Author - Amit Dutta, Date - 27th OCT, 2025 */ - -// using boolean... -/* -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; -#include &lt;stdbool.h&gt; - -int main() -{ - int num, iterationIndex; - bool isPronic = false; - printf(&quot;Enter the number : &quot;); - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nYou have to enter a number, not an character or symbol.&quot;); - return 1; - } - if (num &lt; 1) - { - printf(&quot;\nOnly postive number is allowed.&quot;); - return 1; - } - for (iterationIndex = 1; iterationIndex &lt;= num / 2; iterationIndex++) - { - if (iterationIndex * (iterationIndex + 1) == num) - { - printf(&quot;\nInput %d is a Pronic Number.&quot;, num); - isPronic = true; - break; - } - } - if(!isPronic) - { - printf(&quot;\nInput %d is not a Pronic Number.&quot;, num); - } - return 0; -} -*/ - -// using direct return method (more efficient and generally preferred)... - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int main() -{ - int num, iterationIndex, iterationLimit; - printf(&quot;Enter the number : &quot;); - if (scanf(&quot;%d&quot;, &amp;num) != 1) - { - printf(&quot;\nYou have to enter a number, not an character or symbol.&quot;); - return 1; - } - if (num &lt; 1) - { - printf(&quot;\nOnly postive number is allowed.&quot;); - return 1; - } - iterationLimit = (int)sqrt(num); - for (iterationIndex = 1; iterationIndex &lt;= iterationLimit; iterationIndex++) - { - if (iterationIndex * (iterationIndex + 1) == num) - { - printf(&quot;\nInput %d is a Pronic Number.&quot;, num); - return 0; - } - } - printf(&quot;\nInput %d is not a Pronic Number.&quot;, num); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P045.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P045.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P045_c', 'P045.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P045_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P045.c"> - <pre><code class="language-c">/* Make this pattern for input n. - Pattern : - 1 - 1 2 - 1 2 3 - 1 2 3 4 - 1 2 3 4 5 -*/ -/* Author - Amit Dutta, Date - 01st NOVEMBER, 2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int i, j, n; - printf(&quot;Enter n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for (i = 1; i &lt;= n; i++) - { - for (j = 1; j &lt;= i; j++) - { - printf(&quot;%d\t&quot;, j); - } - printf(&quot;\n&quot;); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P046.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P046.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P046_c', 'P046.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P046_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P046.c"> - <pre><code class="language-c">/* Make this pattern for input n. - Pattern : - 1 - 2 1 - 3 2 1 - 4 3 2 1 - 5 4 3 2 1 -*/ -/* Author - Amit Dutta, Date - 01st NOVEMBER, 2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int i, j, n; - printf(&quot;Enter n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for (i = 1; i &lt;= n; i++) - { - for (j = i; j &gt;= 1; j--) - { - printf(&quot;%d\t&quot;, j); - } - printf(&quot;\n&quot;); - } - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P047.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P047.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P047_c', 'P047.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P047_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P047.c"> - <pre><code class="language-c">/* Make this pattern for input n. - Pattern : - 5 - 5 4 - 5 4 3 - 5 4 3 2 - 5 4 3 2 1 -*/ -/* Author - Amit Dutta, Date - 01st NOVEMBER, 2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int i, j, n; - printf(&quot;Enter n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for (i = n; i &gt;= 1; i--) - { - for (j = n; j &gt;= i; j--) - { - printf(&quot;%d\t&quot;, j); - } - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P048.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P048.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P048_c', 'P048.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P048_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P048.c"> - <pre><code class="language-c">/* Make this pattern for input n no of row. - Pattern : - 1 - 2 3 - 4 5 6 - 7 8 9 10 - 11 12 13 14 15 -*/ -/* Author - Amit Dutta, Date - 01st NOVEMBER, 2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int i, j, n, temp = 1; - printf(&quot;Enter row number : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for (i = 1; i &lt;= n; i++) - { - for (j = 1; j &lt;= i; j++) - { - printf(&quot;%d\t&quot;, temp); - temp++; - } - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P049.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P049.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P049_c', 'P049.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P049_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P049.c"> - <pre><code class="language-c">/* Make this pattern for input n no of row. - Pattern : - # - @ @ - # # # - @ @ @ @ - # # # # # - */ -/* Author - Amit Dutta, Date - 01st NOVEMBER, 2025 */ - -#include &lt;stdio.h&gt; - -int main() -{ - int i, j, n; - char a = &#x27;#&#x27;, b = &#x27;@&#x27;; - printf(&quot;Enter row number : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for (i = 1; i &lt;= n; i++) - { - for (j = 1; j &lt;= i; j++) - { - if (i % 2 == 0) - printf(&quot;%c\t&quot;, b); - else - printf(&quot;%c\t&quot;, a); - } - printf(&quot;\n&quot;); - } - return 0; -} -</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P050-SHORT.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P050-SHORT.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P050-SHORT_c', 'P050-SHORT.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P050-SHORT_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P050-SHORT.c"> - <pre><code class="language-c">/* Write a program to input a number and check whether it is Disarium Number or not. - Note : A number is said to Disarium if sum of its digit powered by with their - respective position is equal to the original number. */ -/* Author - Amit Dutta, Date - 08th November, 2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int main() -{ - int num; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - int position = printf(&quot;%d&quot;, num); - int temp = num; - int res = 0; - while (temp &gt; 0) - { - res += (int)pow(temp % 10, position); - position--; - temp /= 10; - } - if (res == num) - printf(&quot; is a Disarium Number.&quot;); - else - printf(&quot; is Not a Disarium Number.&quot;); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P050.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P050.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P050_c', 'P050.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P050_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P050.c"> - <pre><code class="language-c">/* Write a program to input a number and check whether it is Disarium Number or not. - Note : A number is said to Disarium if sum of its digit powered by with their - respective position is equal to the original number. */ -/* Author - Amit Dutta, Date - 08th November, 2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; -#include &lt;math.h&gt; - -int main() -{ - int num, res = 0, temp, position = 0; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;num); - temp = num; - while (temp &gt; 0) - { - position++; - temp /= 10; - } - temp = num; - while (temp &gt; 0) - { - res += (int)pow(temp % 10, position); - position--; - temp /= 10; - } - if (res == num) - printf(&quot;\nInput %d is a Disarium Number.&quot;, num); - else - printf(&quot;\nInput %d is Not a Disarium Number.&quot;, num); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P051.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P051.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P051_c', 'P051.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P051_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P051.c"> - <pre><code class="language-c">/* Write a program to input two number and check whether they are Amicable Pair or not - Example : Sum of Proper Divisors of 220 (1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110) = 284 - Sum of Proper Divisors of 284 (1, 2, 4, 71, 142) = 220 */ -/* Author - Amit Dutta, Date - 09th November, 2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - int a, b, i, sa = 0, sb = 0; - printf(&quot;Enter two number : &quot;); - scanf(&quot;%d %d&quot;, &amp;a, &amp;b); - for (i = 1; i &lt;= a / 2; i++) - if (a % i == 0) - sa += i; - for (i = 1; i &lt;= b / 2; i++) - if (b % i == 0) - sb += i; - if (sa == b &amp;&amp; sb == a) - printf(&quot;\nInput %d and %d is Amicable Pair.&quot;, a, b); - else - printf(&quot;\nInput %d and %d is Not Amicable Pair.&quot;, a, b); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P052.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P052.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P052_c', 'P052.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P052_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P052.c"> - <pre><code class="language-c">/* Print the sum of this series for upto n element. - Series: 1 + (1 + 2) + (1 + 2 + 3) + (1 + 2 + 3 + 4) + ... + (1 + 2 + 3 + ... + n) */ -/* Author - Amit Dutta, Date - 09th November, 2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - int n, sum = 0, temp = 0, i; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - for (i = 1; i &lt;= n; i++) - { - temp += i; - sum += temp; - } - printf(&quot;%d&quot;, sum); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P053.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P053.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P053_c', 'P053.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P053_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P053.c"> - <pre><code class="language-c">/* Print all pattern */ -/* Author - Amit Dutta, Date - 09th November, 2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int main() -{ - int i, j, temp; - - printf(&quot;\n\nPattern 1 : \n\n&quot;); - /* - 9 9 9 9 9 - 7 7 7 7 7 - 5 5 5 5 5 - 3 3 3 3 3 - 1 1 1 1 1 - */ - temp = 9; - for (i = 1; i &lt;= 5; i++) - { - for (j = 1; j &lt;= 5; j++) - { - printf(&quot;%d &quot;, temp); - } - printf(&quot;\n&quot;); - temp -= 2; - } - - // Another method print above pattern - printf(&quot;\n\nPattern 1 : \n\n&quot;); - for (i = 9; i &gt;= 1; i -= 2) - { - for (j = 1; j &lt;= 5; j++) - { - printf(&quot;%d &quot;, i); - } - printf(&quot;\n&quot;); - } - - printf(&quot;\n\nPattern 2 : \n\n&quot;); - /* - 1 2 3 4 5 - 1 2 3 4 5 - 1 2 3 4 5 - */ - for (i = 1; i &lt;= 3; i++) - { - for (j = 1; j &lt;= 5; j++) - { - printf(&quot;%d &quot;, j); - } - printf(&quot;\n&quot;); - } - - printf(&quot;\n\nPattern 3 : \n\n&quot;); - /* - 5 4 3 2 1 - 5 4 3 2 1 - */ - for (i = 1; i &lt;= 2; i++) - { - for (j = 5; j &gt;= 1; j--) - { - printf(&quot;%d &quot;, j); - } - printf(&quot;\n&quot;); - } - - printf(&quot;\n\nPattern 4 : \n\n&quot;); - /* - 1 2 3 4 - 5 6 7 8 - 9 10 11 12 - */ - temp = 1; - for (i = 1; i &lt;= 3; i++) - { - for (j = 1; j &lt;= 4; j++) - { - printf(&quot;%d &quot;, temp); - temp++; - } - printf(&quot;\n&quot;); - } - - printf(&quot;\n\nPattern 5 : \n\n&quot;); - /* - 1 2 3 4 - 4 8 12 16 - 1 2 3 4 - 4 8 12 16 - 1 2 3 4 - */ - for (i = 1; i &lt;= 5; i++) - { - for (j = 1; j &lt;= 4; j++) - { - if (i % 2 == 0) - printf(&quot;%d &quot;, j * 4); - else - printf(&quot;%d &quot;, j); - } - printf(&quot;\n&quot;); - } - - printf(&quot;\n\nPattern 6 : \n\n&quot;); - /* - 1 - 2 4 - 3 5 7 - 6 8 10 12 - 9 11 13 15 17 - */ - int odd = 1, even = 2; - for (i = 1; i &lt;= 5; i++) - { - for (j = 1; j &lt;= i; j++) - { - if (i % 2 == 0) - { - printf(&quot;%d &quot;, even); - even += 2; - } - else - { - printf(&quot;%d &quot;, odd); - odd += 2; - } - } - printf(&quot;\n&quot;); - } - - printf(&quot;\n\nPattern 7 : \n\n&quot;); - /* - 1 2 3 4 5 - 6 7 8 9 - 10 11 12 - 13 14 - 15 - */ - temp = 1; - for (i = 5; i &gt;= 1; i--) - { - for (j = 1; j &lt;= i; j++) - { - printf(&quot;%d &quot;, temp); - temp++; - } - printf(&quot;\n&quot;); - } - - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P054.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P054.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P054_c', 'P054.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P054_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P054.c"> - <pre><code class="language-c">/* WAP to check Krishnamurty number using user defined methods/functions. */ -/* Author - Amit Dutta, Date - 15th November, 2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -int fact(int); -int isKrishnamurty(int); - -int fact(int n) -{ - int fact = 1, i; - for (i = 1; i &lt;= n; i++) - fact *= i; - return fact; -} - -int isKrishnamurty(int n) -{ - int temp = n, sum = 0; - while (temp &gt; 0) - { - sum += fact(temp % 10); - temp /= 10; - } - return n == sum; -} - -int main() -{ - int n; - printf(&quot;Enter the number : &quot;); - scanf(&quot;%d&quot;, &amp;n); - if (isKrishnamurty(n)) - printf(&quot;\nInput %d is a Krishnamurty Number.&quot;, n); - else - printf(&quot;\nInput %d is not a Krishnamurty number.&quot;, n); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P055.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P055.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P055_c', 'P055.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P055_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P055.c"> - <pre><code class="language-c">/* WAP to print n terms of Fibbonacci Series (Starting from term 0) */ -/* Author - Amit Dutta, Date - 15th November, 2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -void printFibonacci(int); - -void printFibonacci(int n) -{ - int val1 = 0, val2 = 1, val3, i; - printf(&quot;\nFibonacci series upto %d terms :&quot;, n); - if (n &lt; 0) - printf(&quot; N/A&quot;); - if (n == 0) - printf(&quot; %d&quot;, val1); - if (n &gt; 0) - printf(&quot; %d %d&quot;, val1, val2); - for (i = 2; i &lt;= n; i++) - { - val3 = val1 + val2; - printf(&quot; %d&quot;, val3); - val1 = val2; - val2 = val3; - } -} - -int main() -{ - int n; - printf(&quot;Enter the n : &quot;); - scanf(&quot;%d&quot;, &amp;n); - printFibonacci(n); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P056.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P056.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P056_c', 'P056.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P056_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P056.c"> - <pre><code class="language-c">/* WAP to swap the value of a and b using user defined method. */ -/* Author - Amit Dutta, Date - 22th November, 2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -void swap(int *a, int *b) -{ - int temp = *a; - *a = *b; - *b = temp; -} - -int main() -{ - int a, b; - printf(&quot;Enter A and B: &quot;); - scanf(&quot;%d %d&quot;, &amp;a, &amp;b); - printf(&quot;\nBefore swap A: %d, B: %d&quot;, a, b); - swap(&amp;a, &amp;b); - printf(&quot;\nAfter swap A: %d, B: %d&quot;, a, b); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P057.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P057.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P057_c', 'P057.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P057_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P057.c"> - <pre><code class="language-c">/* WAP to display the series using user defined method. - 0, 7, 26, 63, ... upto n terms using void series(int n) -*/ -/* Author - Amit Dutta, Date - 22th November, 2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -void series(int n) -{ - int i; - printf(&quot;\nSeries: &quot;); - for (i = 1; i &lt;= n; i++) - printf(&quot;%d &quot;, (i * i * i) - 1); -} - -int main() -{ - int n; - printf(&quot;Enter n: &quot;); - scanf(&quot;%d&quot;, &amp;n); - series(n); - return 0; -}</code></pre> - </div> - </li> - - <li> - <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> - <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> - <span class="text-gray-700">P058.c</span> - <div class="ml-auto flex items-center space-x-4"> - <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P058.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> - <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> - </a> - <button onclick="showCode('code-tuition-c-P058_c', 'P058.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> - </div> - </div> - <div id="code-tuition-c-P058_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P058.c"> - <pre><code class="language-c">/* WAP to display ASCII code of Alphabets (A - Z) using void displayASCII() */ -/* Author - Amit Dutta, Date - 22th November, 2025 */ - -// This code has not been compiled. -// If you find any issues, please create a new issue on GitHub regarding them. -// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues - -#include &lt;stdio.h&gt; - -void displayASCII() -{ - int i; - printf(&quot;ASCII Code\t\tCharacter&quot;); - for (i = &#x27;A&#x27;; i &lt;= &#x27;Z&#x27;; i++) - printf(&quot;\n%c\t\t%d&quot;, i, i); -} - -int main() -{ - displayASCII(); - return 0; -}</code></pre> - </div> - </li> - </ul> - </div> - </li> - </ul> - </div> - </div> - <!-- END INITIAL FILE LIST --> - </div> - <footer class="text-center py-4 bg-gray-50 border-t"> - <p class="text-sm text-gray-500"> - This page is an index for the - <a - href="https://github.com/notamitgamer/bsc" - class="text-blue-600 hover:underline" - >bsc repository</a - >. - </p> - </footer> - </div> - </div> - - <!-- Code Viewer Modal (Enhanced Design) --> - <div - id="code-modal" - class="fixed inset-0 bg-gray-900 bg-opacity-95 flex items-center justify-center p-2 md:p-4 hidden z-50" - > - <div - class="bg-gray-800 text-gray-100 rounded-lg shadow-2xl w-full max-w-5xl modal-content-area flex flex-col" - > - <!-- Modal Header --> - <div - class="flex items-center justify-between p-3 md:p-4 border-b border-gray-700 bg-gray-900 rounded-t-lg flex-shrink-0" - > - <h3 - id="modal-filename" - class="text-sm md:text-lg font-mono text-gray-300 truncate" - ></h3> - <div class="flex items-center space-x-2 md:space-x-3"> - <!-- Share Button --> - <button - id="share-btn" - class="bg-gray-700 text-gray-200 p-2 rounded-md hover:bg-gray-600 relative transition-colors" - title="Share file link (Copies GitHub URL if sharing is unavailable)" - > - <svg - class="w-4 h-4 md:w-5 md:h-5" - fill="none" - stroke="currentColor" - viewBox="0 0 24 24" - xmlns="http://www.w3.org/2000/svg" - id="share-icon-default" - > - <path - stroke-linecap="round" - stroke-linejoin="round" - stroke-width="2" - d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8m-4-6l-4-4-4 4m4-4v13" - ></path> - </svg> - <svg - class="w-4 h-4 md:w-5 md:h-5 absolute inset-0 m-auto hidden text-green-400" - id="share-icon-success" - fill="none" - stroke="currentColor" - viewBox="0 0 24 24" - xmlns="http://www.w3.org/2000/svg" - > - <path - stroke-linecap="round" - stroke-linejoin="round" - stroke-width="2" - d="M5 13l4 4L19 7" - ></path> - </svg> - </button> - <!-- Copy Button --> - <button - id="copy-code-btn" - class="bg-gray-700 text-gray-200 p-2 rounded-md hover:bg-gray-600 relative transition-colors" - title="Copy code to clipboard" - > - <svg - xmlns="http://www.w3.org/2000/svg" - width="16" - height="16" - fill="currentColor" - class="bi bi-copy w-4 h-4 md:w-5 md:h-5" - viewBox="0 0 16 16" - id="copy-icon-default" - > - <path - fill-rule="evenodd" - d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z" - /> - </svg> - <svg - class="w-4 h-4 md:w-5 md:h-5 absolute inset-0 m-auto hidden text-green-400" - id="copy-icon-success" - fill="none" - stroke="currentColor" - viewBox="0 0 24 24" - xmlns="http://www.w3.org/2000/svg" - > - <path - stroke-linecap="round" - stroke-linejoin="round" - stroke-width="2" - d="M5 13l4 4L19 7" - ></path> - </svg> - </button> - <!-- Close Button --> - <button - onclick="hideCode()" - class="text-gray-400 hover:text-white text-2xl md:text-3xl leading-none" - > - &times; - </button> - </div> - </div> - <!-- Modal Body: Code Content --> - <div id="modal-body" class="overflow-y-auto flex-grow"> - <div id="modal-code-container" class="rounded-b-lg"> - <!-- Code will be injected here --> - </div> - </div> - </div> - </div> - - <script> - function toggleFolder(folderName) { - const content = document.getElementById(`folder-${folderName}`); - const chevron = document.getElementById(`chevron-${folderName}`); - - if (content.classList.contains("hidden")) { - content.classList.remove("hidden"); - chevron.classList.add("rotated"); - } else { - content.classList.add("hidden"); - chevron.classList.remove("rotated"); - } - } - - const modal = document.getElementById("code-modal"); - const modalFilename = document.getElementById("modal-filename"); - const modalCodeContainer = document.getElementById( - "modal-code-container" - ); - - const copyBtn = document.getElementById("copy-code-btn"); - const copyIconDefault = document.getElementById("copy-icon-default"); - const copyIconSuccess = document.getElementById("copy-icon-success"); - - const shareBtn = document.getElementById("share-btn"); - const shareIconDefault = document.getElementById("share-icon-default"); - const shareIconSuccess = document.getElementById("share-icon-success"); - - let currentFileUrl = ""; - - // --- SEARCH IMPLEMENTATION --- - - // Global state for the search index - let fileSearchIndex = []; - let activeSearchTerm = ""; - let indexBuilt = false; // Flag for lazy indexing - - /** - * Builds the search index from all hidden code blocks on the page. - * This should be called only once. - */ - function buildSearchIndex() { - if (indexBuilt) return; - console.log("Building search index..."); - const codeBlocks = document.querySelectorAll('[id^="code-"]'); - codeBlocks.forEach((block) => { - const id = block.id; - let filename = id.split("-").slice(2).join("-").replace(/_/g, "."); - // Handle path structure - if ( - block.dataset.githubUrl && - block.dataset.githubUrl.includes("/main/") - ) { - filename = block.dataset.githubUrl - .split("/") - .pop() - .replace(/%20/g, " "); // Decode URL for filename - } else if (filename.includes(".")) { - filename = filename.split("/").pop(); - } - - const preElement = block.querySelector("pre"); - const codeElement = block.querySelector("code"); - - if (preElement && codeElement) { - fileSearchIndex.push({ - id: id, - // Use the path after /main/ - path: block.dataset.githubUrl.split("/main/")[1] || filename, - name: filename, - content: codeElement.textContent, - lines: codeElement.textContent.split("\n"), - language: codeElement.className.split("-").pop(), - }); - } - }); - indexBuilt = true; - console.log(`Search index built with ${fileSearchIndex.length} files.`); - // Re-run search if user was already typing - if (activeSearchTerm.length >= 2) { - handleSearch(); - } - } - - /** - * Clears the search input and restores the initial file list. - */ - function clearSearch() { - document.getElementById("search-input").value = ""; - activeSearchTerm = ""; - document.getElementById("clear-search-btn").classList.add("hidden"); - document.getElementById("initial-file-list").classList.remove("hidden"); - document - .getElementById("search-results-container") - .classList.add("hidden"); - - // Reset placeholders - document.getElementById("result-file-list").innerHTML = - '<p id="search-placeholder" class="text-sm text-gray-500">Start typing to see file matches...</p>'; - document.getElementById("result-code-matches").innerHTML = - '<p id="code-match-placeholder" class="text-sm text-gray-500">Select a file from the left to view matching code lines, or refine your search.</p>'; - document.getElementById("result-count").textContent = "0"; - } - - /** - * Handles the search input event, managing visibility and filtering. - */ - function handleSearch() { - const inputElement = document.getElementById("search-input"); - const query = inputElement.value.trim(); - activeSearchTerm = query; - const initialList = document.getElementById("initial-file-list"); - const resultsContainer = document.getElementById( - "search-results-container" - ); - const codeMatchesContainer = document.getElementById( - "result-code-matches" - ); - const clearBtn = document.getElementById("clear-search-btn"); - - // Toggle clear button visibility - if (query.length > 0) { - clearBtn.classList.remove("hidden"); - // Trigger lazy index build on first meaningful interaction - buildSearchIndex(); - } else { - clearBtn.classList.add("hidden"); - } - - // Clear code matches and placeholder when a new search starts - codeMatchesContainer.innerHTML = - '<p id="code-match-placeholder" class="text-sm text-gray-500">Select a file from the left to view matching code lines, or refine your search.</p>'; - - if (query.length < 2 || !indexBuilt) { - initialList.classList.remove("hidden"); - resultsContainer.classList.add("hidden"); - document.getElementById("result-file-list").innerHTML = - '<p id="search-placeholder" class="text-sm text-gray-500">Start typing to see file matches...</p>'; - document.getElementById("result-count").textContent = "0"; - return; - } - - initialList.classList.add("hidden"); - resultsContainer.classList.remove("hidden"); - - const lowerQuery = query.toLowerCase(); - - const results = fileSearchIndex.filter( - (file) => - file.name.toLowerCase().includes(lowerQuery) || - file.path.toLowerCase().includes(lowerQuery) || - file.content.toLowerCase().includes(lowerQuery) - ); - - displayFileResults(results); - } - - /** - * Displays the list of files that match the search query (WhatsApp contact list analogy). - */ - function displayFileResults(results) { - const fileListContainer = document.getElementById("result-file-list"); - const resultCount = document.getElementById("result-count"); - - resultCount.textContent = results.length; - fileListContainer.innerHTML = ""; - - if (results.length === 0) { - fileListContainer.innerHTML = - '<p class="text-sm text-gray-500">No files matched your search term in name or content.</p>'; - return; - } - - const lowerQuery = activeSearchTerm.toLowerCase(); - // Safe regex for highlighting matches - const regex = new RegExp( - `(${activeSearchTerm.replace( - /([.*+?^=!:${}()|\[\]\/\\])/g, - "\\$1" - )})`, - "gi" - ); - - results.forEach((file) => { - // Decode file name/path for display before highlighting - const decodedPath = decodeURIComponent(file.path); - const decodedName = decodeURIComponent(file.name); - - const displayName = decodedName.replace( - regex, - '<span class="bg-yellow-200 font-semibold rounded-sm">$1</span>' - ); - const displayPath = decodedPath.replace( - regex, - '<span class="bg-yellow-200 font-semibold rounded-sm">$1</span>' - ); - - const listItem = document.createElement("div"); - // Add 'active' class capability - listItem.className = - "search-file-item p-3 rounded-lg shadow-sm cursor-pointer hover:bg-blue-100 transition-colors duration-150 border border-gray-200"; - listItem.setAttribute("data-file-id", file.id); - listItem.innerHTML = `<p class="font-mono text-xs text-blue-600">${displayPath}</p><p class="text-sm font-medium text-gray-800">${displayName}</p>`; - - listItem.onclick = () => { - // Remove 'active' state from all others, add to current - document - .querySelectorAll(".search-file-item") - .forEach((el) => el.classList.remove("active")); - listItem.classList.add("active"); - displayCodeMatches(file); - }; - - fileListContainer.appendChild(listItem); - }); - } - - /** - * Displays the actual code lines that contain the search term for a selected file. - */ - function displayCodeMatches(file) { - const codeMatchesContainer = document.getElementById( - "result-code-matches" - ); - codeMatchesContainer.innerHTML = ""; - const query = activeSearchTerm.toLowerCase(); - const regex = new RegExp( - `(${activeSearchTerm.replace( - /([.*+?^=!:${}()|\[\]\/\\])/g, - "\\$1" - )})`, - "gi" - ); - - // Title/Header for the Code Matches container - const header = document.createElement("div"); - header.className = - "sticky top-0 bg-white p-2 border-b mb-4 -mt-4 -mx-4 z-10 rounded-t-xl"; - - const resultsList = document.createElement("div"); - resultsList.className = "space-y-4 pt-2"; - - let matchCount = 0; - - file.lines.forEach((line, index) => { - if (line.toLowerCase().includes(query)) { - matchCount++; - - const highlightedLine = line.replace( - regex, - '<span class="bg-yellow-300 rounded-sm font-semibold">$1</span>' - ); - - const matchItem = document.createElement("div"); - matchItem.className = "code-match-line"; - matchItem.innerHTML = ` - <div class="text-blue-500 mb-1">Line ${index + 1}:</div> - <div class="text-gray-700">${highlightedLine}</div> - `; - resultsList.appendChild(matchItem); - } - }); - - // Update header with file info and match count - header.innerHTML = ` - <h3 class="text-base font-semibold text-gray-800">${decodeURIComponent( - file.name - )}</h3> - <p class="text-xs text-gray-500">${decodeURIComponent( - file.path - )} &mdash; <span class="text-green-600 font-semibold">${matchCount} matches</span></p> - `; - codeMatchesContainer.appendChild(header); - - if (matchCount > 0) { - codeMatchesContainer.appendChild(resultsList); - } else { - // Show message if search term matches filename/path but not content (rare, but possible) - codeMatchesContainer.innerHTML += - '<p class="text-sm text-gray-500 mt-4">No specific content matches found for this file, but the name/path matched the keyword.</p>'; - } - - // *** View Full Code Button *** - const viewFullCodeButton = document.createElement("button"); - viewFullCodeButton.className = - "mt-6 w-full bg-blue-600 text-white font-semibold py-3 rounded-lg hover:bg-blue-700 transition-colors shadow-lg"; - viewFullCodeButton.textContent = `View Full Code for ${decodeURIComponent( - file.name - )}`; - viewFullCodeButton.onclick = () => { - showCode(file.id, decodeURIComponent(file.name)); // Reuses the existing showCode modal logic - }; - codeMatchesContainer.appendChild(viewFullCodeButton); - } - - // --- END SEARCH IMPLEMENTATION --- - - /** - * Shows a successful copy animation on a button. - */ - function animateSuccess(button, defaultIcon, successIcon) { - defaultIcon.classList.add("hidden"); - successIcon.classList.remove("hidden"); - - button.classList.add("btn-success-pulse"); - button.classList.remove("bg-gray-700", "hover:bg-gray-600"); - - setTimeout(() => { - successIcon.classList.add("hidden"); - defaultIcon.classList.remove("hidden"); - button.classList.remove("btn-success-pulse"); - button.classList.add("bg-gray-700", "hover:bg-gray-600"); - }, 2000); - } - - function showCode(codeBlockId, filename) { - const codeBlock = document.getElementById(codeBlockId); - if (codeBlock) { - modalFilename.textContent = filename; - - // Clone the content to avoid issues with highlight.js re-running - const codeContentClone = codeBlock - .querySelector("pre") - .cloneNode(true); - modalCodeContainer.innerHTML = ""; // Clear previous content - modalCodeContainer.appendChild(codeContentClone); - - currentFileUrl = codeBlock.dataset.githubUrl || ""; - - // The highlight.js class is already on the code element in the clone - hljs.highlightElement(modalCodeContainer.querySelector("code")); - - modal.classList.remove("hidden"); - document.body.style.overflow = "hidden"; - - // Focus the modal content for better accessibility (optional) - modalCodeContainer.querySelector("pre").focus(); - } - } - - function hideCode() { - modal.classList.add("hidden"); - document.body.style.overflow = "auto"; - } - - copyBtn.addEventListener("click", () => { - const codeToCopy = modalCodeContainer.querySelector("code").innerText; - navigator.clipboard.writeText(codeToCopy).then( - () => { - animateSuccess(copyBtn, copyIconDefault, copyIconSuccess); - }, - (err) => { - console.error("Failed to copy text: ", err); - } - ); - }); - - shareBtn.addEventListener("click", async () => { - if (!currentFileUrl) return; - - const shareData = { - title: modalFilename.textContent, - text: `Check out the code for ${modalFilename.textContent}`, - url: currentFileUrl, - }; - - if (navigator.share) { - try { - await navigator.share(shareData); - } catch (err) { - if (err.name !== "AbortError") { - console.error("Share failed:", err.message); - } - } - } else { - navigator.clipboard.writeText(currentFileUrl).then(() => { - animateSuccess(shareBtn, shareIconDefault, shareIconSuccess); - }); - } - }); - - document.addEventListener("keydown", (e) => { - const searchInput = document.getElementById("search-input"); - - // 1. ESCAPE key closes modal - if (e.key === "Escape" && !modal.classList.contains("hidden")) { - hideCode(); - return; - } - - // 2. '/' key focuses search bar - // Check if the key is '/', the modal is not open, and the current focus is not an input field - if ( - e.key === "/" && - modal.classList.contains("hidden") && - !/^(INPUT|TEXTAREA|SELECT)$/i.test(document.activeElement.tagName) - ) { - // Prevent the '/' character from being typed outside the input field - e.preventDefault(); - searchInput.focus(); - } - }); - - // Initial action: Lazy index building - // We don't call buildSearchIndex on load anymore. - // It's called on the first time the user types. - // This prioritizes page load speed. - </script> - </body> -</html> +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>notamitgamer/bsc Repository File Index</title> + <script src="https://cdn.tailwindcss.com"></script> + <link + href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" + rel="stylesheet" + /> + <link + rel="stylesheet" + href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" + /> + <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> + + <style> + body { + font-family: "Inter", sans-serif; + } + .chevron.rotated { + transform: rotate(180deg); + } + + /* --- Enhanced Code Viewer Modal Styles --- */ + #code-modal .modal-content-area { + /* Ensure the code viewer takes up maximum available height */ + height: 90vh; + max-height: 90vh; + } + #modal-code-container { + /* Remove default padding from the outer container */ + padding: 0; + flex-grow: 1; /* Allow the container to fill space */ + display: flex; /* Flex context for pre element */ + } + #modal-code-container pre { + /* Full width and height inside its container */ + width: 100%; + height: 100%; + margin: 0; + padding: 1rem; /* Padding inside the code block */ + overflow: auto; + /* Custom background and border to look more like a proper viewer */ + background-color: #1e1e1e; /* Darker background for code */ + border-radius: 0 0 0.5rem 0.5rem; + line-height: 1.4; + } + /* --- End Code Viewer Modal Styles --- */ + + /* Animation for success feedback */ + .btn-success-pulse { + background-color: #10b981 !important; /* Tailwind green-500 */ + box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); /* green-500 with opacity */ + animation: pulse-success 0.5s ease-out; + } + @keyframes pulse-success { + 0% { + box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); + } + 50% { + box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); + } + 100% { + box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); + } + } + /* Ensure code display is readable */ + .code-match-line { + background-color: #f3f4f6; + padding: 0.75rem; + border-radius: 0.5rem; + font-size: 0.75rem; /* text-xs */ + font-family: monospace; + white-space: pre-wrap; + word-break: break-all; + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05); + } + + /* Active state for search results */ + .search-file-item.active { + background-color: #dbeafe; /* Blue-100 */ + border-color: #60a5fa; /* Blue-400 */ + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), + 0 2px 4px -1px rgba(0, 0, 0, 0.06); + } + </style> + </head> + <body class="bg-gray-100"> + <div class="container mx-auto px-4 py-8 md:py-16"> + <div + class="max-w-4xl mx-auto bg-white rounded-2xl shadow-lg overflow-hidden" + > + <div class="p-4 md:p-8"> + <div class="text-center mb-8"> + <h1 class="text-3xl md:text-4xl font-bold text-gray-800"> + notamitgamer/bsc Repository Contents + </h1> + <p class="text-gray-500 mt-2 text-sm md:text-base"> + A quick navigation guide to the files in the repository. <br /> + <b + >For optimal viewing and experience, please use a desktop + browser.</b + > + </p> + <p class="text-gray-500 mt-2 text-sm md:text-base"> + GitHub Repository URL: + <a + href="https://github.com/notamitgamer/bsc" + class="text-blue-600 hover:underline" + >https://github.com/notamitgamer/bsc</a + > + </p> + </div> + + <!-- SEARCH BAR (Enhanced with Icon and Clear Button) --> + <div class="mb-8 relative"> + <div + class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" + > + <!-- Search Icon --> + <svg + class="w-5 h-5 text-gray-400" + fill="none" + stroke="currentColor" + viewBox="0 0 24 24" + xmlns="http://www.w3.org/2000/svg" + > + <path + stroke-linecap="round" + stroke-linejoin="round" + stroke-width="2" + d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" + ></path> + </svg> + </div> + <input + type="text" + id="search-input" + placeholder="Search files by name or content keywords (Press '/' to focus)" + class="w-full p-3 pl-10 pr-10 border-2 border-gray-300 rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500 transition duration-150" + oninput="handleSearch()" + autocomplete="off" + /> + <!-- Clear Button --> + <button + id="clear-search-btn" + onclick="clearSearch()" + class="absolute inset-y-0 right-0 pr-3 flex items-center focus:outline-none hidden" + title="Clear Search" + > + <svg + class="w-5 h-5 text-gray-400 hover:text-gray-600 transition-colors" + fill="none" + stroke="currentColor" + viewBox="0 0 24 24" + xmlns="http://www.w3.org/2000/svg" + > + <path + stroke-linecap="round" + stroke-linejoin="round" + stroke-width="2" + d="M6 18L18 6M6 6l12 12" + ></path> + </svg> + </button> + </div> + <!-- END SEARCH BAR --> + + <!-- SEARCH RESULTS SECTION (Mobile responsive layout) --> + <div id="search-results-container" class="hidden mb-8"> + <h2 class="text-lg font-semibold text-gray-700 border-b pb-2 mb-4"> + Search Results (<span id="result-count">0</span> files) + </h2> + <div + class="flex flex-col md:flex-row space-y-4 md:space-y-0 md:space-x-4" + > + <!-- 1. File List (Wider on mobile, 1/3 on desktop) --> + <div + id="result-file-list" + class="w-full md:w-1/3 space-y-2 border rounded-xl p-4 bg-gray-50 max-h-[50vh] md:max-h-[60vh] overflow-y-auto" + > + <p id="search-placeholder" class="text-sm text-gray-500"> + Start typing to see file matches... + </p> + </div> + <!-- 2. Code Match Display (Wider on mobile, 2/3 on desktop) --> + <div + id="result-code-matches" + class="w-full md:w-2/3 border rounded-xl p-4 bg-white shadow-inner max-h-[50vh] md:max-h-[60vh] overflow-y-auto relative" + > + <p id="code-match-placeholder" class="text-sm text-gray-500"> + Select a file from the left to view matching code lines, or + refine your search. + </p> + </div> + </div> + </div> + <!-- END SEARCH RESULTS SECTION --> + + <!-- INITIAL FILE LIST (Hidden when searching) --> + <div id="initial-file-list"> + <div class="space-y-4"> + <h2 class="text-lg font-semibold text-gray-700 border-b pb-2"> + Files and Folders + </h2> + <ul class="space-y-3"> + + <li class="border rounded-lg overflow-hidden"> + <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('assignment')"> + <div class="flex items-center justify-between"> + <div class="flex items-center"> + <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> + <span class="font-medium text-gray-800">assignment</span> + <span class="ml-2 text-sm text-gray-500">(5 files)</span> + </div> + <div class="flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/tree/main/assignment" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <div class="chevron" id="chevron-assignment"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> + </div> + </div> + </div> + <div class="folder-content hidden bg-white" id="folder-assignment"> + <ul class="divide-y divide-gray-200"> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">assignment01.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment01.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-assignment-assignment01_c', 'assignment01.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-assignment-assignment01_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment01.c"> + <pre><code class="language-c">/* Write a C program that includes a user-defined function named isPrime with the signature +int isPrime(int num); The function should take an integer as a parameter and return 1 if +the number is prime and 0 otherwise. */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int isPrime(int); + +int main() +{ + int n; + printf(&quot;Enter the number: &quot;); + scanf(&quot;%d&quot;, &amp;n); + + if (isPrime(n)) + { + printf(&quot;\nInput %d is a Prime Number.&quot;, n); + } + else + { + printf(&quot;\nInput %d is not a Prime Number.&quot;, n); + } + + return 0; +} + +int isPrime(int n) +{ + if (n &lt;= 1) + return 0; + if (n == 2) + return 1; + if (n % 2 == 0) + return 0; + + int temp = (int)sqrt(n); + int i; + for (i = 3; i &lt;= temp; i += 2) + { + if (n % i == 0) + { + return 0; + } + } + return 1; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">assignment02.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment02.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-assignment-assignment02_c', 'assignment02.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-assignment-assignment02_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment02.c"> + <pre><code class="language-c">/* Write a C program that includes a user-defined function named isArmstrong with the +signature int isArmstrong(int num);. An Armstrong number is a number that is equal to +the sum of its own digits each raised to the power of the number of digits. For example, +153 is an Armstrong number because 1^3 + 5^3 + 3^3 = 153 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int isArmstrong(int); +int count(int); + +int main() +{ + int n; + printf(&quot;Enter the number: &quot;); + scanf(&quot;%d&quot;, &amp;n); + + if (isArmstrong(n)) + { + printf(&quot;\nInput %d is a Armstrong Number.&quot;, n); + } + else + { + printf(&quot;\nInput %d is Not a Armstrong Number.&quot;, n); + } + + return 0; +} + +int count(int n) +{ + int count = 0; + while (n &gt; 0) + { + count++; + n = n / 10; + } + return count; +} + +int isArmstrong(int n) +{ + if (n &lt; 0) + return 0; + if (n == 0) + return 1; + + int power = count(n); + int temp = n; + int checker = 0; + + while (temp &gt; 0) + { + int digit = temp % 10; + checker = checker + (int)round(pow(digit, power)); + temp = temp / 10; + } + return n == checker; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">assignment03.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment03.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-assignment-assignment03_c', 'assignment03.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-assignment-assignment03_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment03.c"> + <pre><code class="language-c">/* Write a C program that includes a user-defined function named isPerfect with the signature +int isPerfect(int num);. A perfect number is a positive integer that is equal to the sum of +its proper divisors, excluding itself. For example, 28 is a perfect number because the sum +of its divisors (1, 2, 4, 7, 14) equals 28. */ + +#include &lt;stdio.h&gt; + +int isPerfect(int); + +int main() +{ + int n; + printf(&quot;Enter the number: &quot;); + scanf(&quot;%d&quot;, &amp;n); + if (isPerfect(n)) + { + printf(&quot;\nInput %d is a Perfect Number.&quot;, n); + } + else + { + printf(&quot;\nInput %d is not a Perfect Number.&quot;, n); + } + return 0; +} + +int isPerfect(int n) +{ + if (n &lt;= 1) + return 0; + int temp = 1; + int i; + for (i = 2; i &lt;= n / 2; i++) + { + if (n % i == 0) + { + temp += i; + } + } + return temp == n; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">assignment04.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment04.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-assignment-assignment04_c', 'assignment04.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-assignment-assignment04_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment04.c"> + <pre><code class="language-c">/* Write a C program that takes an integer input representing a month (1 to 12) and a year. +Use a switch statement to display the number of days in that month, considering leap years. */ + +#include &lt;stdio.h&gt; + +int main() +{ + int month, year, days; + printf(&quot;Enter the month (1 to 12) and year: &quot;); + scanf(&quot;%d %d&quot;, &amp;month, &amp;year); + + switch (month) + { + case 1: // jan + case 3: // mar + case 5: // may + case 7: // july + case 8: // aug + case 10: // oct + case 12: // dec + days = 31; + break; + case 4: // apr + case 6: // jun + case 9: // sep + case 11: // nov + days = 30; + break; + case 2: // feb + if ((year % 400 == 0) || ((year % 4 == 0) &amp;&amp; (year % 100 != 0))) + { + days = 29; + } + else + { + days = 28; + } + break; + default: + printf(&quot;\nYou entered something wrong.&quot;); + return 0; + } + + printf(&quot;\nNumber of days: %d&quot;, days); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">assignment05.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment05.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-assignment-assignment05_c', 'assignment05.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-assignment-assignment05_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/assignment/assignment05.c"> + <pre><code class="language-c"></code></pre> + </div> + </li> + </ul> + </div> + </li> + + <li class="border rounded-lg overflow-hidden"> + <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('c')"> + <div class="flex items-center justify-between"> + <div class="flex items-center"> + <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> + <span class="font-medium text-gray-800">c</span> + <span class="ml-2 text-sm text-gray-500">(7 files)</span> + </div> + <div class="flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/tree/main/c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <div class="chevron" id="chevron-c"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> + </div> + </div> + </div> + <div class="folder-content hidden bg-white" id="folder-c"> + <ul class="divide-y divide-gray-200"> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">1.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/c/1.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-c-1_c', '1.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-c-1_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/1.c"> + <pre><code class="language-c">// Write a program (WAP) to print the sum and product of digits of an integer. +// Author - Amit Dutta, Date - 13th SEP, 2025 + +#include&lt;stdio.h&gt; + +int main() { + int inp, result_sum = 0, result_product = 1, temp; + printf(&quot;Please enter the number : &quot;); + scanf(&quot;%d&quot;,&amp;inp); + printf(&quot;\n&quot;); + + if (inp &lt; 0) { + printf(&quot;\nPlease enter a valid non negetive integer.&quot;); + return 1; + } + + temp = inp; + while (temp != 0 ) { + result_sum = result_sum + (temp % 10); + result_product = result_product * (temp % 10); + temp = temp / 10; + } + + printf(&quot;\nSum of the digits of the input number &#x27;%d&#x27; is : %d&quot; + &quot;\nProduct of the digits of the input number &#x27;%d&#x27; is : %d&quot;, + inp, result_sum, inp, result_product); + return 0; +} + +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">2.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/c/2.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-c-2_c', '2.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-c-2_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/2.c"> + <pre><code class="language-c">//WAP to reverse a non-negative integer. +// Author - Amit Dutta, Date - 13th SEP, 2025 + +#include&lt;stdio.h&gt; + +int main() { + int inp, result = 0, temp; + printf(&quot;PLease enter the number you want to reverse : &quot;); + scanf(&quot;%d&quot;,&amp;inp); + printf(&quot;\n&quot;); + + if (inp &lt; 0) { + printf(&quot;\nPlease enter a non negetive integer.&quot;); + return 1; + } + + temp = inp; + while ( temp != 0) { + result = (result * 10) + (temp % 10); + temp = temp / 10; + } + + printf(&quot;\nReverse of the input &#x27;%d&#x27; is : %d&quot;, inp, result); + return 0; +} + +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">3.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/c/3.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-c-3_c', '3.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-c-3_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/3.c"> + <pre><code class="language-c">// WAP to compute the sum of the first n terms of the following series S =1+1/2+1/3+1/4+...... +// Author - Amit Dutta, Date - 13th SEP, 2025 + +#include&lt;stdio.h&gt; + +int main() { + int n, i; + float result = 0; + printf(&quot;Please enter the value for &#x27;n&#x27; : &quot;); + scanf(&quot;%d&quot;, &amp;n); + printf(&quot;\n&quot;); + + if (n &lt;= 0) { + printf(&quot;\nPlease enter a positve number greater than ZERO.&quot;); + return 1; + } + + for (i = 1; i &lt;= n; i++) { + result = result + (1.0 / i); + } + + printf(&quot;\nSum of the first %d terms of the following series S =1+1/2+1/3+1/4+...... is : %f&quot;,n,result); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">4.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/c/4.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-c-4_c', '4.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-c-4_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/4.c"> + <pre><code class="language-c">//WAP to compute the sum of the first n terms of the following series,S =1-2+3-4+5...... +// Author - Amit Dutta, Date - 13th SEP, 2025 + +#include&lt;stdio.h&gt; + +int main() { + int n, result = 0, temp, i; + printf(&quot;Please enter the value for &#x27;n&#x27; for this series &#x27;s = 1-2+3-4+5-....&#x27;: &quot;); + scanf(&quot;%d&quot;,&amp;n); + printf(&quot;\n&quot;); + + if (n &lt;= 0) { + printf(&quot;\nPlease enter a positive integer.&quot;); + return 1; + } + + for (i = 1; i&lt;= n; i++) { + if (i % 2 == 0) { + result = result - i; + } + else { + result = result + i; + } + } + + printf(&quot;\nAns : %d&quot;, result); +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">5.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/c/5.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-c-5_c', '5.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-c-5_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/5.c"> + <pre><code class="language-c">/*Write a function to find whether a given no. is prime or not. +Use the same to generate the prime numbers less than 100.*/ +// Author - Amit Dutta, Date - 13th SEP, 2025 + +#include&lt;stdio.h&gt; + +int isPrime(int inp) { + int i, is_prime = 1; + + if (inp &lt; 2) is_prime = 0; + + for (i = 2; i &lt;= inp / 2; i++) if (inp % i == 0) { + is_prime = 0; + break; + } + + return is_prime; +} + + +int main() { + int inp, i; + printf(&quot;Enter the number you want to check : &quot;); + scanf(&quot;%d&quot;,&amp;inp); + printf(&quot;\n&quot;); + + if (isPrime(inp)) printf(&quot;\nGiven input &#x27;%d&#x27; is a Prime Number.&quot;,inp); + else printf(&quot;\nGiven input &#x27;%d&#x27; is not a Prime Number.&quot;,inp); + + printf (&quot;\nSeries of prime number upto 100 : &quot;); + for (i = 2; i &lt; 100; i++) if (isPrime(i)) printf(&quot; %d&quot;,i); + + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">6.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/c/6.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-c-6_c', '6.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-c-6_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/6.c"> + <pre><code class="language-c">/*Write a function that checks whether a given string is Palindrome or not. +Use this function to find whether the string entered by the user is Palindrome or not.*/ +// Author - Amit Dutta, Date - 13th SEP, 2025 + +#include&lt;stdio.h&gt; +#include&lt;string.h&gt; + +int isPalindrome(char inp[]) { + int len = strlen(inp); + int i = 0; //starting point + int j = len - 1; //end point + + while (i &lt; j) { + if (inp[i] != inp[j]) { + return 0; + } + i++; + j--; + } + + return 1; +} + +int main() { + char inp[20]; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%s&quot;,inp); + if (isPalindrome(inp)) printf(&quot;\n\nInput &#x27;%s&#x27; is a Palindrome number.&quot;, inp); + else printf(&quot;\n\nInput &#x27;%s&#x27; is not a Palindrome number.&quot;, inp); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">7.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/c/7.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-c-7_c', '7.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-c-7_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/c/7.c"> + <pre><code class="language-c">// WAP to compute the factors of a given number +// Author - Amit Dutta, Date - 13th SEP, 2025 + +#include&lt;stdio.h&gt; +#include&lt;stdlib.h&gt; + +int main() { + int inp, num, i; + printf(&quot;Please enter the number to get the factors from it : &quot;); + scanf(&quot;%d&quot;, &amp;inp); + + num = abs(inp); + + if (num == 0) { + printf(&quot;\n\n0 has infinitely many factors (all integers).&quot;); + return 1; + } + + printf(&quot;\n\nThe factors of &#x27; %d &#x27; is :- &quot;, inp); + printf(&quot;\nPositive : &quot;); + for (i = 1; i &lt;= num ; i++) if (num % i == 0) printf(&quot; %d&quot;, i); + printf(&quot;\nNegative : &quot;); + for (i = 1; i &lt;= num ; i++) if (num % i == 0) printf(&quot; %d&quot;, -i); + return 0; +} +</code></pre> + </div> + </li> + </ul> + </div> + </li> + + <li class="border rounded-lg overflow-hidden"> + <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('challenge')"> + <div class="flex items-center justify-between"> + <div class="flex items-center"> + <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> + <span class="font-medium text-gray-800">challenge</span> + <span class="ml-2 text-sm text-gray-500">(2 files)</span> + </div> + <div class="flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/tree/main/challenge" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <div class="chevron" id="chevron-challenge"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> + </div> + </div> + </div> + <div class="folder-content hidden bg-white" id="folder-challenge"> + <ul class="divide-y divide-gray-200"> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">sudipto1.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/challenge/sudipto1.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-challenge-sudipto1_c', 'sudipto1.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-challenge-sudipto1_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/challenge/sudipto1.c"> + <pre><code class="language-c">/* A smart home security controller monitors the state of several sensors to decide what action to take. + * Each second, the system reads data from sensors that can either be active or inactive. Based on the current + * state of all sensors, the controller must perform exactly one action, such as activating a warning, checking + * a specific zone, or declaring an intrusion. Write a C program that reads the sensor states as input and + * prints the corresponding system action. + -- Conditions: + * 1. You must determine exactly one action for every possible combination of sensor states. + * 2. You are not allowed to use any conditional statements (if, else if, else, or the ternary operator?). + * 3. You are not allowed to use logical operators. + * 4. You must use a single switch statement to control the program&#x27;s behaviour. + * 5. Loops may only be used for reading input, not for making decisions. + * 6. The program should handle all possible combinations of the sensors&#x27; active/inactive states and print the appropriate response each time. + -- Example (for understanding): + * If all sensors are inactive, the system should remain idle. + * If some sensors are active, the system should issue warnings or alerts based on the situation. + * If all sensors are active, the system should declare a confirmed intrusion. + */ + +/* + * This program monitors the state of four sensors (Door, Window, Motion, Glass Break) + * and determines the appropriate action without using any conditional (if, else) + * or logical (&amp;&amp;, ||) operators. + * + * It works by combining the state of all sensors into a single integer value + * using bitmasking. Each bit in the integer represents the state of one sensor + * (1 for active, 0 for inactive). This combined state is then used in a single + * switch statement to select the correct action for every possible combination. + * + * Then, enter the state of the four sensors separated by spaces, + * for example: 1 0 1 0 + */ + +/* Author - Amit Dutta, Date - 12th October, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + + // variables to hold the state of a sensor (0 or 1) + int doorSensorState, windowSensorState, motionSensorState, glassbreakSensorState; + + // variable to check the combined state of all four sensor + int combinedState = 0; + + // a invalid flag to check the input are valid or not + unsigned int invalidFlag; + + // printing the way to usage the program + printf(&quot;------ Home Security Controller ------\n&quot;); + printf(&quot;Enter sensor states (1 for active, 0 for inactive).\n&quot;); + printf(&quot;Format: [Door] [Window] [Motion] [Glass Break]\n&quot;); + printf(&quot;Example: 0 1 1 0\n&quot;); + printf(&quot;Enter states (or press Ctrl+D for MacOS or Linux / Ctrl+Z for Windows to exit): &quot;); + + // doing the main calculation + // chacking the combined state and taking a decision + while (scanf(&quot;%d %d %d %d&quot;, &amp;doorSensorState, &amp;windowSensorState, &amp;motionSensorState, &amp;glassbreakSensorState) == 4) + { + // validating input + // The expression (variable &amp; ~1) results in 0 only if &#x27;variable&#x27; is 0 or 1. + // For any other positive number, it&#x27;s non-zero. + // We combine all checks with a bitwise OR. If any sensor state is invalid, + // the flag will become non-zero. + invalidFlag = (doorSensorState &amp; ~1) | (windowSensorState &amp; ~1) | (motionSensorState &amp; ~1) | (glassbreakSensorState &amp; ~1); + + // Combine the four sensor states into a single integer using bitwise operations. + // This creates a unique number from 0 to 15 for each possible combination. + // Bit 0: Door Sensor + // Bit 1: Window Sensor + // Bit 2: Motion Sensor + // Bit 3: Glass Break Sensor + combinedState = (glassbreakSensorState &lt;&lt; 3) | (motionSensorState &lt;&lt; 2) | (windowSensorState &lt;&lt; 1) | doorSensorState; + + // If the invalid_input_flag is non-zero, we add 16 to the state. + // This pushes it outside the 0-15 range and forces the &#x27;default&#x27; case in the switch. + // We achieve this by multiplying the flag (which is &gt; 0) by 16. + combinedState += invalidFlag * 16; + + // printing the given state + printf(&quot;\n\nState : [Door : %d, Window : %d, Motion : %d, Glass Break : %d]\nState Id : %d&quot;, + doorSensorState, windowSensorState, motionSensorState, glassbreakSensorState, combinedState); + printf(&quot;\nSystem Action : &quot;); + + // taking decision based on combined state + // A single switch statement controls the program&#x27;s behavior. + // It handles all 2^4 = 16 possible combinations of sensor states, + // ensuring exactly one action is taken for every scenario. + switch (combinedState) + { + case 0: // Binary: 0000 + printf(&quot;System Idle. All sensors inactive.\n&quot;); + break; + case 1: // Binary: 0001 + printf(&quot;Check front door camera.\n&quot;); + break; + case 2: // Binary: 0010 + printf(&quot;Check window sensors.\n&quot;); + break; + case 3: // Binary: 0011 + printf(&quot;Warning: Perimeter breach suspected. Check doors and windows.\n&quot;); + break; + case 4: // Binary: 0100 + printf(&quot;Check interior cameras for movement.\n&quot;); + break; + case 5: // Binary: 0101 + printf(&quot;Warning: Potential entry and movement detected. Check front door and interior. Ask for patrol.\n&quot;); + break; + case 6: // Binary: 0110 + printf(&quot;Warning: Potential entry and movement detected. Check windows and interior. Ask for patrol.\n&quot;); + break; + case 7: // Binary: 0111 + printf(&quot;Alert: High probability of unauthorized entry. Ask for patrol.\n&quot;); + break; + case 8: // Binary: 1000 + printf(&quot;Alert: Glass break detected. High-priority event. Ask for patrol.\n&quot;); + break; + case 9: // Binary: 1001 + printf(&quot;Severe Alert: Forced entry likely (door + glass). Activate Alarm and Contact authorities.\n&quot;); + break; + case 10: // Binary: 1010 + printf(&quot;Severe Alert: Forced entry likely (window + glass). Activate Alarm and Contact authorities.\n&quot;); + break; + case 11: // Binary: 1011 + printf(&quot;Intrusion Alert: Multiple perimeter breaches. Activate Alarm and Contact authorities.\n&quot;); + break; + case 12: // Binary: 1100 + printf(&quot;Intrusion Alert: Confirmed interior presence after breach. Activate Alarm and Contact authorities.\n&quot;); + break; + case 13: // Binary: 1101 + printf(&quot;INTRUSION CONFIRMED! Activate maximum response protocol. Activate Alarm and Contact authorities.\n&quot;); + break; + case 14: // Binary: 1110 + printf(&quot;INTRUSION CONFIRMED! Activate maximum response protocol. Activate Alarm and Contact authorities.\n&quot;); + break; + case 15: // Binary: 1111 + printf(&quot;CATASTROPHIC EVENT! ALL SENSORS TRIGGERED. ACTIVATE ALARM AND CONTACT COPS.\n&quot;); + break; + default: + // This case should not be reached with valid 0/1 input but is included for completeness. + printf(&quot;Error: Invalid sensor state detected.\n&quot;); + break; + } + + // discarding extra characters (if any) left + while (getchar() != &#x27;\n&#x27;) + ; + + // asking for next set of input + printf(&quot;\nEnter next set of states: &quot;); + } + printf(&quot;\nSecurity system shutting down.\n&quot;); +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">sudiptoown01.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/challenge/sudiptoown01.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-challenge-sudiptoown01_c', 'sudiptoown01.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-challenge-sudiptoown01_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/challenge/sudiptoown01.c"> + <pre><code class="language-c">/* + * A smart home security controller monitors the state of several sensors to decide what action to take. + * Each second, the system reads data from sensors that are either an active or inactive. Based on the current + * state of all sensors, the controller must perform exactly one action, such as activating a warning, checking + * a specific zone, or declaring an intrusion. Write a C program that reads the sensor status as input and + * prints the corresponding system action. + * Hints: + * 1. The most determinative action wins for every possible combination of sensor states. + * 2. You are not allowed to use any conditional statements (if, else if, else, or the ternary operator?). + * 3. You are not allowed to use logical operators. + * 4. You must use a single switch statement to control the program&#x27;s behavior. + * 5. The program should handle all possible combinations of the sensors&#x27; active/inactive states and print the appropriate response each time. + * 6. All sensors are inactive, the system should remain idle. + * 7. If some sensors are active, the system should issue warnings or alerts based on the situation. + * 8. If all sensors are active, the system should declare a confirmed intrusion. + * Solution: + * We can solve this problem simply by assigning each case its own distinct integer. + * There are 2 possibilities for a sensor and therefore there are 2^4 = 16 cases. + * Using arrays we can assign each case its own index value and print it as per the encoded binary integer. + */ +#include &lt;stdio.h&gt; + +int casekey(int door, int window, int motion, int glass) { + int key = (door &lt;&lt; 3) | (window &lt;&lt; 2) | (motion &lt;&lt; 1) | glass; + return key; +} + +int main() { + int door, window, motion, glass, key; + char choice; + + static const char *action[16] = { + &quot;IDLE&quot;, &quot;CHECK WINDOW&quot;, &quot;WARN MOTION&quot;, &quot;WARN MOTION WINDOW&quot;, + &quot;CHECK DOOR&quot;, &quot;WARN DOOR WINDOW&quot;, &quot;INTRUSION SUSPECTED&quot;, &quot;INTRUSION CONFIRMED&quot;, + &quot;GLASS ONLY&quot;, &quot;DOOR GLASS&quot;, &quot;MOTION GLASS&quot;, &quot;MOTION WINDOW GLASS&quot;, + &quot;DOOR WINDOW&quot;, &quot;DOOR WINDOW GLASS&quot;, &quot;DOOR MOTION GLASS&quot;, &quot;ALL SENSORS&quot; + }; + + do { + printf(&quot;Sensors: Door, Window, Motion, Glass\n&quot;); + printf(&quot;Enter the state of each sensor in binary (0 or 1): &quot;); + scanf(&quot;%d %d %d %d&quot;, &amp;door, &amp;window, &amp;motion, &amp;glass); + + key = casekey(door, window, motion, glass); + printf(&quot;Action: %s\n&quot;, action[key]); + + printf(&quot;Want to continue? (y/n): &quot;); + scanf(&quot; %c&quot;, &amp;choice); + printf(&quot;\n&quot;); + } while (choice == &#x27;y&#x27; || choice == &#x27;Y&#x27;); + + return 0; +}</code></pre> + </div> + </li> + </ul> + </div> + </li> + + <li class="border rounded-lg overflow-hidden"> + <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('khurapati-idea')"> + <div class="flex items-center justify-between"> + <div class="flex items-center"> + <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> + <span class="font-medium text-gray-800">khurapati-idea</span> + <span class="ml-2 text-sm text-gray-500">(2 files)</span> + </div> + <div class="flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/tree/main/khurapati-idea" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <div class="chevron" id="chevron-khurapati-idea"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> + </div> + </div> + </div> + <div class="folder-content hidden bg-white" id="folder-khurapati-idea"> + <ul class="divide-y divide-gray-200"> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">KI001.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/khurapati-idea/KI001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-khurapati-idea-KI001_c', 'KI001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-khurapati-idea-KI001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/khurapati-idea/KI001.c"> + <pre><code class="language-c">// khurapati idea no. : 1 +// Idea : we can use the side effect of printf function to get length of any string or number +// Author - Amit Dutta, Date - 16-10-2025 + +#include &lt;stdio.h&gt; +int main() +{ + // testing number + int num, len = -13 /* here minus 13 because we will remove the massage characters in line 10 */; + printf(&quot;Enter a number to get the length : &quot;); + scanf(&quot;%d&quot;, &amp;num); + len += printf(&quot;Your input : %d&quot;, num); // here the &quot;Your input : &quot;, this 13 characters are extra + printf(&quot;\nLength : %d&quot;, len); + + // testing char + char a[20]; + len = -13; + while (getchar() != &#x27;\n&#x27;) + ; + printf(&quot;\nEnter a word to get the length : &quot;); + scanf(&quot;%19s&quot;, &amp;a); + len += printf(&quot;Your input : %s&quot;, a); // here the &quot;Your input : &quot;, this 13 characters are extra + printf(&quot;\nLength : %d&quot;, len); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">KI002.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/khurapati-idea/KI002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-khurapati-idea-KI002_c', 'KI002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-khurapati-idea-KI002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/khurapati-idea/KI002.c"> + <pre><code class="language-c">/* Author - Amit Dutta, Date - 05th November, 2025 */ + +/* Plan - checking for edge case */ + +#include &lt;stdio.h&gt; +int main() +{ + printf(&quot;Starting.....\n&quot;); + + for (int i = 1; ; i++) + { + printf(&quot;i = %d\n&quot;, i); + } + return 0; +}</code></pre> + </div> + </li> + </ul> + </div> + </li> + + <li class="border rounded-lg overflow-hidden"> + <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('letusc')"> + <div class="flex items-center justify-between"> + <div class="flex items-center"> + <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> + <span class="font-medium text-gray-800">letusc</span> + <span class="ml-2 text-sm text-gray-500">(69 files)</span> + </div> + <div class="flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/tree/main/letusc" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <div class="chevron" id="chevron-letusc"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> + </div> + </div> + </div> + <div class="folder-content hidden bg-white" id="folder-letusc"> + <ul class="divide-y divide-gray-200"> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc001.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc001_c', 'luc001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc001.c"> + <pre><code class="language-c">/* Temperature of a city in fahrenheit degrees is input through +the keyboard. WAP to convert this temperature into Centigrade +degrees. */ +/* Author - Amit Dutta, Date - 13 sep, 2025 */ +/* Chapter 1; Page 19; Question NO.: F(a) */ + +#include&lt;stdio.h&gt; +int main() { + float f, c; + printf(&quot;Enter the temperature of city in Fahrenheit : &quot;); + scanf(&quot;%f&quot;, &amp;f); + // formula (F - 32) 5/9 + c = ((f - 32) * 5) / 9; + printf(&quot;\nTemperature in centigrade : %f&quot;, c); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc002.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc002_c', 'luc002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc002.c"> + <pre><code class="language-c">/* The length and breadth of a rectangle and radius of a circle +are input through the keyboard. Write a program to calculate the +area and perimeter of the rectangle, and the area and circumference +of the circle. */ +/* Author - Amit Dutta, Date - 16th SEP, 2025 */ +/* Let Us C; Page - 19; Chap- 1; QNo.: F(b) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + double len, bre, r, area_r, per, area_c, cir; + printf(&quot;Enter the length and breadth of the rectangle : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;len, &amp;bre); + printf(&quot;Enter the Radius of the circle : &quot;); + scanf(&quot;%lf&quot;, &amp;r); + area_r = len * bre; + per = 2 * (len + bre); + area_c = M_PI * r * r; + cir = 2 * M_PI * r; + printf(&quot;\nArea of Rectangle : %lf&quot; + &quot;\nPerimeter of Rectangle : %lf&quot; + &quot;\nArea of Circle : %lf&quot; + &quot;\nCircumference of Circle : %lf&quot;, + area_r, per, area_c, cir); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc003.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc003_c', 'luc003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc003.c"> + <pre><code class="language-c">/* Paper of size AO has dimensions 1189 mm x 841 mm. +Each subsequent size A(n) is defined as A(n-1) cut in +half, parallel to its shorter sides. Thus, paper of +size A1 would have dimensions 841 mm x 594 mm. Write +a program to calculate and print paper sizes A0,� +A1,�A2,�...�A8. */ +/* Author - Amit Dutta, Date - 16th SEP, 2025 */ +/* Let Us C; Page - 19; Chap- 1; QNo.: F(c) */ + +#include&lt;stdio.h&gt; +#include&lt;math.h&gt; +int main() { + double s_long = 1189.0, s_short = 841.0, temp; + int i; + printf(&quot;A0 Dimension : %g mm x %g mm&quot;, floor(s_long), floor(s_short)); + for (i = 1; i &lt;= 8; i++) { + temp = s_long; + s_long = s_short; + s_short = temp / 2; + printf(&quot;\nA%d Dimension : %g mm x %g mm&quot;, i, floor(s_long), floor(s_short)); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc004.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc004_c', 'luc004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc004.c"> + <pre><code class="language-c">/* If a five digit number is input through the keyboard, +write a program to calculate the sum of it&#x27;s digit. +(Hint : Use the modulus operator %) */ +/* Author - Amit Dutta, Date - 28th SEP, 2025 */ +/* Let Us C; Page - 37; Chap- 2; QNo.: G(a) */ + +#include &lt;stdio.h&gt; +int main() +{ + int inp, result = 0, i, temp; + printf(&quot;Enter a five digit number : &quot;); + scanf(&quot;%d&quot;, &amp;inp); + if (inp &lt; 10000 || inp &gt; 99999) + { + printf(&quot;\nPlease enter a valid five digit number.&quot;); + return 1; + } + temp = inp; + for (i = 1; i &lt;= 5; i++) + { + result = result + (inp % 10); + inp = inp / 10; + } + printf(&quot;\nSum of the digit &#x27;%d&#x27; is : %d&quot;, temp, result); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc005.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc005_c', 'luc005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc005.c"> + <pre><code class="language-c">/* Write a program to recive Cartesian +co-ordinates (x, y) of a point and convert +them into Polar co-ordinates (r, phi) + Hint : r = sqrt (x^2 + y^2) and phi = tan^-1 (y/x) */ +/* Author - Amit Dutta, Date - 28th SEP, 2025 */ +/* Let Us C; Page - 37; Chap- 2; QNo.: G(b) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + double x, y, r, phi; + printf(&quot;Enter the Cartesian Co-Ordinates in this format &#x27;x, y&#x27; : &quot;); + scanf(&quot;%lf, %lf&quot;, &amp;x, &amp;y); + r = sqrt(pow(x, 2) + pow(y, 2)); + phi = atan2(y, x); + printf(&quot;\nPolar Co-Ordinates are : (%g, %g Rad)&quot;, r, phi); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc006.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc006_c', 'luc006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc006.c"> + <pre><code class="language-c">/* Write a program to receive values of latitude (L1, L2) and longitude +(G1, G2), in degrees, of two places on the earth and output the distance +(D) between them in nautical miles. The formula for distance in nautical +miles is : + D = 3963 cos^-1(sin L1 sin L2 + cos L1 cos L2 * cos(G2 - G1)) +*/ +/* Author - Amit Dutta, Date - 29th SEP, 2025 */ +/* Let Us C, Chap - 2, Page - 37, Qn no.: G(c) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + double l1, l2, g1, g2, d; + printf(&quot;Enter the Latitude in &#x27;L1, L2&#x27; format : &quot;); + scanf(&quot;%lf, %lf&quot;, &amp;l1, &amp;l2); + printf(&quot;Enter the Longitude in &#x27;G1, G2&#x27; format : &quot;); + scanf(&quot;%lf, %lf&quot;, &amp;g1, &amp;g2); + // Converting degree to radian because function from math.h use radian not degree + l1 = l1 * (M_PI / 180); + l2 = l2 * (M_PI / 180); + g1 = g1 * (M_PI / 180); + g2 = g2 * (M_PI / 180); + d = 3963 * acos(sin(l1) * sin(l2) + cos(l1) * cos(l2) * cos(g2 - g1)); + printf(&quot;Distance in nautical miles : %g&quot;, d); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc007.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc007_c', 'luc007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc007.c"> + <pre><code class="language-c">/* Wind-chill factor is the felt air temperature on exposed skin due to wind. +The wind-chill temperature is always lower than the air temperature, and is +calculated as per the following formula. + wcf = 35.74 + 0.6215t + (0.4275t - 35.75) * v^0.16 +Where t is temperature and v is wind velocity. Write a program to receive +values of t and v and calcualate wind-chill factor (wcf). */ +/* Author - Amit Dutta, Date - 30th SEP, 2025 */ +/* Let Us C, Chap - 2, Page - 37, Qn No.: G(d) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + double t, v, wcf; + printf(&quot;Enter the temperature and velociy of the wind : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;t, &amp;v); + wcf = 35.74 + (0.6215 * t) + (((0.4275 * t) - 35.75) * pow(v, 0.16)); + printf(&quot;\nWind-chill factor (wcf) : %g&quot;, wcf); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc008.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc008_c', 'luc008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc008.c"> + <pre><code class="language-c">/* If value of an angle is input through the keyboard, +write a program to print all its trigonometric ratios. */ +/* Author - Amit Dutta, Date - 30th SEP, 2025 */ +/* Let Us C, Chap - 2, Page - 37, Qn No.: G(e) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + double inp, rsin, rcos, rtan, rcosec, rsec, rcot; + printf(&quot;Enter the Angle in degree : &quot;); + scanf(&quot;%lf&quot;, &amp;inp); + inp = inp * (M_PI / 180); //changing degree to radian + rsin = sin(inp); + rcos = cos(inp); + rtan = tan(inp); + rcosec = 1 / rsin; + rsec = 1 / rcos; + rcot = 1 / rtan; + printf(&quot;\nTrigonometric ratios :-&quot; + &quot;\nsin = %g &quot; + &quot;\ncos = %g&quot; + &quot;\ntan = %g&quot; + &quot;\ncosec = %g&quot; + &quot;\nsec = %g&quot; + &quot;\ncot = %g&quot;, + rsin, rcos, rtan, rcosec, rsec, rcot); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc009.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc009_c', 'luc009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc009.c"> + <pre><code class="language-c">/* Two numbers are input through the keyboard into two locations +C and D. Write a program to interchange the contents of C and D. */ +/* Author - Amit Dutta, Date - 30th SEP, 2025 */ +/* Let Us C, Chap - 2, Page - 37, Qn No.: G(d) */ + +#include &lt;stdio.h&gt; +int main() +{ + double a, b; + printf(&quot;Enter the two number A and B : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;a, &amp;b); + printf(&quot;\nBefore Interchange : &quot;); + printf(&quot;\nA = %g (Memory location = %p)&quot;, a, &amp;a); + printf(&quot;\nB = %g (Memory location = %p)&quot;, b, &amp;b); + a = a + b; + b = a - b; + a = a - b; + printf(&quot;\nAfter Interchange :&quot;); + printf(&quot;\nA = %g (Memory location = %p)&quot;, a, &amp;a); + printf(&quot;\nB = %g (Memory location = %p)&quot;, b, &amp;b); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc010.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc010_c', 'luc010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc010.c"> + <pre><code class="language-c">/* A five-digit number is entered through the keyboard. Write a program +to obtain the reversed number and to etermine whether the original and reversed +numbers are equal or not. */ +/* Author - Amit Dutta, Date - 1st OCT, 2025 */ +/* Let Us C, Chap - 3, Page - 53, Qn No.: f(a) */ + +#include &lt;stdio.h&gt; +int main() +{ + int num, rev, temp, i; + printf(&quot;Please enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + if (num &lt; 10000 || num &gt; 99999) + { + printf(&quot;\nPlease enter a five digit number.&quot;); + return 1; + } + temp = num; + for (i = 1; i &lt;= 5; i++) + { + rev = (rev * 10) + num % 10; + num = num / 10; + } + printf(&quot;\nReverse of the Input number : %d&quot;, rev); + if (rev == temp) + printf(&quot;\nOriginal and reversed numbers are equal.&quot;); + else + printf(&quot;\nOrigianl and reversed numbers are not equal.&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc011.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc011_c', 'luc011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc011.c"> + <pre><code class="language-c">/* If ages of Ram, Shyam and Ajay are input through the keyboard, +write a program to determine the youngest of the three. */ +/* Author - Amit Dutta, Date - 1st OCT, 2025 */ +/* Let Us C, Chap- 3, Page - 53, Qn No.: f(b) */ + +#include &lt;stdio.h&gt; +int main() +{ + int ram, shyam, ajay; + printf(&quot;Please enter the age of Ram, Shyam and Ajay : &quot;); + scanf(&quot;%d %d %d&quot;, &amp;ram, &amp;shyam, &amp;ajay); + if (ram == shyam || ram == ajay || shyam == ajay) + printf(&quot;\nThree must have different age.&quot;); + if (ram &lt; shyam &amp;&amp; ram &lt; ajay) + printf(&quot;\nRam is the youngest. Age : %d&quot;, ram); + if (shyam &lt; ram &amp;&amp; shyam &lt; ajay) + printf(&quot;\nShyam is the youngest. Age : %d&quot;, shyam); + if (ajay &lt; ram &amp;&amp; ajay &lt; shyam) + printf(&quot;\nAjay is the youngest. Age : %d&quot;, ajay); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc012.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc012.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc012_c', 'luc012.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc012_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc012.c"> + <pre><code class="language-c">/* Write a program to check whether a triangle is valid or not, +if three angles of the triangle are entered through the keyboard. +A triangle is valid if the sum of all the three angles is equal to 180 degrees. */ +/* Author - Amit Dutta, Date - 1st OCT, 2025 */ +/* Let Us C, Chap- 3, Page - 53, Qn No.: f(c) */ + +#include &lt;stdio.h&gt; +int main() +{ + double angle1, angle2, angle3, sum; + printf(&quot;Enter the value of the three angle of the triangle : &quot;); + scanf(&quot;%lf %lf %lf&quot;, &amp;angle1, &amp;angle2, &amp;angle3); + sum = angle1 + angle2 + angle3; + if (sum == 180.0) + printf(&quot;\nThis Triangle is a valid one.&quot;); + else + printf(&quot;\nThis Triangle is not valid. Sum of the angles : %g&quot;, sum); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc013.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc013.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc013_c', 'luc013.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc013_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc013.c"> + <pre><code class="language-c">/* Write a program to find the absolute value +of a number entered through the keyboard. */ +/* Author - Amit Dutta, Date - 1st OCT, 2025 */ +/* Let Us C, Chap- 3, Page - 53, Qn No.: f(d) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + double num; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%lf&quot;, &amp;num); + num = abs(num); + printf(&quot;\nAbsolute value of the input is : %g&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc014.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc014.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc014_c', 'luc014.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc014_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc014.c"> + <pre><code class="language-c">/* Given the length and breadth of a rectangle, write a program to find +whether the area of the rectangle is greater than it&#x27;s perimeter. +For example, the area of the rectangle with length = 5 and breadth = 4 +is greater than its perimeter. */ +/* Author - Amit Dutta, Date - 1st OCT, 2025 */ +/* Let Us C, Chap- 3, Page - 53, Qn No.: f(e) */ + +#include &lt;stdio.h&gt; +int main() +{ + double len, bre, area, peri; + printf(&quot;Enter the length and breadth of the rectangle : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;len, &amp;bre); + area = len * bre; + peri = 2 * (len + bre); + if (area &gt; peri) + printf(&quot;\nThe area of the rectangle is greater than it&#x27;s perimeter.&quot;); + else if (area &lt; peri) + printf(&quot;\nThe area of the rectangle is lower than it&#x27;s perimeter.&quot;); + else + printf(&quot;\nThe area of the rectangle is same as it&#x27;s perimeter.&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc015.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc015.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc015_c', 'luc015.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc015_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc015.c"> + <pre><code class="language-c">/* Given three points (x1, y1), (x2, y2), and (x3, y3), +write a program to check if the three poins fall on one straight line. */ +/* Author - Amit Dutta, Date - 1st OCT, 2025 */ +/* Let Us C, Chap- 3, Page - 53, Qn No.: f(f) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +#define EPSILON 0.0001 +// Define a small tolerance value (EPSILON) for safe floating-point comparison +// This is critical because of minor rounding errors in computer arithmetic. +int main() +{ + double x1, x2, x3, y1, y2, y3, area; + printf(&quot;Enter the point A(x1, y1) : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;x1, &amp;y1); + printf(&quot;Enter the point B(x2, y2) : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;x2, &amp;y2); + printf(&quot;Enter the point C(x3, y3) : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;x3, &amp;y3); + area = 0.5 * ((x1 * (y2 - y3)) + (x2 * (y3 - y1)) + (x3 * (y1 - y2))); + if (fabs(area) &lt; EPSILON) // abs() for integer, fabs() for float, double + printf(&quot;\nA(%g, %g), B(%g, %g) and C(%g, %g) points fall on one straight line.&quot;, x1, y1, x2, y2, x3, y3); + else + printf(&quot;\nA(%g, %g), B(%g, %g) and C(%g, %g) points doesn&#x27;t fall on one straight line.&quot;, x1, y1, x2, y2, x3, y3); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc016.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc016.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc016_c', 'luc016.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc016_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc016.c"> + <pre><code class="language-c">/* Given the coordiantes (x, y) of center of a circle and its radius, +write a program that will determine whether a point lies inside the circle, +on the circle or outside the circle. (Hint : Use sqrt() and pow() functions.) */ +/* Author - Amit Dutta, Date - 1st OCT, 2025 */ +/* Let Us C, Chap- 3, Page - 53, Qn No.: f(g) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +// Define a small tolerance value (EPSILON) for reliable floating-point comparison +#define EPSILON 0.0001 + +int main() +{ + double h, k; + double R; + double x, y; + double distance_sq; + printf(&quot;Enter the center coordinates (h, k) : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;h, &amp;k); + printf(&quot;Enter the radius (R) : &quot;); + scanf(&quot;%lf&quot;, &amp;R); + printf(&quot;Enter the point P coordinates (x, y) : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;x, &amp;y); + distance_sq = pow(x - h, 2) + pow(y - k, 2); + double radius_sq = R * R; + // Case 1: On the circle (D^2 = R^2) - Use EPSILON for safety! + if (fabs(distance_sq - radius_sq) &lt; EPSILON) + { + printf(&quot;The point P(%g, %g) lies ON THE CIRCLE.\n&quot;, x, y); + } + // Case 2: Inside the circle (D^2 &lt; R^2) + else if (distance_sq &lt; radius_sq) + { + printf(&quot;The point P(%g, %g) lies INSIDE THE CIRCLE.\n&quot;, x, y); + } + // Case 3: Outside the circle (D^2 &gt; R^2) + else + { + printf(&quot;The point P(%g, %g) lies OUTSIDE THE CIRCLE.\n&quot;, x, y); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc017.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc017.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc017_c', 'luc017.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc017_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc017.c"> + <pre><code class="language-c">/* Given a point (x, y), write a program to find out if it lies on X-axis, Y-axis or origin. */ +/* Author - Amit Dutta, Date - 1st OCT, 2025 */ +/* Let Us C, Chap- 3, Page - 53, Qn No.: f(h) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +#define EPSILON 0.00001 + +int main() +{ + double x, y; + printf(&quot;Enter the point P(x, y) : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;x, &amp;y); + if (fabs(x) &lt; EPSILON &amp;&amp; fabs(y) &lt; EPSILON) + printf(&quot;\nPoint P(%g, %g) lies on the origin.&quot;, x, y); + else if (fabs(x) &lt; EPSILON) + printf(&quot;\nPoint P(%g, %g) lies on the Y-Axis.&quot;, x, y); + else if (fabs(y) &lt; EPSILON) + printf(&quot;\nPoint P(%G, %g) lies on the X-Axis.&quot;, x, y); + else + printf(&quot;\nThe point P(%g, %g) lies in a QUADRANT (not on an axis or the origin).&quot;, x, y); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc018-logic.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc018-logic.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc018-logic_c', 'luc018-logic.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc018-logic_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc018-logic.c"> + <pre><code class="language-c">/* According to Gregorian calender, it was Monday on the date 01/01/01. +Write a program to find out what is the day on 1st January of any input year. */ +/* Author - Amit Dutta, Date - 1st OCT, 2025 */ +/* Let Us C, Chap- 3, Page - 53, Qn No.: f(i) */ + +#include &lt;stdio.h&gt; + +/** + * @brief Determines if a given year is a leap year. + * * The rule: A year is a leap year if it is divisible by 4, UNLESS it is + * divisible by 100 but NOT by 400. + * * @param year The year to check. + * @return 1 if it is a leap year, 0 otherwise. + */ +int is_leap(int year) { + // Check if divisible by 400 OR (divisible by 4 AND not divisible by 100) + if ((year % 400 == 0) || (year % 4 == 0 &amp;&amp; year % 100 != 0)) { + return 1; + } + return 0; +} + +/** + * @brief Calculates the day of the week for January 1st of the given year. + * * The base date is 01/01/01, which was a Monday (index 1). + * * Day Mapping: 0:Sunday, 1:Monday, 2:Tuesday, 3:Wednesday, 4:Thursday, 5:Friday, 6:Saturday + */ +int main() { + long long year; // Use long long for year input if years far in the future/past are tested + int i; + long long total_days = 0; + int day_index; + + // Day names array for output + const char *day_names[] = {&quot;Sunday&quot;, &quot;Monday&quot;, &quot;Tuesday&quot;, &quot;Wednesday&quot;, &quot;Thursday&quot;, &quot;Friday&quot;, &quot;Saturday&quot;}; + + printf(&quot;Enter the year (e.g., 2025): &quot;); + if (scanf(&quot;%lld&quot;, &amp;year) != 1 || year &lt; 1) { + printf(&quot;Invalid year input. Please enter a positive integer year (&gt;= 1).\n&quot;); + return 1; + } + + // --- Core Logic: Calculate Total Days --- + + // We only need to consider the years that have *passed* before the target year. + // So, we count days from the end of year 0 up to the end of year (year - 1). + int years_passed = year - 1; + + // 1. Calculate the number of leap days up to the end of year (year - 1) + // Formula based on Gregorian calendar rules for years Y-1: + // (Y-1)/4 - (Y-1)/100 + (Y-1)/400 + long long leap_years = years_passed / 4 - years_passed / 100 + years_passed / 400; + + // 2. Total days = (Number of years * 365) + (Number of leap years) + // Note: The loop method (below) is more intuitive but the formula is faster. + // We will use the direct formula for efficiency. + total_days = years_passed * 365 + leap_years; + + // --- Alternate Loop Method (for conceptual simplicity) --- + /* + for (i = 1; i &lt; year; i++) { + total_days += 365; + if (is_leap(i)) { + total_days += 1; // Add 1 for the leap day + } + } + */ + + // --- Determine the Day of the Week --- + + // Since 01/01/01 was Monday (index 1), we use the following setup: + // Index 1 corresponds to Monday. + // The calculation gives the number of days *past* the Monday start (01/01/01). + // The modulo operation gives the remainder (0-6). + + // 0 days elapsed (Year 1): total_days=0. (0 + 1) % 7 = 1 (Monday). Correct. + // 365 days elapsed (Year 2): total_days=365. (365 + 1) % 7 = 2 (Tuesday). Correct. (365 mod 7 = 1, 1+1 = 2) + + day_index = (total_days + 1) % 7; + + // Correct the Day Index to match the array (0:Sun, 1:Mon, ..., 6:Sat) + // The +1 adjusts for the Monday starting point (index 1). + + printf(&quot;\nOn January 1st, %lld, the day was: **%s**.\n&quot;, year, day_names[day_index]); + + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc018.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc018.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc018_c', 'luc018.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc018_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc018.c"> + <pre><code class="language-c">/* According to Gregorian calender, it was Monday on the date 01/01/01. +if any year is input through the keyboard write a program to find out +what is the day on 1st January of this year. */ +/* Author - Amit Dutta, Date - 1st OCT, 2025 */ +/* Let Us C, Chap- 3, Page - 53, Qn No.: f(i) */ + +#include &lt;stdio.h&gt; + +int is_leap(int year) { + if ((year % 400 == 0) || (year % 4 == 0 &amp;&amp; year % 100 != 0)) { + return 1; + } + return 0; +} + +int main() { + long long year; // long long for year input if years far in the future/past are tested + int i; + long long total_days = 0; + int day_index; + + // Day names array for output + const char *day_names[] = {&quot;Sunday&quot;, &quot;Monday&quot;, &quot;Tuesday&quot;, &quot;Wednesday&quot;, &quot;Thursday&quot;, &quot;Friday&quot;, &quot;Saturday&quot;}; + + printf(&quot;Enter the year (e.g., 2025): &quot;); + if (scanf(&quot;%lld&quot;, &amp;year) != 1 || year &lt; 1) { + printf(&quot;Invalid year input. Please enter a positive integer year (&gt;= 1).\n&quot;); + return 1; + } + int years_passed = year - 1; + long long leap_years = years_passed / 4 - years_passed / 100 + years_passed / 400; + total_days = years_passed * 365 + leap_years; + day_index = (total_days + 1) % 7; + printf(&quot;\nOn January 1st, %lld, the day was: %s.\n&quot;, year, day_names[day_index]); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc019.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc019.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc019_c', 'luc019.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc019_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc019.c"> + <pre><code class="language-c">/* If the length of three sides of a triangle are entered through the +keyboard, write a program to check whether the triangle is an isosceles, +an equilateral, a scalene or a right-angled triangle. */ +/* Author - Amit Dutta, Date - 3rd OCT, 2025 */ +/* Let Us C, Chap- 4, Page - 71, Qn No.: D(a) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +#define EPSILON 0.000001 +/* EPSILON is used to compare double values for approximate equality, +mitigating floating-point precision errors. */ + +int main() +{ + double side1, side2, side3; + printf(&quot;Please enter the length of three side of the triangle : &quot;); + scanf(&quot;%lf %lf %lf&quot;, &amp;side1, &amp;side2, &amp;side3); + if (side1 &lt; 1 || side2 &lt; 1 || side3 &lt; 1) + { + printf(&quot;\nLength of a side of triangle should be a positive integer.&quot;); + return 1; + } + if (side1 + side2 &lt; side3 || side1 + side3 &lt; side2 || side2 + side3 &lt; side1) + { + printf(&quot;\nEntered triangle is not VALID.&quot;); + return 1; + } + // isosceles check + if (side1 == side2 || side2 == side3 || side3 == side1) + printf(&quot;\nEntered triangle is a ISOSCELES triangle.&quot;); + else + printf(&quot;\nEntered triangle is NOT a ISOSCELES triangle.&quot;); + // equilateral check + if (side1 == side2 &amp;&amp; side2 == side3) + printf(&quot;\nEntered triangle is a EQUILATERAL triangle.&quot;); + else + printf(&quot;\nEntered triangle is NOT a EQUILATERAL triangle.&quot;); + // scalene check + if (side1 != side2 &amp;&amp; side2 != side3) + printf(&quot;\nEntered triangle is a SCALENE triangle.&quot;); + else + printf(&quot;\nEntered triangle is NOT a SCALENE triangle.&quot;); + // right-angle check + if (fabs(((side1 * side1) + (side2 * side2)) - (side3 * side3)) &lt; EPSILON || + fabs(((side2 * side2) + (side3 * side3)) - (side1 * side1)) &lt; EPSILON || + fabs(((side3 * side3) + (side1 * side1)) - (side2 * side2)) &lt; EPSILON) + printf(&quot;\nEntered triangle is a RIGHT-ANGLED triangle.&quot;); + else + printf(&quot;\nEntered triangle is NOT a RIGHT-ANGLED triangle.&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc020.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc020.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc020_c', 'luc020.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc020_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc020.c"> + <pre><code class="language-c">/* In digital world colors are specified in Red-Green-Blue (RGB) format, +with values of R, G, B varying on an integer scale from 0 to 255. In print +publishing the colors are mentioned in Cyan-Magenta-Yellow-Black (CMYK) format, +with values of C, M, Y, and K varying on a real scale from 0.0 to 1.0. +Write a program that converts RGB color to CMYK color as per the following formulae: + White = Max(Red/255, Green/255, Blue/255) + Cyan = (White-Red/255) / White + Magenta = (White-Green/255) / White + Yellow = (White-Blue/255) / White + Black = 1 - White +Note that if the RGB values are all 0, then the CMY values are all 0 and the K value is 1. */ +/* Author - Amit Dutta, Date - 4th OCT, 2025 */ +/* Let Us C, Chap- 4, Page - 71, Qn No.: D(b) */ + +#include &lt;stdio.h&gt; + +// declaring function +double get_white(double red, double green, double blue) +{ + double max; + max = red / 255; + if (max &lt; (green / 255)) + max = green / 255; + if (max &lt; (blue / 255)) + max = blue / 255; + return max; +} + +int main() +{ + double r, g, b, w, c = 0, m = 0, y = 0, k = 0; + printf(&quot;Enter the RGB color code in &#x27;R G B&#x27; format : &quot;); + scanf(&quot;%lf %lf %lf&quot;, &amp;r, &amp;g, &amp;b); + + // checking for invalid input (negetive input) + if (r &lt; 0 || g &lt; 0 || b &lt; 0) + { + printf(&quot;\nRGB color code can not be a negetive number.&quot;); + return 1; + } + + // checking for invalid input (out of range color code) + if (r &gt; 255 || g &gt; 255 || b &gt; 255) + { + printf(&quot;\nRGB color code can be maximum (255, 255, 255).&quot;); + return 1; + } + + // converting RGB color code to CMYK color code + if (r == 0 &amp;&amp; g == 0 &amp;&amp; b == 0) + k = 1; + else + { + w = get_white(r, g, b); + c = (w - (r / 255)) / w; + m = (w - (g / 255)) / w; + y = (w - (b / 255)) / w; + k = 1 - w; + } + + printf(&quot;\nRGB color (%g, %g, %g) equivalent to CMYK color (%g, %g, %g, %g).&quot;, r, g, b, c, m, y, k); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc021.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc021.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc021_c', 'luc021.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc021_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc021.c"> + <pre><code class="language-c">/* A certain grade of steel is graded according to the following conditions: + (i) Hardness must be greater than 50 + (ii) Carbon content must be less than 0.7 + (iii) Tensile strength must be greater than 5600 + +The grades are as follows: + Grade is 10 if all three conditions are met + Grade is 9 if conditions (i) and (ii) are met + Grade is 8 if conditions (ii) and (iii) are met + Grade is 7 if conditions (i) and (iii) are met + Grade is 6 if only one condition is met + Grade is 5 if none of the conditions are met + +Write a program, which will require the user to give values of hardness, +carbon content and tensile strength of the steel under consideration and output +the grade of the steel. */ + +/* Author - Amit Dutta, Date - 4th OCT, 2025 */ +/* Let Us C, Chap- 4, Page - 71, Qn No.: D(c) */ + +#include &lt;stdio.h&gt; +int main() +{ + double hardness, carbon_content, tensile_strength; + printf(&quot;Enter the details of the steel below - \n&quot;); + printf(&quot;1. Hardness : &quot;); + scanf(&quot;%lf&quot;, &amp;hardness); + printf(&quot;2. Carbon Content : &quot;); + scanf(&quot;%lf&quot;, &amp;carbon_content); + printf(&quot;3. Tensile Strength : &quot;); + scanf(&quot;%lf&quot;, &amp;tensile_strength); + + // storing how many conditions are met as boolean result + int condition_met, condition1, condition2, condition3; + condition1 = hardness &gt; 50; + condition2 = carbon_content &lt; 0.7; + condition3 = tensile_strength &gt; 5600; + condition_met = condition1 + condition2 + condition3; + + // now grading according the result + int grade; + if (condition_met == 3) + grade = 10; + else if (condition_met == 2) + { + if (condition1 &amp;&amp; condition2) + grade = 9; + else if (condition2 &amp;&amp; condition3) + grade = 8; + else if (condition1 &amp;&amp; condition3) + grade = 7; + } + else if (condition_met == 1) + grade = 6; + else + grade = 5; + + // printing the result + printf(&quot;\n------------- Result -------------&quot;); + printf(&quot;\n1. Hardness : Condition %s&quot;, condition1 ? &quot;MET&quot; : &quot;DID NOT MET&quot;); + printf(&quot;\n2. Carbon Content : Condition %s&quot;, condition2 ? &quot;MET&quot; : &quot;DID NOT MET&quot;); + printf(&quot;\n3. Tensile Strength : Condition %s&quot;, condition3 ? &quot;MET&quot; : &quot;DID NOT MET&quot;); + printf(&quot;\nTotal Condition Met : %d&quot;, condition_met); + printf(&quot;\n\nGrade : %d\n\n&quot;, grade); + return 0; +} + +/* I did not used this long variable names. I used very short just the first letter of the word. +After writting the whole program, I just renamed the valiables. This is possible in Visual Stdio Code. */</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc022.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc022.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc022_c', 'luc022.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc022_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc022.c"> + <pre><code class="language-c">/* The Body Mass Index (BMI) is defined as ratio of weight of the +person (in Kilograms) to square of the height (in meters). +Write a program that receives weight and height, calculate the BMI, and reports +the BMI catagory as per the following table. + BMI Catagory BMI + Starvation &lt; 15 + Anorexic 15.1 to 17.5 + Underweight 17.6 to 18.5 + Ideal 18.6 to 24.9 + Overweight 25 to 25.9 + Obese 30 to 39.9 + Morbidly Obese &gt;= 40 +*/ +/* Author - Amit Dutta, Date - 4th OCT, 2025 */ +/* Let Us C, Chap- 4, Page - 72, Qn No.: D(d) */ + +#include &lt;stdio.h&gt; + +int main() +{ + double weight, height, bmi; + printf(&quot;Enter your Weight (in Kilograms) and Height (in Meters) : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;weight, &amp;height); + bmi = weight / (height * height); + printf(&quot;\nCalculated BMI : %g&quot;, bmi); + if (bmi &lt; 15) + printf(&quot;\nBMI Catagory : Starvation&quot;); + else if (bmi &gt;= 15.1 &amp;&amp; bmi &lt;= 17.5) + printf(&quot;\nBMI Catagory : Anorexic&quot;); + else if (bmi &gt;= 17.6 &amp;&amp; bmi &lt;= 18.5) + printf(&quot;\nBMI Catagory : Underweight&quot;); + else if (bmi &gt;= 18.6 &amp;&amp; bmi &lt;= 24.9) + printf(&quot;\nBMI Catagory : Ideal&quot;); + else if (bmi &gt;= 25 &amp;&amp; bmi &lt;= 25.9) + printf(&quot;\nBMI Catagory : Overweight&quot;); + else if (bmi &gt;= 30 &amp;&amp; bmi &lt;= 39.9) + printf(&quot;\nBMI Catagory : Obese&quot;); + else if (bmi &gt;= 40) + printf(&quot;\nBMI Catagory : Morbidly Obese&quot;); + else + printf(&quot;\nBMI Catagory : Unclassified&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc023.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc023.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc023_c', 'luc023.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc023_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc023.c"> + <pre><code class="language-c">/* Using conditional operators determine : + (1) Whether the character entered through the keyboard is a + lower case alphabet or not. + (2) Whether a character entered through the keyboard is a special + symbol or not. */ +/* Author - Amit Dutta, Date - 5th OCT, 2025 */ +/* Let Us C, Chap- 4, Page - 72, Qn No.: E(a) */ + +#include &lt;stdio.h&gt; +int main() +{ + char inp; + printf(&quot;Enter the character : &quot;); + scanf(&quot;%c&quot;, &amp;inp); + printf(&quot;\nInput Character &#x27;%c&#x27; is %s a LOWER CASE ALPHABET.&quot;, inp, + (inp &gt;= &#x27;a&#x27; &amp;&amp; inp &lt;= &#x27;z&#x27;) ? &quot;&quot; : &quot;NOT&quot;); + printf(&quot;\nInput Character &#x27;%c&#x27; is %s a SPECIAL SYMBOL.&quot;, inp, + (inp &gt;= &#x27;a&#x27; &amp;&amp; inp &lt;= &#x27;z&#x27; || inp &gt;= &#x27;A&#x27; &amp;&amp; inp &lt;= &#x27;Z&#x27; + || inp &gt;= &#x27;0&#x27; &amp;&amp; inp &lt;= &#x27;9&#x27;) ? &quot;NOT&quot; : &quot;&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc024.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc024.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc024_c', 'luc024.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc024_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc024.c"> + <pre><code class="language-c">/* Write a program using conditional operators to determine whether +a year entered through the keyboard is a leap year or not. */ +/* Author - Amit Dutta, Date - 5th OCT, 2025 */ +/* Let Us C, Chap- 4, Page - 72, Qn No.: E(b) */ + +#include &lt;stdio.h&gt; +int main() +{ + int year; + printf(&quot;Enter the year : &quot;); + scanf(&quot;%d&quot;, &amp;year); + printf(&quot;\nYear %d is %s a Leapyear.&quot;, year, (year % 400 == 0 || year % 4 == 0 &amp;&amp; year % 100 != 0) ? &quot;&quot; : &quot;NOT&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc025.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc025.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc025_c', 'luc025.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc025_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc025.c"> + <pre><code class="language-c">/* Write a program to find the greates of the three numbers entered +through the keyboard. Use conditional operators. */ +/* Author - Amit Dutta, Date - 6th OCT, 2025 */ +/* Let Us C, Chap- 4, Page - 72, Qn No.: E(c) */ + +#include &lt;stdio.h&gt; +int main() +{ + double num1, num2, num3, max; + printf(&quot;Enter three number : &quot;); + scanf(&quot;%lf %lf %lf&quot;, &amp;num1, &amp;num2, &amp;num3); + printf(&quot;\nGreatest of the three number &#x27;%g&#x27;, &#x27;%g&#x27; and &#x27;%g&#x27; is : &#x27;%g&#x27;&quot;, num1, num2, num3, + (num1 &gt; num2 &amp;&amp; num1 &gt; num3) ? num1 : ((num2 &gt; num1 &amp;&amp; num2 &gt; num3) ? num2 : num3)); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc026.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc026.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc026_c', 'luc026.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc026_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc026.c"> + <pre><code class="language-c">/* Write a program to recieve value of an angle in degreesand check +whether sum of squares of sine and cosine of this angle is equal to 1. */ +/* Author - Amit Dutta, Date - 6th OCT, 2025 */ +/* Let Us C, Chap- 4, Page - 73, Qn No.: E(d) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +#define EPSILON 0.0000001 + +int main() +{ + double angle, result; + printf(&quot;Enter the angle value in degree : &quot;); + // checking if the input is other than number. + if(scanf(&quot;%lf&quot;, &amp;angle) != 1) { + printf(&quot;\nPlease enter a number.&quot;); + return 1; + } + angle = angle * (M_PI / 180); // converting degree to radian + result = pow(sin(angle), 2) + pow(cos(angle), 2); + (fabs(result - 1.0) &lt; EPSILON) ? + printf(&quot;\nsum of squares of sine and cosine of this angle is equal to 1.&quot;) : + printf(&quot;\nsum of squares of sine and cosine of this angle is NOT equal to 1.&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc027.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc027.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc027_c', 'luc027.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc027_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc027.c"> + <pre><code class="language-c">/* Rewrite the folowing program using conditional operations + #include&lt;stdio.h&gt; + int main() + { + float sal; + printf(&quot;Enter the salary&quot;); + scanf(&quot;%f&quot;, &amp;sal); + if(sal &gt;= 25000 &amp;&amp; sal &lt;= 40000) + printf(&quot;Manager\n&quot;); + else + if(sal &gt;= 15000 &amp;&amp; sal &lt; 25000) + printf(&quot;Accountant\n&quot;); + else + printf(&quot;Clerk\n&quot;); + return 0; + } +*/ +/* Author - Amit Dutta, Date - 6th OCT, 2025 */ +/* Let Us C, Chap- 4, Page - 73, Qn No.: E(e) */ + +#include &lt;stdio.h&gt; +int main() +{ + float sal; + printf(&quot;Enter the salary&quot;); + scanf(&quot;%f&quot;, &amp;sal); + (sal &gt;= 25000 &amp;&amp; sal &lt;= 40000) ? printf(&quot;Manager\n&quot;) : + ((sal &gt;= 15000 &amp;&amp; sal &lt; 25000) ? printf(&quot;Accountant\n&quot;) : printf(&quot;Clerk\n&quot;)); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc028.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc028.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc028_c', 'luc028.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc028_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc028.c"> + <pre><code class="language-c">/* Write a program to print all the ASCII values and their equivalent +characters using a while loop. The ASCII may vary from 0 to 255. */ +/* Author - Amit Dutta, Date - 7th OCT, 2025 */ +/* Let Us C, Chap- 5, Page - 87, Qn No.: B(a) */ + +#include &lt;stdio.h&gt; +int main() +{ + int i = 0; + printf(&quot;ASCII Value\tCharacter&quot;); + printf(&quot;\n-----------\t---------\n&quot;); + while (i &lt;= 255) + { + printf(&quot;%d.\t%c\n\n&quot;, i, i); + i++; + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc029.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc029.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc029_c', 'luc029.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc029_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc029.c"> + <pre><code class="language-c">/* Write a program to print out all Armstrong numbers between 100 +and 500. If sum of cubes of each digit of the number is equal to the +number itself, then the number is called an Armstrong number. For +example, 153 = (1 * 1 * 1) + (5 * 5 * 5) + (3 * 3 * 3) */ +/* Author - Amit Dutta, Date - 7th OCT, 2025 */ +/* Let Us C, Chap- 5, Page - 87, Qn No.: B(b) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + int num = 100, temp1, temp2, res; + printf(&quot;Armstrong numbers between 100 and 500 :&quot;); + while (num &lt;= 500) + { + temp1 = num; + res = 0; + while (temp1 != 0) + { + temp2 = temp1 % 10; + res = res + pow(temp2, 3); + temp1 = temp1 / 10; + } + if (num == res) + printf(&quot; %d&quot;, num); + num++; + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc030.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc030.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc030_c', 'luc030.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc030_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc030.c"> + <pre><code class="language-c">/* Write a program for a matchstick game being played between the +computer and a user. Your program should ensure that the computer +always wins. Rules for the game are as follows : + - There are 21 matchsticks. + - The computer asks the player to pick 1, 2, 3, or 4 matchsticks. + - After the person picks, the computer does its picking. + - Whoever is forced to pick up the last matchstick loses the game. +*/ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ +/* Let Us C, Chap- 5, Page - 87, Qn No.: B(c) */ + +/* My Plan: The total number of matchsticks is 21. To guarantee a win, +the computer ensures that after its turn, the number of remaining +matchsticks is always a multiple of 5 plus 1 (i.e., 16, 11, 6, 1). +This is achieved by making the sum of the player&#x27;s pick and the +computer&#x27;s pick equal to 5 in each round. This forces the player +to pick the final matchstick. */ + +#include &lt;stdio.h&gt; +int main() +{ + int remaining_matchsticks = 21, player_pick, computer_pick; + printf(&quot; --- Matchstick Game ---\n&quot;); + printf(&quot;Rules: There are 21 matchsticks. You can pick 1, 2, 3, or 4.\n&quot;); + printf(&quot;Whoever is forced to pick the last matchstick loses the game.\n&quot;); + while (remaining_matchsticks &gt; 1) + { + // game start + printf(&quot;\n--------------------------&quot;); + printf(&quot;\nRemaining Matchsticks : %d&quot;, remaining_matchsticks); + + // player pick and checking input is valid or not + printf(&quot;\nYour turn: Pick 1, 2, 3, or 4 matchsticks: &quot;); + if (scanf(&quot;%d&quot;, &amp;player_pick) != 1) + { + printf(&quot;\n\tPlease enter a number.&quot;); + while (getchar() != &#x27;\n&#x27;) + ; + continue; + } + + // checking player pick is valid or not + if (player_pick &lt; 1 || player_pick &gt; 4) + { + printf(&quot;\n\tPlease enter a number among 1, 2, 3 and 4.&quot;); + while (getchar() != &#x27;\n&#x27;) + ; + continue; + } + + if (player_pick &gt; remaining_matchsticks) + { + printf(&quot;\nInvalid choice! There are not enough matchsticks left.&quot;); + while (getchar() != &#x27;\n&#x27;) + ; + continue; + } + + // computer_picks + computer_pick = 5 - player_pick; + printf(&quot;\ncomputer_picks : %d&quot;, computer_pick); + + // remaining matchsticks + remaining_matchsticks = remaining_matchsticks - (player_pick + computer_pick); + } + + // game over + printf(&quot;\n----------------------------------\n&quot;); + printf(&quot;Only 1 matchstick is left.\n&quot;); + printf(&quot;You are forced to pick the last matchstick. You lose!\n&quot;); + printf(&quot;The computer wins.\n&quot;); + + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc031-logic.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc031-logic.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc031-logic_c', 'luc031-logic.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc031-logic_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc031-logic.c"> + <pre><code class="language-c">/* Write a program to enter numbers till the user wants. At the end it +should display the count of positive, negative and zeros entered. */ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ +/* Let Us C, Chap- 5, Page - 87, Qn No.: B(d) */ + +/* + * DETAILED PROGRAM PLAN: + * 1. INITIALIZATION: Set three counters (positive_count, negative_count, zero_count) to zero. + * 2. INPUT LOOP: Start an infinite loop to continuously request user input. + * 3. READ INPUT: Use fgets() to read the user&#x27;s input as a generic string (char array). + * This allows the program to accept multi-digit numbers (e.g., &quot;-500&quot;) or the command (&#x27;n&#x27;). + * 4. TERMINATION CHECK: Immediately check if the input string is exactly &quot;n&quot; using strcmp(). + * If true, the user wants to quit, so break the loop. + * 5. VALIDATION &amp; CONVERSION: If the input is not &quot;n&quot;, use sscanf() to safely attempt to convert + * the string into an integer. + * 6. COUNTING LOGIC: If sscanf() successfully reads an integer (sscanf returns 1): + * - If the number is &gt; 0, increment positive_count. + * - If the number is &lt; 0, increment negative_count. + * - If the number is == 0, increment zero_count. + * 7. ERROR HANDLING: If the input is neither &quot;n&quot; nor a valid number (sscanf returns 0), + * inform the user of invalid input and continue the loop. + * 8. FINAL DISPLAY: After the loop terminates, print the final totals for positive, negative, and zero counts. + */ + +#include &lt;stdio.h&gt; +#include &lt;stdlib.h&gt; // for strtol +#include &lt;string.h&gt; // for strcmp + +// Maximum size of the input line +#define MAX_INPUT_LEN 15 + +int main() { + // Initialize counters + int positive_count = 0; + int negative_count = 0; + int zero_count = 0; + + // Buffer to store the user&#x27;s input as a string (e.g., &quot;123&quot;, &quot;-50&quot;, or &quot;n&quot;) + char input_buffer[MAX_INPUT_LEN]; + int number; + + printf(&quot;--- Number Analyzer ---\n&quot;); + printf(&quot;Enter numbers one by one. Type &#x27;n&#x27; and press Enter to finish.\n\n&quot;); + + // Loop until the user enters &#x27;n&#x27; + while (1) { + printf(&quot;Enter number or &#x27;n&#x27;: &quot;); + + // Read the entire line of input into the buffer + if (fgets(input_buffer, MAX_INPUT_LEN, stdin) == NULL) { + // Handle EOF (end of file) or reading error + break; + } + + // Remove the trailing newline character from the input_buffer + // The last character will be &#x27;\n&#x27; if the input was shorter than MAX_INPUT_LEN + size_t len = strlen(input_buffer); + if (len &gt; 0 &amp;&amp; input_buffer[len - 1] == &#x27;\n&#x27;) { + input_buffer[len - 1] = &#x27;\0&#x27;; + } + + // 1. Check for the termination condition + if (strcmp(input_buffer, &quot;n&quot;) == 0) { + printf(&quot;\n&#x27;n&#x27; received. Stopping input...\n&quot;); + break; // Exit the while loop + } + + // 2. Attempt to convert the input string to an integer + // sscanf attempts to read the string according to the format &quot;%d&quot; (decimal integer) + // It returns 1 if a number was successfully read. + int conversions = sscanf(input_buffer, &quot;%d&quot;, &amp;number); + + if (conversions == 1) { + // Conversion was successful, now check the number&#x27;s sign + if (number &gt; 0) { + positive_count++; + } else if (number &lt; 0) { + negative_count++; + } else { + zero_count++; + } + printf(&quot; -&gt; Number recorded: %d\n&quot;, number); + } else { + // Conversion failed. The input was neither &#x27;n&#x27; nor a valid integer. + printf(&quot; -&gt; Invalid input. Please enter a valid number or &#x27;n&#x27;.\n&quot;); + } + } + + // Display the final results + printf(&quot;\n====================================\n&quot;); + printf(&quot; Analysis Complete\n&quot;); + printf(&quot;====================================\n&quot;); + printf(&quot;Positive numbers entered: %d\n&quot;, positive_count); + printf(&quot;Negative numbers entered: %d\n&quot;, negative_count); + printf(&quot;Zeroes entered: %d\n&quot;, zero_count); + printf(&quot;Total numbers recorded: %d\n&quot;, positive_count + negative_count + zero_count); + printf(&quot;====================================\n&quot;); + + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc031.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc031.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc031_c', 'luc031.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc031_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc031.c"> + <pre><code class="language-c">/* Write a program to enter numbers till the user wants. At the end it +should display the count of positive, negative and zeros entered. */ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ +/* Let Us C, Chap- 5, Page - 87, Qn No.: B(d) */ + +#include &lt;stdio.h&gt; +int main() +{ + int choice = 1, num, positive_count = 0, negative_count = 0, zero_count = 0; + while (choice == 1) + { + printf(&quot;\nEnter the number (Type any character and press Enter to finish.) : &quot;); + choice = scanf(&quot;%d&quot;, &amp;num); // Checking whether the user has input any characters + if (choice == 1) + { + printf(&quot;Number recorded : %d&quot;, num); + if (num &lt; 0) + negative_count++; + else if (num &gt; 0) + positive_count++; + else if (num == 0) + zero_count++; + } + else + { + // If the user inputs any characters, then choice = 0, it means he doesn&#x27;t want to give any more input; + choice = 0; + printf(&quot;\nCharacter received. Stopping input...\n&quot;); + } + } + // Display the final results + printf(&quot;\n====================================\n&quot;); + printf(&quot; Analysis Complete\n&quot;); + printf(&quot;====================================\n&quot;); + printf(&quot;Positive numbers entered: %d\n&quot;, positive_count); + printf(&quot;Negative numbers entered: %d\n&quot;, negative_count); + printf(&quot;Zeroes entered: %d\n&quot;, zero_count); + printf(&quot;Total numbers recorded: %d\n&quot;, positive_count + negative_count + zero_count); + printf(&quot;====================================\n&quot;); +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc032.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc032.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc032_c', 'luc032.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc032_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc032.c"> + <pre><code class="language-c">/* Write a program to recieve an integer and find its octal equivalent. +(Hint : To obtain octal equivalent of an integer, Divide it continuously +by 8 till dividend does not become zero, then write the remainders +obtained in reverse derection.) */ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ +/* Let Us C, Chap- 5, Page - 87, Qn No.: B(e) */ + +// using array + +#include &lt;stdio.h&gt; +int main() +{ + int octal[20], decimal, index = 0, temp, rem; + printf(&quot;Enter the decimal number : &quot;); + scanf(&quot;%d&quot;, &amp;decimal); + temp = decimal; + while (temp != 0) + { + rem = temp % 8; + temp = temp / 8; + octal[index] = rem; + index++; + } + printf(&quot;\nDeciaml %d to octal : &quot;, decimal); + while ((index - 1) &gt;= 0) + { + printf(&quot;%d&quot;, octal[index - 1]); + index--; + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc033.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc033.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc033_c', 'luc033.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc033_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc033.c"> + <pre><code class="language-c">/* Write a program to find the range of a set of numbers entered +through the keyboard. Range is the difference between the smallest +and biggest number in the list. */ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ +/* Let Us C, Chap- 5, Page - 87, Qn No.: B(f) */ + +#include &lt;stdio.h&gt; +int main() +{ + int choice = 1, set_of_numbers[30], num, index = -1; + while (choice == 1) + { + printf(&quot;\nEnter the number (Type any character and press Enter to finish.) : &quot;); + choice = scanf(&quot;%d&quot;, &amp;num); // Checking whether the user has input any characters + if (choice != 1) + { + // If the user inputs any characters, then choice = 0, it means he doesn&#x27;t want to give any more input; + choice = 0; + printf(&quot;\nCharacter received. Stopping input...\n&quot;); + break; + } + index++; + set_of_numbers[index] = num; + } + int max = set_of_numbers[0], min = set_of_numbers[0]; + while (index &gt;= 0) + { + if (max &lt; set_of_numbers[index]) + max = set_of_numbers[index]; + if (min &gt; set_of_numbers[index]) + min = set_of_numbers[index]; + index--; + } + int range = max - min; + printf(&quot;\nBiggest number in the set : %d&quot;, max); + printf(&quot;\nSmallest number in the set : %d&quot;, min); + printf(&quot;\nRange : %d&quot;, range); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc034.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc034.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc034_c', 'luc034.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc034_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc034.c"> + <pre><code class="language-c">/* Write a program to print the multiplication table of the number +entered by the user. The table should get displayed in the following +form : + 29 * 1 = 29 + 29 * 2 = 58 +*/ +/* Author - Amit Dutta, Date - 20th OCT, 2025 */ +/* Let Us C, Chap- 6, Page - 105, Qn No.: B(a) */ + +#include &lt;stdio.h&gt; +int main() +{ + int i, num, res; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + printf(&quot;\n--- Multiplication Table ---\n&quot;); + for (i = 1; i &lt;= 10; i++) + printf(&quot;%d * %d = %d\n&quot;, num, i, num * i); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc035.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc035.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc035_c', 'luc035.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc035_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc035.c"> + <pre><code class="language-c">/* According to a study, the approximate level of intelligence of a +person can be calculated using the following formula. + i = 2 + (y + 0.5x) +write a program that will produce a table of values of i, y and x, +where y varies from 1 to 6, and, for each value of y, x varies from +5.5 to 12.5 in steps of 0.5 */ +/* Author - Amit Dutta, Date - 20th OCT, 2025 */ +/* Let Us C, Chap- 6, Page - 105, Qn No.: B(b) */ + +#include &lt;stdio.h&gt; +int main() +{ + double y, x; + printf(&quot;\n--- Approximate Intelligence ---\n&quot;); + for (y = 1; y &lt;= 6; y++) + { + printf(&quot;\tY = %d\n&quot;, y); + for (x = 5.5; x &lt;= 12.5; x += 0.5) + { + printf(&quot;Y: %g\t X: %.2g\t I: %g\n&quot;, y, x, 2 + (y + 0.5 * x)); + } + printf(&quot;-----------------------\n&quot;); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc036.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc036.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc036_c', 'luc036.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc036_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc036.c"> + <pre><code class="language-c">/* When interest compounds q times per year at an annual rate of +r % for n years, the principle p compounds to an amount a as per +the following formula + a = p (1 + r / q) ^ nq +Write a program to read 10 sets of p, r, n &amp; q and calculate the +corresponding as&#x27; */ +/* Author - Amit Dutta, Date - 20th OCT, 2025 */ +/* Let Us C, Chap- 6, Page - 106, Qn No.: B(c) */ + +// DEVELOPMENT STATUS: This implementation is currently untested. +// Please report any functional defects or errors by submitting a GitHub issue &quot;https://github.com/notamitgamer/bsc/issues&quot; with the updated code. + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + double interest, principalAmount, interestRate, timeInYears, compoundFactor, totalAmount; + int index; + for (index = 1; index &lt;= 10; index++) + { + printf(&quot;Enter Principle amount : &quot;); + scanf(&quot;%lf&quot;, &amp;principalAmount); + printf(&quot;Enter Rate of Interest : &quot;); + scanf(&quot;%lf&quot;, &amp;interestRate); + interestRate *= 0.01; + printf(&quot;Enter the Time (Years) : &quot;); + scanf(&quot;%lf&quot;, &amp;timeInYears); + printf(&quot;Compound count in one year : &quot;); + scanf(&quot;%lf&quot;, &amp;compoundFactor); + totalAmount = (principalAmount * pow((1 + interestRate / compoundFactor), (timeInYears * compoundFactor))); + interest = totalAmount - principalAmount; + printf(&quot;\nInterest : %.2f\nTotal Amount : %.2f\n\n&quot;, interest, totalAmount); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc037.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc037.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc037_c', 'luc037.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc037_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc037.c"> + <pre><code class="language-c">/* The natural logarithm can be approximated by the following series. + (x-1)/x + 1/2 ((x-1)/x)^2 + 1/2 ((x-1)/x)^3 + 1/2 ((x-1)/x)^4 + ... +If x is input through the keyboard, write a program to calculate the +sum of the first seven terms of this series. */ +/* Author - Amit Dutta, Date - 21st OCT, 2025 */ +/* Let Us C, Chap- 6, Page - 106, Qn No.: B(d) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +double series(double x) // made this fn only for fun, making a fn was not necessary +{ + double result = (x - 1) / x; + int i; + for (i = 2; i &lt;= 7; i++) + { + result += 0.5 * pow(((x - 1) / x), i); + } + return result; +} + +int main() +{ + double x; + printf(&quot;Enter the value for x : &quot;); + scanf(&quot;%lf&quot;, &amp;x); + printf(&quot;\nResult : %g&quot;, series(x)); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc038.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc038.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc038_c', 'luc038.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc038_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc038.c"> + <pre><code class="language-c">/* Write a program to generate all Pythagorean Triplets with slide +length less than or equal to 30. */ +/* Author - Amit Dutta, Date - 21st OCT, 2025 */ +/* Let Us C, Chap- 6, Page - 106, Qn No.: B(e) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + int a, b, c; + printf(&quot;Pythagorean Triplets with slide length less than or equal to 30 : \n&quot;); + for (a = 1; a &lt;= 30; a++) + { + for (b = a; b &lt;= 30; b++) + { + int c_square = a * a + b * b; + for (c = b + 1; c &lt;= 30; c++) + { + if (c * c == c_square) + printf(&quot;(%d, %d, %d)\n&quot;, a, b, c); + } + } + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc039.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc039.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc039_c', 'luc039.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc039_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc039.c"> + <pre><code class="language-c">/* Population of a town today is 100000. The population has increased +steadily at the rate of 10% per year for last 10 years. Write a +program to determine the population at the end of each year in the +last decade. */ +/* Author - Amit Dutta, Date - 21st OCT, 2025 */ +/* Let Us C, Chap- 6, Page - 106, Qn No.: B(f) */ + +#include &lt;stdio.h&gt; +int main() +{ + int i, population = 100000; + printf(&quot;Present year : %d\n&quot;, population); + for (i = 1; i &lt;= 10; i++) + { + population /= 1.10; + printf(&quot;%d year ago : %d\n&quot;, i, population); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc040-logic.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc040-logic.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc040-logic_c', 'luc040-logic.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc040-logic_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc040-logic.c"> + <pre><code class="language-c">/* Ramanujan number (1729) is the smallest number that can be +expressed as sum of cubes in two different ways - 1729 can be +expressed as 1^3 + 12^3 and 9^3 + 10^3. Write a program to print all such +numbers up to a reasonable limit. */ +/* Author - Amit Dutta, Date - 22nd - 23rd OCT, 2025 */ +/* Let Us C, Chap- 6, Page - 106, Qn No.: B(g) */ + +// 1. INCLUDE SECTION +#include &lt;stdio.h&gt; // Includes the standard input/output library, necessary for printf() + +// 2. CONSTANT DEFINITIONS (MACROS) +// These define fixed values we can easily use and change later. +#define LIMIT 100000 // The maximum number we want to search up to. +// The maximum base value (a, b, c, or d) we need to check. +// Since 47^3 is greater than 100,000, checking bases up to 47 covers the LIMIT. +#define MAX_BASE_VAL 47 + +// 3. MAIN FUNCTION +int main() +{ + // 4. VARIABLE DECLARATION + + // sum1 and sum2 store the results of a^3 + b^3 and c^3 + d^3. + // We use &#x27;long long&#x27; because cubes (like 47^3) are large and can exceed + // the capacity of a standard &#x27;int&#x27;, preventing errors. + long long sum1, sum2; + + int count = 0; // Counter to keep track of how many Ramanujan numbers we find. + + // This flag is used to optimize the search. If we find the second way (c^3 + d^3) + // to make sum1, we set this to 1 and immediately stop the inner loops. + int found_match; + + // Print introductory message to the user. + printf(&quot;Ramanujan Number Finder (a^3 + b^3 = c^3 + d^3)\n&quot;); + printf(&quot;Searching up to %d (Max base value is %d)\n&quot;, LIMIT, MAX_BASE_VAL); + printf(&quot;---------------------------------------------------\n&quot;); + + // 5. OUTER LOOPS: Establishing the FIRST SUM (a^3 + b^3 = sum1) + + // Loop for &#x27;a&#x27; (the smaller base of the first pair) + for (int a = 1; a &lt;= MAX_BASE_VAL; a++) + { + + // Loop for &#x27;b&#x27; (the larger base of the first pair) + // We start &#x27;b&#x27; at &#x27;a + 1&#x27; to enforce the rule a &lt; b. + // This prevents us from checking redundant pairs like (1, 12) and (12, 1). + for (int b = a + 1; b &lt;= MAX_BASE_VAL; b++) + { + + // Calculate the first sum: sum1 = a^3 + b^3 + // (long long) is a cast to ensure the math is done using the &#x27;long long&#x27; type. + sum1 = (long long)a * a * a + (long long)b * b * b; + + // Optimization 1: Check if the sum exceeds the global limit. + if (sum1 &gt; LIMIT) + { + // Since &#x27;b&#x27; is increasing, any further increase will also be over the limit. + // We stop the &#x27;b&#x27; loop and move to the next &#x27;a&#x27;. + break; + } + + // Reset the flag for every new sum1. + // We start searching for a second way for this new &#x27;sum1&#x27;, so we reset the flag to 0. + found_match = 0; + + // 6. INNER LOOPS: Searching for the SECOND SUM (c^3 + d^3 = sum2) + + // Loop for &#x27;c&#x27; (the smaller base of the second pair) + // We start &#x27;c&#x27; at &#x27;a + 1&#x27; to enforce the rule a &lt; c. + // This ensures the two pairs {(a, b) and (c, d)} are truly distinct (e.g., 1729 = 1^3 + 12^3 and 9^3 + 10^3). + for (int c = a + 1; c &lt;= MAX_BASE_VAL; c++) + { + + // Optimization 2: Check the flag to exit the &#x27;c&#x27; loop early. + if (found_match) + { + // If we already found the second way (c, d) in a previous iteration of &#x27;c&#x27;, stop searching and move to the next (a, b) pair. + break; + } + + // Loop for &#x27;d&#x27; (the larger base of the second pair) + // We start &#x27;d&#x27; at &#x27;c + 1&#x27; to enforce c &lt; d. + for (int d = c + 1; d &lt;= MAX_BASE_VAL; d++) + { + + // Calculate the second sum: sum2 = c^3 + d^3 + sum2 = (long long)c * c * c + (long long)d * d * d; + + // Optimization 3: Check if the second sum has passed the first sum. + if (sum2 &gt; sum1) + { + // Since &#x27;d&#x27; is increasing, any further increase will also be greater than sum1. + // We stop the &#x27;d&#x27; loop and move to the next &#x27;c&#x27;. + break; + } + + // 7. CONDITION CHECK: Have we found a Ramanujan number? + // Check if the two sums are equal. + if (sum1 == sum2) + { + count++; // Increment the counter + + // Print the result in the required format. + printf(&quot;[%d] %lld = %d^3 + %d^3 = %d^3 + %d^3\n&quot;, + count, sum1, a, b, c, d); + + // Set the flag to 1, confirming we found the second way. + found_match = 1; + + // Stop the &#x27;d&#x27; loop immediately, as we found the required second pair. + break; + } + } + // If found_match was set to 1, the &#x27;break&#x27; in the d loop will execute, + // then the &#x27;if (found_match) break;&#x27; in the c loop will execute, + // and the program will move to the next (a, b) pair. + } + } + } + + // 8. CONCLUSION + printf(&quot;---------------------------------------------------\n&quot;); + printf(&quot;Search complete. Found %d Ramanujan-type numbers.\n&quot;, count); + + return 0; // Standard way to indicate successful program execution. +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc040.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc040.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc040_c', 'luc040.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc040_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc040.c"> + <pre><code class="language-c">/* Ramanujan number (1729) is the smallest number that can be +expressed as sum of cubes in two different ways - 1729 can be +expressed as 1^3 + 12^3 and 9^3 + 10^3. Write a program to print all such +numbers up to a reasonable limit. */ +/* Author - Amit Dutta, Date - 22nd - 23rd OCT, 2025 */ +/* Let Us C, Chap- 6, Page - 106, Qn No.: B(g) */ + +#include &lt;stdio.h&gt; + +#define limit 100000 +#define max_base 47 + +int main() +{ + + long long sum1, sum2; + int count = 0; + + printf(&quot;Ramanujan numbers : \n&quot;); + + int found_match; + + for (int a = 1; a &lt;= max_base; a++) + { + for (int b = a + 1; b &lt;= max_base; b++) + { + sum1 = (long long)a * a * a + (long long)b * b * b; + if (sum1 &gt; limit) + { + break; + } + + found_match = 0; + + for (int c = a + 1; c &lt;= max_base; c++) + { + if (found_match) + { + break; + } + for (int d = c + 1; d &lt;= max_base; d++) + { + sum2 = (long long)c * c * c + (long long)d * d * d; + if (sum2 &gt; sum1) + { + break; + } + if (sum1 == sum2) + { + count++; + printf(&quot;(%d.) %lld = %d^3 + %d^3 = %d^3 + %d^3\n&quot;, count, sum1, a, b, c, d); + + found_match = 1; + break; + } + } + } + } + } + + printf(&quot;-------------------------------\n&quot;); + printf(&quot;Search complete.&quot;); + + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc041.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc041.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc041_c', 'luc041.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc041_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc041.c"> + <pre><code class="language-c">/* Write a program to print 24 hours of day with suitable suffixes like +AM, PM, Noon and Midnight. */ +/* Author - Amit Dutta, Date - 23rd OCT, 2025 */ +/* Let Us C, Chap- 6, Page - 106, Qn No.: B(h) */ + +#include &lt;stdio.h&gt; +int main() +{ + int hour, temp; + printf(&quot;Time \tSuffix\n&quot;); + for (int hour = 0; hour &lt;= 23; hour++) + { + if (hour == 0) + printf(&quot;12:00\tAM (Midnight)\n&quot;); + else if (hour == 12) + printf(&quot;12:00\tPM (Noon)\n&quot;); + else if (hour &gt;= 1 &amp;&amp; hour &lt;= 11) + printf(&quot;%02d:00\tAM\n&quot;, hour); + else if (hour &gt;= 13 &amp;&amp; hour &lt;= 23) + printf(&quot;%02d:00\tPM\n&quot;, hour - 12); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc042.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc042.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc042_c', 'luc042.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc042_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc042.c"> + <pre><code class="language-c">/* Write a program to produce the following output : + 1 + 2 3 + 4 5 6 +7 8 9 10 +*/ + +/* Author - Amit Dutta, Date - 23rd OCT, 2025 */ +/* Let Us C, Chap- 6, Page - 106, Qn No.: B(i) */ + +#include &lt;stdio.h&gt; +int main() +{ + int starter = 1; + int tab = 3; + printf(&quot;The pattern : \n&quot;); + for (int i = 1; i &lt;= 4; i++) + { + int count = 0; + for (int k = 1; k &lt;= tab; k++) + { + printf(&quot; &quot;); + } + tab = tab - 1; + for (int j = starter; j &lt;= 10; j++) + { + if (count &gt;= i) + { + break; + } + printf(&quot;%d &quot;, j); + count++; + starter++; + } + printf(&quot;\n&quot;); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc043.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc043.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc043_c', 'luc043.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc043_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc043.c"> + <pre><code class="language-c">/* Write a program to find the grace marks for a student using switch. +The user should enter the class obtained by the student and the +number of subjects he has failed in. Use the following logic. + - If the student gets first class and he fails in more than 3 + subjects, he does not get any grace, Otherwise, he gets a grace + of 5 marks per subject. + - If the student gets second class and he fails in more than 2 + subjects, he does not get any grace. Otherwise, he gets a grace + of 4 marks per subject. + - If the student gets third class and he fails in more than 1 + subject, then he does not get any grace. Otherwise, he gets a + grace of 5 marks. +*/ +/* Author - Amit Dutta, Date - 28th OCT, 2025 */ +/* Let Us C, Chap- 7, Page - 125, Qn No.: C */ + +#include &lt;stdio.h&gt; + +int main() +{ + int studentClass, failedSubjectCount, graceMarks = 0; + printf(&quot;Class obtained by the student (Enter 1 for First Class, 2 for Second Class, 3 for Third Class): &quot;); + scanf(&quot;%d&quot;, &amp;studentClass); + printf(&quot;Failed Subject Count: &quot;); + scanf(&quot;%d&quot;, &amp;failedSubjectCount); + + if (failedSubjectCount &lt; 0) { + printf(&quot;\nFailed subject count cannot be negative.&quot;); + return 1; + } + + switch (studentClass) + { + case 1: + if (failedSubjectCount &lt;= 3) + { + graceMarks += 5 * failedSubjectCount; + } + break; + + case 2: + if (failedSubjectCount &lt;= 2) + { + graceMarks += 4 * failedSubjectCount; + } + break; + + case 3: + if (failedSubjectCount &lt;= 1) + { + graceMarks += 5 * failedSubjectCount; + } + break; + + default: + printf(&quot;\nWrong Choice.&quot;); + return 1; + } + + printf(&quot;\nStudent will get %d grace marks.&quot;, graceMarks); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc044.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc044.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc044_c', 'luc044.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc044_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc044.c"> + <pre><code class="language-c">/* Any year is entered through the keyboard. Write a function to +determine whether the year is aleap year or not. */ +/* Author - Amit Dutta, Date - 17th November, 2025 */ +/* Let Us C, Chap- 8, Page - 144, Qn No.: C(1) */ + +#include &lt;stdio.h&gt; + +int leapYear(int); + +int leapYear(int year) +{ + if ((year % 400 == 0) || ((year % 4 == 0) &amp;&amp; (year % 100 != 0))) + return 1; + else + return 0; +} + +int main() +{ + int year; + printf(&quot;Enter the year : &quot;); + scanf(&quot;%d&quot;, &amp;year); + if (leapYear(year)) + printf(&quot;\nYear %d is a Leap Year.&quot;, year); + else + printf(&quot;\nYear %d is not a Leap Year.&quot;, year); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc045.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc045.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc045_c', 'luc045.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc045_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc045.c"> + <pre><code class="language-c">/* A position integer is entered through the keyboard. Write a Function +to obtain the prime factors of this number. +For example, prime factors of 24 are 2, 2, 2 and 3, whereas prime +factors of 35 are 5 and 7 +*/ +/* Author - Amit Dutta, Date - 17th November, 2025 */ +/* Let Us C, Chap- 8, Page - 144, Qn No.: C(2) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +void findPrimeFactors(int n) +{ + int temp_n = n; + + if (temp_n == 1) + { + printf(&quot;Prime factors of %d are: None.\n&quot;, n); + return; + } + + printf(&quot;Prime factors of %d are:&quot;, n); + + while (temp_n % 2 == 0) + { + printf(&quot; %d&quot;, 2); + temp_n = temp_n / 2; + } + + for (int i = 3; i &lt;= (int)sqrt(temp_n); i = i + 2) + { + while (temp_n % i == 0) + { + printf(&quot; %d&quot;, i); + temp_n = temp_n / i; + } + } + + if (temp_n &gt; 2) + { + printf(&quot; %d&quot;, temp_n); + } + + printf(&quot;\n&quot;); +} + +int main() +{ + int n; + printf(&quot;Enter a positive integer to get the prime factors: &quot;); + if (scanf(&quot;%d&quot;, &amp;n) != 1) + { + printf(&quot;Error: Invalid input. Please enter an integer.\n&quot;); + return 1; + } + if (n &lt;= 0) + { + printf(&quot;Error: Please enter a POSITIVE integer.\n&quot;); + return 1; + } + findPrimeFactors(n); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc046.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc046.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc046_c', 'luc046.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc046_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc046.c"> + <pre><code class="language-c">/* Given three variables x, y, z, write a function to circularly shift their +values to right. In other words, if x = 5, y = 8, z = 10, after circular +shift y = 5, z = 8, x = 10. cal the function with variables a, b, c to +circularly shift values. +*/ +/* Author - Amit Dutta, Date - 24th November, 2025 */ +/* Let Us C, Chap- 9, Page - 163, Qn No.: C(a) */ + +#include &lt;stdio.h&gt; + +void circularShift(int *, int *, int *); + +int main() +{ + int x = 5, y = 8, z = 10; + + printf(&quot;--- Before Shift ---\n&quot;); + printf(&quot;x: %d, y: %d, z: %d&quot;, x, y, z); + + circularShift(&amp;x, &amp;y, &amp;z); + + printf(&quot;\n--- After Shift ---\n&quot;); + printf(&quot;x: %d, y: %d, z: %d&quot;, x, y, z); + + return 0; +} + +void circularShift(int *x, int *y, int *z) +{ + int temp = *z; + *z = *y; + *y = *x; + *x = temp; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc047.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc047.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc047_c', 'luc047.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc047_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc047.c"> + <pre><code class="language-c">/* Define a function that receives weight of a commodity in kilograms +and returns the equivalent weight in Grams, Tons and pounds. Call +this fuction from main() and print the results in main() +*/ +/* Author - Amit Dutta, Date - 24th November, 2025 */ +/* Let Us C, Chap- 9, Page - 163, Qn No.: C(b) */ + +#include &lt;stdio.h&gt; + +void convertWeight(double, double *, double *, double *); + +int main() +{ + double weightGram, weightPound, weightKG, weightTON; + printf(&quot;Enter the weight of the comodity in Kilogram(s): &quot;); + scanf(&quot;%lf&quot;, &amp;weightKG); + + convertWeight(weightKG, &amp;weightGram, &amp;weightPound, &amp;weightTON); + printf(&quot;\n%g Kilogram(s) = %.04f Gram(s)&quot; + &quot;\n%g Kilogram(s) = %.04f Pound(s)&quot; + &quot;\n%g Kilogram(s) = %.04f TON(s)&quot;, + weightKG, weightGram, weightKG, weightPound, weightKG, weightTON); + return 0; +} + +void convertWeight(double weightKG, double *weightGram, double *weightPound, double *weightTON) +{ + *weightGram = weightKG * 1000.0; + *weightPound = weightKG * 2.2046226218; + *weightTON = weightKG / 1000.0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">luc048.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/luc048.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-luc048_c', 'luc048.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-luc048_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/luc048.c"> + <pre><code class="language-c">/* Define a function to compute the distance between two points and +use it to develop another function that will compute the area of the +triangle whose vertices are A(x1, y1), B(x2, y2), and C(x3, y3). Use +these functions to develop a function which returns a value 1 if the +point (x, y) lines inside the triangle ABC, otherwise returns a value +0. Would you get any advantage if you develop these functions to +work on call by reference principle? +*/ +/* Author - Amit Dutta, Date - 25th November, 2025 */ +/* Let Us C, Chap- 9 (Pointers), Page - 163, Qn No.: C(c) */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +#include &lt;ctype.h&gt; +#include &lt;stdlib.h&gt; + +void distance(double, double, double, double, double *); +void area(double, double, double, double, double, double, double *); +int is_inside(double, double, double, double, double, double, double, double); + +int main() +{ + + // Variables + double x, y, x1, x2, y1, y2, x3, y3, result_Distance, result_Area; + char choice; + + /* ********** Requirement: 1 ********** */ + + // Calculate the length of the line segment between two points, P1(x1, y1) and P2(x2, y2). + // Function Used: distance() + + printf(&quot;--- Compute the distance between two points ---\n\n&quot;); + printf(&quot;Enter the co-ordinates of Point 1 (Ex.: 5,6): &quot;); + scanf(&quot;%lf,%lf&quot;, &amp;x1, &amp;y1); + printf(&quot;Enter the co-ordinates of Point 2 (Ex.: 3,4): &quot;); + scanf(&quot;%lf,%lf&quot;, &amp;x2, &amp;y2); + + distance(x1, y1, x2, y2, &amp;result_Distance); + printf(&quot;\nDistance between P1(%g, %g) and P2(%g, %g) = %g&quot;, + x1, y1, x2, y2, result_Distance); + + /* ********** Requirement: 2 ********** */ + + // Calculate the area of a triangle ABC using its three vertices A(x1, y1), B(x2, y2), and C(x3, y3). + // Fuction Used: distance(), area() + + printf(&quot;\n\n--- Compute the area of a triangle ABC ---\n\n&quot;); + printf(&quot;Enter the co-ordinates of Point A (Ex.: 5,6): &quot;); + scanf(&quot;%lf,%lf&quot;, &amp;x1, &amp;y1); + printf(&quot;Enter the co-ordinates of Point B (Ex.: 3,4): &quot;); + scanf(&quot;%lf,%lf&quot;, &amp;x2, &amp;y2); + printf(&quot;Enter the co-ordinates of Point C (Ex.: 6,7): &quot;); + scanf(&quot;%lf,%lf&quot;, &amp;x3, &amp;y3); + + area(x1, y1, x2, y2, x3, y3, &amp;result_Area); + printf(&quot;\nArea of the A(%g, %g), B(%g, %g), C(%g, %g) = %g&quot;, + x1, y1, x2, y2, x3, y3, result_Area); + + /* ********** Requirement: 3 ********** */ + + // Check if a test point P(x, y) lies strictly inside the triangle ABC. + // Function Used: distance(), area(), is_inside() + + printf(&quot;\n\n--- Check if a test point P(x, y) lies strictly inside the triangle ABC ---\n\n&quot;); + printf(&quot;Do you wish to use previous entered triangle?&quot; + &quot;\nIf Yes, type &#x27;Y&#x27;; If No, type &#x27;N&#x27;: &quot;); + scanf(&quot; %c&quot;, &amp;choice); + choice = toupper(choice); + switch (choice) + { + case &#x27;Y&#x27;: + break; + case &#x27;N&#x27;: + printf(&quot;Enter the co-ordinates of Point A (Ex.: 5,6): &quot;); + scanf(&quot;%lf,%lf&quot;, &amp;x1, &amp;y1); + printf(&quot;Enter the co-ordinates of Point B (Ex.: 3,4): &quot;); + scanf(&quot;%lf,%lf&quot;, &amp;x2, &amp;y2); + printf(&quot;Enter the co-ordinates of Point C (Ex.: 6,7): &quot;); + scanf(&quot;%lf,%lf&quot;, &amp;x3, &amp;y3); + break; + default: + printf(&quot;\nYou entered invalid choice.&quot;); + break; + } + printf(&quot;Enter the co-ordinates of Test Point (Ex.: 3,5): &quot;); + scanf(&quot;%lf,%lf&quot;, &amp;x, &amp;y); + + if (is_inside(x, y, x1, y1, x2, y2, x3, y3)) + printf(&quot;\nTest Point (%g, %g) is inside ABC.&quot;, x, y); + else + printf(&quot;\nTest Point (%g, %g) is not inside ABC.&quot;, x, y); + + /* ANSWER TO THE QUESTION: + Qn.: + Would you get any advantage if you develop these functions to + work on call by reference principle? + + Ans: + NO, there is no advantage, and moreover, that would be a disadvantage. + It introduces unnecessary dereferencing overhead for every operation, + Which is less efficient than reading the simple value copy supplied by Call by Value. + */ + + // End of Program + return 0; +} + +void distance(double x1, double y1, double x2, double y2, double *result_Distance) +{ + *result_Distance = sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)); +} + +void area(double x1, double y1, double x2, double y2, double x3, double y3, double *result_Area) +{ + double s, ab, bc, ac; + + distance(x1, y1, x2, y2, &amp;ab); + distance(x2, y2, x3, y3, &amp;bc); + distance(x1, y1, x3, y3, &amp;ac); + + s = (ab + bc + ac) / 2.0; + double area_sq = s * (s - ab) * (s - bc) * (s - ac); + + if (area_sq &lt; 0) + // Handle cases where area_sq is slightly negative due to floating-point errors + *result_Area = 0.0; + else + *result_Area = sqrt(area_sq); +} + +int is_inside(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3) +{ + double area_ABC, area_PAB, area_PBC, area_PAC; + + const double EPSILON = 0.000001; + + area(x1, y1, x2, y2, x3, y3, &amp;area_ABC); + area(x, y, x1, y1, x2, y2, &amp;area_PAB); + area(x, y, x2, y2, x3, y3, &amp;area_PBC); + area(x, y, x1, y1, x3, y3, &amp;area_PAC); + + double sum_of_sub_areas = area_PAB + area_PBC + area_PAC; + + if (fabs(area_ABC - sum_of_sub_areas) &lt; EPSILON) + return 1; + else + return 0; +} + +/* + *************** SAMPLE OUTPUT *************** + +PS G:\bsc\letusc&gt; ./*.exe +--- Compute the distance between two points --- + +Enter the co-ordinates of Point 1 (Ex.: 5,6): 1234.56,7890.12 +Enter the co-ordinates of Point 2 (Ex.: 3,4): 1234.56,7891.12 + +Distance between P1(1234.56, 7890.12) and P2(1234.56, 7891.12) = 1 + +--- Compute the area of a triangle ABC --- + +Enter the co-ordinates of Point A (Ex.: 5,6): 100.10,200.20 +Enter the co-ordinates of Point B (Ex.: 3,4): 105.10,200.20 +Enter the co-ordinates of Point C (Ex.: 6,7): 100.10,205.20 + +Area of the A(100.1, 200.2), B(105.1, 200.2), C(100.1, 205.2) = 12.5 + +--- Check if a test point P(x, y) lies strictly inside the triangle ABC --- + +Do you wish to use previous entered triangle? +If Yes, type &#x27;Y&#x27;; If No, type &#x27;N&#x27;: y +Enter the co-ordinates of Test Point (Ex.: 3,5): 101.10,201.20 + +Test Point (101.1, 201.2) is inside ABC. + +*/</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem001.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem001_c', 'lucproblem001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem001.c"> + <pre><code class="language-c">/* Consider a currency system in which there are notes of six denominations, +namely, Rs. 1, Rs. 2, rs. 5, Rs. 10, Rs. 50, Rs. 100. If a sum +of Rs. N is entered through the keyboard, Write a program to compute +the smallest number of notes that will combine to give Rs. N. */ +/* Author - Amit Dutta, Date - 29th SEP, 2025 */ +/* Let Us C, Chap - 2, Page - 22, Problem 2.3 */ + +#include &lt;stdio.h&gt; +int main() +{ + int n, nonotes, temp; + printf(&quot;Enter the amount : &quot;); + scanf(&quot;%d&quot;, &amp;n); + if (n &lt; 1) + { + printf(&quot;\nAmount should be a positive integer.&quot;); + return 1; + } + temp = n; + nonotes = n / 100; + n = n % 100; + nonotes = nonotes + (n / 50); + n = n % 50; + nonotes = nonotes + (n / 10); + n = n % 10; + nonotes = nonotes + (n / 5); + n = n % 5; + nonotes = nonotes + (n / 2); + n = n % 2; + nonotes = nonotes + n; + printf(&quot;\nthe smallest number of notes that will combine to give Rs. %d : %d&quot;, temp, nonotes); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem002.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem002_c', 'lucproblem002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem002.c"> + <pre><code class="language-c">/* A year is entered through the keyboard, write a program to +determine whether the year is leap or not. Use the logical operators +&amp;&amp; and || . */ +/* Author - Amit Dutta, Date - 02th OCT, 2025 */ +/* Let Us C, Chap - 4, Page - 64, Problem 4.1 */ + +#include &lt;stdio.h&gt; +int main() +{ + int year; + printf(&quot;Enter year : &quot;); + scanf(&quot;%d&quot;, &amp;year); + if (year % 4 == 0 &amp;&amp; year &amp; 100 != 0 || year % 400 == 0) + printf(&quot;\nYear %d is a leapyear.&quot;, year); + else + printf(&quot;\nYear %d is not a leapyear.&quot;, year); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem003.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem003_c', 'lucproblem003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem003.c"> + <pre><code class="language-c">/* If a character is entered through the keyboard, Write a program +to determine whether the character is a capital letter, a small case letter, +a digit or a speacial symbol. +The following table shows the range of ASCII values for various characters : + Characters ASCII Values + A - Z 65 - 90 + a - z 97 - 122 + 0 - 9 48 - 57 + special symbols 0 - 47, 58 - 64, 91 - 96, 123 - 127 +*/ +/* Author - Amit Dutta, Date - 02th OCT, 2025 */ +/* Let Us C, Chap - 4, Page - 65, Problem 4.2 */ + +#include &lt;stdio.h&gt; +int main() +{ + char inp; + printf(&quot;Enter one character : &quot;); + scanf(&quot; %c&quot;, &amp;inp); + if (inp &gt;= 64 &amp;&amp; inp &lt;= 90) + printf(&quot;\nInput &#x27;%c&#x27; is a CAPITAL LETTER.&quot;, inp); + if (inp &gt;= 97 &amp;&amp; inp &lt;= 122) + printf(&quot;\nInput &#x27;%c&#x27; is a SMALL CASE LETTER.&quot;, inp); + if (inp &gt;= 48 &amp;&amp; inp &lt;= 57) + printf(&quot;\nInput &#x27;%c&#x27; is a DIGIT.&quot;, inp); + if (inp &gt;= 0 &amp;&amp; inp &lt;= 47 || inp &gt;= 58 &amp;&amp; inp &lt;= 64 + || inp &gt;= 91 &amp;&amp; inp &lt;= 96 || inp &gt;= 123 &amp;&amp; inp &lt;= 127) + printf(&quot;\nInput &#x27;%c&#x27; is a SPECIAL SYMBOL.&quot;, inp); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem004.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem004_c', 'lucproblem004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem004.c"> + <pre><code class="language-c">/* If the lengths of three sides of a triangle are entered through the +keyboard, write a program to check whether the triangle is valid or not. +The triangle is valid if the sum of two sides is greater that the largest +of the three sides. */ +/* Author - Amit Dutta, Date - 02th OCT, 2025 */ +/* Let Us C, Chap - 4, Page - 66, Problem 4.3 */ + +#include &lt;stdio.h&gt; +int main() +{ + double side1, side2, side3; + printf(&quot;Enter the length of side1, side2 and side3 of the triangle : &quot;); + scanf(&quot;%lf %lf %lf&quot;, &amp;side1, &amp;side2, &amp;side3); + if (side1 &lt;= 0 || side2 &lt;= 0 || side3 &lt;= 0) + { + printf(&quot;\nTriangle sides must be positive.\n&quot;); + return 1; + } + if ((side1 + side2 &gt; side3) &amp;&amp; (side1 + side3 &gt; side2) &amp;&amp; (side2 + side3 &gt; side1)) + // Triangle Inequality Theorem + printf(&quot;\nThis triangle is valid.&quot;); + else + printf(&quot;\nThis triangle is not valid.&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem005.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem005_c', 'lucproblem005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem005.c"> + <pre><code class="language-c">/* Write a program to calculate overtime pay of 10 employees. Overtime is +paid at the rate of Rs. 120.00 per hour for every hour worked above 40 +hours. Assume that employees do not work for fractional part of an hour. */ +/* ONLY WHILE LOOP ALLOWED */ +/* Author - Amit Dutta, Date - 07th OCT, 2025 */ +/* Let Us C, Chap - 5, Page - 83, Problem 5.1 */ + +#include &lt;stdio.h&gt; +#include &lt;conio.h&gt; +int main() +{ + int working_hour, i = 1; + double pay; + while (i &lt;= 10) + { + printf(&quot;Enter the working hour for the employee no. %d : &quot;, i); + if (scanf(&quot;%d&quot;, &amp;working_hour) != 1) + { + printf(&quot;\n\tPlease enter a number as woking hour.\n\n&quot;); + while (getchar() != &#x27;\n&#x27;) + ; + // above line discard the input characters untill getchar() reaches the new line character. + /* if I do not discard the input, after &#x27;continue;&#x27; statement that input will be again taken + by scanf (In the line 17). It will be a infinite loop of error. */ + continue; + } + // checking overtime + if (working_hour &gt; 40) + { + pay = (working_hour - 40) * 120.00; + printf(&quot;\n\tOvertime working hours of Employee %d : %d&quot;, i, (working_hour - 40)); + printf(&quot;\n\tPay of the overtime for Employee %d : Rs. %.2f\n\n&quot;, i, pay); + } + else + printf(&quot;\n\tEmployee %d did not work any overtime.\n\n&quot;, i); + i++; // changing to next employee + } +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem006.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem006_c', 'lucproblem006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem006.c"> + <pre><code class="language-c">/* Write a program to find the factorial value of any number entered +through the keyboard. */ +/* Author - Amit Dutta, Date - 07th OCT, 2025 */ +/* Let Us C, Chap - 5, Page - 84, Problem 5.2 */ + +#include &lt;stdio.h&gt; +int main() +{ + int num, i = 1; + long long fact = 1; + printf(&quot;Enter the number : &quot;); + // checking if the input is valid or not + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nPlease enter a number.&quot;); + return 1; + } + // result for the negetive input + if (num &lt; 0) + { + printf(&quot;\nFactorial of %d : Undefined&quot;, num); + return 1; + } + // Hard codded result for input &#x27;0&#x27; (zero) + if (num == 0) + { + printf(&quot;\nFactorial of 0 : 1&quot;); + return 0; + } + // calculating result + while (i &lt;= num) { + fact = fact * i; + i++; + } + printf(&quot;\nFactorial of %d : %d&quot;, num, fact); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem007.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem007_c', 'lucproblem007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem007.c"> + <pre><code class="language-c">/* Two numbers are entered through the keyboard. Write a program to +find the value of one number raised to the power of another */ +/* Author - Amit Dutta, Date - 07th OCT, 2025 */ +/* Let Us C, Chap - 5, Page - 84, Problem 5.3 */ + +#include &lt;stdio.h&gt; +int main() +{ + double num, result; + int power, i = 1; + printf(&quot;Enter the numbers in &#x27;num^power&#x27; format : &quot;); + // checking if the input is valid or not + if (scanf(&quot;%lf^%d&quot;, &amp;num, &amp;power) != 2) + { + printf(&quot;\nPlease enter numbers.&quot;); + return 1; + } + // result for the negetive input + if (power &lt; 0) + { + printf(&quot;\nPlease use a positive number as power.&quot;); + return 1; + } + // Hard codded result for input &#x27;0&#x27; (zero) + if (power == 0) + { + printf(&quot;\n%g to the power of %d is : 1&quot;, num, power); + return 0; + } + result = num; + while (i &lt;= power - 1) + { + result = result * num; + i++; + } + printf(&quot;\n%g to the power of %d is : %g&quot;, num, power, result); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem008.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem008_c', 'lucproblem008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem008.c"> + <pre><code class="language-c">/* Write a problem to print all the prime numbers from 1 to 300. */ +/* Author - Amit Dutta, Date - 24th OCT, 2025 */ +/* Let Us C, Chap - 6, Page - 101, Problem 6.1 */ + +// Method: Trial Division (Optimized to check up to sqrt(N)) + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +#include &lt;stdbool.h&gt; + +#define LIMIT 300 + +int main() +{ + printf(&quot;Prime numbers from 1 to 300 : 2&quot;); // as 2 is the only even prime number + for (int i = 3; i &lt;= LIMIT; i += 2) // skipping all other even number + { + int n = (int)sqrt(i); + bool prime = true; + + for (int j = 3; j &lt;= n; j += 2) + // an odd number is only devisable by another odd number. + // so, skipping even number. + { + if (i % j == 0) + { + prime = false; + break; + } + } + if (prime) + { + printf(&quot; %d&quot;, i); + } + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem009.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem009_c', 'lucproblem009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem009.c"> + <pre><code class="language-c">/* Write a program to add first seven terms of the following series using a +for loop. + 1 / 1! + 2 / 2! + 3 / 3! + ... +*/ +/* Author - Amit Dutta, Date - 24th OCT, 2025 */ +/* Let Us C, Chap - 6, Page - 102, Problem 6.2 */ + +#include &lt;stdio.h&gt; +#define N 7 // update N here + +int main() +{ + double sum = 0; int fact = 1; + for (int i = 1; i &lt;= N; i++) + { + fact *= i; + sum += (double)i / fact; + } + printf(&quot;Sum of the series : %g&quot;, sum); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem010-complex.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem010-complex.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem010-complex_c', 'lucproblem010-complex.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem010-complex_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem010-complex.c"> + <pre><code class="language-c">/* Write a program to generate all combinations (permutations) of 1, 2 and 3 + from 1-digit numbers up to 4-digit numbers using a main loop to control + the number of digits (1 to 3333). +*/ +/* Author - Amit Dutta, Date - 24th OCT, 2025 */ +/* Let Us C, Chap - 6, Page - 103, Problem 6.3 */ + +#include &lt;stdio.h&gt; + +// --- RECURSIVE FUNCTION TO ACHIEVE DYNAMIC NESTING --- +// current_digit: The digit being placed in the current position (1, 2, or 3) +// target_length: The total length of the number we are building (e.g., 3 for 3-digit numbers) +// current_number: The integer value built so far +// current_length: How many digits have been placed so far +void generate_combinations(int target_length, int current_number, int current_length) +{ + + // Base Case 1: The number is complete. Print it and return. + if (current_length == target_length) + { + printf(&quot; %d&quot;, current_number); + return; + } + + // Recursive Step: Try placing the next digit (1, 2, or 3) + // The for loop now iterates through the *possible values* for the next digit. + for (int next_digit = 1; next_digit &lt;= 3; next_digit++) + { + + // Build the new number: old_number * 10 + next_digit + int new_number = current_number * 10 + next_digit; + + // Recurse: Try to place the next digit + generate_combinations(target_length, new_number, current_length + 1); + } +} + +int main() +{ + printf(&quot;Combination of 1, 2 and 3 (1-digit up to 4-digits):\n&quot;); + + /* This outer loop achieves the structure you were going for: + iterating through the required number of digits (1, 2, 3, 4). + */ + for (int noOfDigits = 1; noOfDigits &lt;= 4; noOfDigits++) + { + printf(&quot;\n\n--- %d-DIGIT NUMBERS (%d total) ---\n&quot;, noOfDigits, (1 &lt;&lt; noOfDigits) * 3 / 4 * 4 / 3 * 3 * 3 / 9 * 3 + (noOfDigits == 1 ? 0 : 9) + (noOfDigits == 2 ? 0 : 9) + (noOfDigits == 3 ? 0 : 81) + (noOfDigits == 4 ? 0 : 0) + (noOfDigits == 1 ? 3 : 0) + (noOfDigits == 2 ? 9 : 0) + (noOfDigits == 3 ? 27 : 0) + (noOfDigits == 4 ? 81 : 0)); // Prints the count 3, 9, 27, or 81 + + // Start the recursive generation for the current length + generate_combinations(noOfDigits, 0, 0); + } + + printf(&quot;\n\nTotal permutations generated: 120\n&quot;); + + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem010.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem010_c', 'lucproblem010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem010.c"> + <pre><code class="language-c">/* Write a program to generate all combination of 1, 2 and 3 using for loop. */ +/* Author - Amit Dutta, Date - 24th OCT, 2025 */ +/* Let Us C, Chap - 6, Page - 103, Problem 6.3 */ + +#include &lt;stdio.h&gt; + +int main() +{ + printf(&quot;Combination of 1, 2 and 3 :&quot;); + + // for 1 digit numbers + for (int i = 1; i &lt;= 3; i++) + { + printf(&quot; %d&quot;, i); + } + + // for 2 digit numbers + for (int i = 1; i &lt;= 3; i++) + { + for (int j = 1; j &lt;= 3; j++) + { + printf(&quot; %d%d&quot;, i, j); + } + } + + // for 3 digit numbers + for (int i = 1; i &lt;= 3; i++) + { + for (int j = 1; j &lt;= 3; j++) + { + for (int k = 1; k &lt;= 3; k++) + { + printf(&quot; %d%d%d&quot;, i, j, k); + } + } + } + + // for 4 digit numbers + for (int i = 1; i &lt;= 3; i++) + { + for (int j = 1; j &lt;= 3; j++) + { + for (int k = 1; k &lt;= 3; k++) + { + for (int l = 1; l &lt;= 3; l++) + { + printf(&quot; %d%d%d%d&quot;, i, j, k, l); + } + } + } + } + + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem011.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem011_c', 'lucproblem011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem011.c"> + <pre><code class="language-c">/* Write a menu driven program which has following options : + 1. Factorial of a number + 2. Prime or not + 3. Odd or even + 4. Exit +Once a menu item is selected the appropriate action should be taken +and once this action is finished, the menu should reappear. Unless +the user selects the &#x27;Exit&#x27; option the program should continue work. +*/ +/* Author - Amit Dutta, Date - 26th OCT, 2025 */ +/* Let Us C, Chap - 7, Page - 118, Problem 7.1 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +#include &lt;stdlib.h&gt; +#include &lt;stdbool.h&gt; + +// Function to clear the input buffer after scanf to prevent issues in the next input. +void clearInputBuffer() +{ + int c; + while ((c = getchar()) != &#x27;\n&#x27; &amp;&amp; c != EOF) + ; +} + +// Calculates the factorial of the input number. +void factorial(int num) +{ + // Factorial is not defined for negative numbers. + if (num &lt; 0) + { + printf(&quot;\nFactorial is not defined for negative numbers.&quot;); + return; + } + // Checks for input over 20 to prevent long long integer overflow (20! is max safe). + if (num &gt; 20) + { + printf(&quot;\nFactorial of %d is too large to calculate (max safe integer factorial is 20!).&quot;, num); + return; + } + long long fact = 1; + // Calculate factorial iteratively. + for (int i = 1; i &lt;= num; i++) + { + fact *= i; + } + printf(&quot;\nFactorial of %d = %lld&quot;, num, fact); + return; +} + +// Checks if the input number is a prime number. +void prime(int num) +{ + // Handle special cases: 1 and 2. + if (num == 1) + { + printf(&quot;\nInput 1 is NOT a PRIME NUMBER.&quot;); + return; + } + else if (num == 2) + { + printf(&quot;\nInput 2 is a PRIME NUMBER. (Fact : 2 is only even prime number)&quot;); + return; + } + // Exclude all other even numbers. + if (num % 2 == 0) + { + printf(&quot;\nInput %d is NOT a PRIME NUMBER.&quot;, num); + return; + } + // Optimization: Only check divisors up to the square root of num. + int endCheckDigit = sqrt(num); + bool isPrime = true; + // Check only odd divisors (i += 2) starting from 3. + for (int i = 3; i &lt;= endCheckDigit; i += 2) + { + if (num % i == 0) + { + printf(&quot;\nInput %d is NOT a PRIME NUMBER.&quot;, num); + isPrime = false; + break; + } + } + if (isPrime) + { + printf(&quot;\nInput %d is a PRIME NUMBER.&quot;, num); + return; + } +} + +// Checks if the input number is odd or even. +void oddoreven(int num) +{ + // A number is even if it is perfectly divisible by 2. + if (num % 2 == 0) + { + printf(&quot;\nInput %d is a EVEN NUMBER.&quot;, num); + return; + } + else + { + printf(&quot;\nInput %d is a ODD NUMBER.&quot;, num); + return; + } +} + +// Main function: displays the menu and controls program flow. +int main() +{ + int choice, num; + // Infinite loop ensures the menu reappears after every operation until &#x27;Exit&#x27; is chosen. + while (1) + { + // Display menu options. + printf(&quot;\n\n===== MENU =====&quot; + &quot;\n1. Factorial of a number&quot; + &quot;\n2. Prime or not&quot; + &quot;\n3. Odd or Even&quot; + &quot;\n4. Exit&quot;); + printf(&quot;\nEnter your choice : &quot;); + + // Input validation for menu choice. + if (scanf(&quot;%d&quot;, &amp;choice) != 1) + { + printf(&quot;\nPlease enter a number.&quot;); + clearInputBuffer(); + continue; + } + clearInputBuffer(); + + // Handle menu selection using switch-case. + switch (choice) + { + case 1: + printf(&quot;\n=== FACTORIAL OF A NUMBER ===&quot;); + printf(&quot;\nEnter the number : &quot;); + // Input validation for the number to be factored. + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nPlease enter a number.&quot;); + clearInputBuffer(); + continue; + } + clearInputBuffer(); + factorial(num); + break; + case 2: + printf(&quot;\n=== PRIME OR NOT ===&quot;); + printf(&quot;\nEnter the number : &quot;); + // Input validation for the number to be checked. + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nPlease enter a number.&quot;); + clearInputBuffer(); + continue; + } + clearInputBuffer(); + // Require a non-negative, non-zero number for prime check. + if (num &lt; 0) + { + printf(&quot;\nPlease enter a postive number.&quot;); + continue; + } + else if (num == 0) + { + printf(&quot;\nPlease enter a non-zero number.&quot;); + continue; + } + prime(num); + break; + case 3: + printf(&quot;\n=== ODD OR EVEN ===&quot;); + printf(&quot;\nEnter the number : &quot;); + // Input validation for the number to be checked. + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nPlease enter a number.&quot;); + clearInputBuffer(); + continue; + } + clearInputBuffer(); + oddoreven(num); + break; + case 4: + // Exit the program cleanly. + printf(&quot;\nExiting the program.\n\nSAYONARA...\n\n&quot;); + exit(0); + default: + // Handle invalid menu choice input. + printf(&quot;\nPlease enter a valid choice.&quot;); + break; + } + } +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem012.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem012.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem012_c', 'lucproblem012.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem012_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem012.c"> + <pre><code class="language-c">/* Write a Function power(a, b), to calculate the value of a raised to b */ +/* Author - Amit Dutta, Date - 17th November, 2025 */ +/* Let Us C, Chap - 8, Page - 141, Problem 8.2 */ + +#include &lt;stdio.h&gt; + +double power(double, int); + +double power(double a, int b) +{ + if (b == 0) + return 1; + double res = 1; + int i; + if (b &gt; 0) + for (i = 1; i &lt;= b; i++) + res *= a; + return res; +} + +int main() +{ + double a, result; + int b; + printf(&quot;Enter the value and the power (Format A^B) : &quot;); + scanf(&quot;%lf^%d&quot;, &amp;a, &amp;b); + result = power(a, b); + printf(&quot;Result of %g^%d = %g&quot;, a, b, result); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem013.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem013.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem013_c', 'lucproblem013.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem013_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem013.c"> + <pre><code class="language-c">/* Define a function to convert any given year into its Roman equivalent. +Use these roman equivalent for decimal numbers : 1 - I, 5 - V, 10 - X, +50 - L, 100 - C, 500 - D, 1000 - M */ +/* Author - Amit Dutta, Date - 17th November, 2025 */ +/* Let Us C, Chap - 8, Page - 141, Problem 8.3 */ + +#include &lt;stdio.h&gt; + +void romanise(int); + +void romanise(int year) +{ + int values[] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; + const char *romanChar[] = {&quot;M&quot;, &quot;CM&quot;, &quot;D&quot;, &quot;CD&quot;, &quot;C&quot;, &quot;XC&quot;, &quot;L&quot;, &quot;XL&quot;, &quot;X&quot;, &quot;IX&quot;, &quot;V&quot;, &quot;IV&quot;, &quot;I&quot;}; + // including the two-character subtractive pairs. + int i = 0; + + printf(&quot;Year %d = &quot;, year); + while (year &gt; 0) + { + if (year &gt;= values[i]) + { + printf(&quot;%s&quot;, romanChar[i]); + year -= values[i]; + } + else + i++; + } +} + +int main() +{ + int year; + printf(&quot;Enter the year : &quot;); + scanf(&quot;%d&quot;, &amp;year); + romanise(year); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem014-short.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem014-short.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem014-short_c', 'lucproblem014-short.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem014-short_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem014-short.c"> + <pre><code class="language-c">/* Write a function that receives integers and returns the sum, average +and standard deviation of these numbers. Call this function from main() +and print the result in main() */ +/* Author - Amit Dutta, Date - 23th November, 2025 */ +/* Let Us C, Chap - 9, Page 159, Problem 9.1 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +void stats(double *, double *, double *); + +int main() +{ + double sum, average, standardDeviation; + stats(&amp;sum, &amp;average, &amp;standardDeviation); + + printf(&quot;\n--- Stats ---&quot; + &quot;\nSum: %g&quot; + &quot;\nAverage: %g&quot; + &quot;\nStandard Deviation: %g&quot;, + sum, average, standardDeviation); + return 0; +} + +void stats(double *sum, double *average, double *standardDeviation) +{ + int n; + printf(&quot;How many numbers you want to give input: &quot;); + scanf(&quot;%d&quot;, &amp;n); + + double inputNumber[n]; + int i; + + printf(&quot;\n--- Enter Numbers ---\n&quot;); + for (i = 0; i &lt; n; i++) + { + printf(&quot;Enter number %d: &quot;, i + 1); + scanf(&quot;%lf&quot;, &amp;inputNumber[i]); + } + + double tempSum = 0; + for (i = 0; i &lt; n; i++) + tempSum += inputNumber[i]; + + double tempAverage = tempSum / n; + + double tempStandardDeviation = 0.0; + + if (n &gt; 1) + { + double tempSumation = 0; + for (i = 0; i &lt; n; i++) + tempSumation += pow((inputNumber[i] - tempAverage), 2.0); + + tempStandardDeviation = sqrt(tempSumation / (n - 1)); + } + + *sum = tempSum; + *average = tempAverage; + *standardDeviation = tempStandardDeviation; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem014.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem014.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem014_c', 'lucproblem014.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem014_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem014.c"> + <pre><code class="language-c">/* Write a function that receives integers and returns the sum, average +and standard deviation of these numbers. Call this function from main() +and print the result in main() */ +/* Author - Amit Dutta, Date - 23th November, 2025 */ +/* Let Us C, Chap - 9, Page 158, Problem 9.1 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +// Function prototype: Using pointers for &#x27;call by reference&#x27; to return 3 values. +void stats(double *, double *, double *); + +int main() +{ + double sum, average, standardDeviation; + // Passing addresses of variables to receive results from the function. + stats(&amp;sum, &amp;average, &amp;standardDeviation); + + printf(&quot;\n--- Stats ---&quot; + &quot;\nSum: %g&quot; + &quot;\nAverage: %g&quot; + &quot;\nStandard Deviation: %g&quot;, + sum, average, standardDeviation); + return 0; +} + +// Function to calculate statistics on user-provided numbers. +void stats(double *sum, double *average, double *standardDeviation) +{ + int n; + // Input Validation Loop for N + do + { + printf(&quot;How many numbers you want to give input: &quot;); + + if (scanf(&quot;%d&quot;, &amp;n) == 1) + { + break; + } + else + { + printf(&quot;\nPlease enter a valid number.\n&quot;); + // Clearing input buffer to handle invalid input + while (getchar() != &#x27;\n&#x27; &amp;&amp; !feof(stdin)) + ; + } + } while (1); + + // Variable-Length Array (VLA) to store the input numbers. + double inputNumber[n]; + int i = 0; + + printf(&quot;\n--- Enter Numbers ---\n&quot;); + + // Input Loop for numbers + while (i &lt; n) + { + printf(&quot;Enter number %d: &quot;, i + 1); + + if (scanf(&quot;%lf&quot;, &amp;inputNumber[i]) == 1) + { + // Clearing input buffer after successful read + while (getchar() != &#x27;\n&#x27;) + ; + i++; + } + else + { + printf(&quot;Invalid input. Only integers are allowed. Please try again.\n&quot;); + // Clearing input buffer to handle invalid input + while (getchar() != &#x27;\n&#x27; &amp;&amp; !feof(stdin)) + ; + } + } + + // 1. Sum Calculation + double tempSum = 0; + for (i = 0; i &lt; n; i++) + tempSum += inputNumber[i]; + + // 2. Average (Mean) calculation + double tempAverage = tempSum / n; + + // 3. Standard Deviation (Sample SD formula used) + double tempStandardDeviation = 0.0; + + // Preventing division by zero if n is 1. SD is 0 for a single number. + if (n &gt; 1) + { + double tempSumation = 0; + // calculating the sum of squared differences from the mean + for (i = 0; i &lt; n; i++) + tempSumation += pow((inputNumber[i] - tempAverage), 2.0); + + // Calculating sample standard deviation + tempStandardDeviation = sqrt(tempSumation / (n - 1)); + } + + // Assigning final values back to the variables in main(). + *sum = tempSum; + *average = tempAverage; + *standardDeviation = tempStandardDeviation; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem015.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem015.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem015_c', 'lucproblem015.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem015_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem015.c"> + <pre><code class="language-c">/* Write a program that defines a function that calculates power of one +number reaised to another and factorial value of a number in one cell. */ +/* Author - Amit Dutta, Date - 24th November, 2025 */ +/* Let Us C, Chap - 9, Page 159, Problem 9.2 */ + +#include &lt;stdio.h&gt; + +void bothPowerFactorial(double, int, int, double *, long long *); + +int main() +{ + double a, resultPower; + int b, factN; + long long resultFactorial; + printf(&quot;Enter a and b for calculating a raised to b: &quot;); + scanf(&quot;%lf %d&quot;, &amp;a, &amp;b); + printf(&quot;Enter number to calculate the factorial: &quot;); + scanf(&quot;%d&quot;, &amp;factN); + if (b &lt; 0 || factN &lt; 0) + { + printf(&quot;\nOnly non-negative integer is allowed as input of b and factorial.&quot;); + return 1; + } + bothPowerFactorial(a, b, factN, &amp;resultPower, &amp;resultFactorial); + printf(&quot;\n%g Raised to %d: %g&quot; + &quot;\nFactorial of %d: %lld&quot;, + a, b, resultPower, factN, resultFactorial); + return 0; +} + +void bothPowerFactorial(double a, int b, int n, double *resultPower, long long *resultFactorial) +{ + double tempResultPower = 1; + long long tempResultFactorial = 1; + int i; + + for (i = 1; i &lt;= b; i++) + tempResultPower *= a; + + for (i = 1; i &lt;= n; i++) + tempResultFactorial *= i; + + *resultPower = tempResultPower; + *resultFactorial = tempResultFactorial; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">lucproblem016.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem016.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-letusc-lucproblem016_c', 'lucproblem016.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-letusc-lucproblem016_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/letusc/lucproblem016.c"> + <pre><code class="language-c">/* Figure 9.4 shows three memory locations and values stored in them. +Write a program to declare variables that implement the relationship +shown. How will you print the values and addresses shown in the figure? +On which machine the program should be executed to get such addresses? + +Figure 9.4: + value: 3.14, memory_address: 7fff9489c79c + value: 7fff9489c7a0, memory_address: 7fff4fd134b8 + value: 7fff9489c79c, memory_address: 7fff9489c7a0 +*/ +/* Author - Amit Dutta, Date - 24th November, 2025 */ +/* Let Us C, Chap - 9, Page 160, Problem 9.3 */ + +#include &lt;stdio.h&gt; + +int main() +{ + float a = 3.14; + float *c = &amp;a; + float **b = &amp;c; + + printf(&quot;Location 1 (Variable a):\n&quot;); + printf(&quot;Value: %g\n&quot;, a); + printf(&quot;Address: %p\n&quot;, (void *)&amp;a); + printf(&quot;------------------------------\n&quot;); + + printf(&quot;Location 3 (Variable c: float *):\n&quot;); + printf(&quot;Value (Address stored): %p\n&quot;, (void *)c); + printf(&quot;Address of c itself: %p\n&quot;, (void *)&amp;c); + printf(&quot;Value pointed to (*c): %g\n&quot;, *c); + printf(&quot;------------------------------\n&quot;); + + printf(&quot;Location 2 (Variable b: float **):\n&quot;); + printf(&quot;Value (Address stored): %p\n&quot;, (void *)b); + printf(&quot;Address of b itself: %p\n&quot;, (void *)&amp;b); + printf(&quot;Value pointed to (*b): %p\n&quot;, (void *)*b); + printf(&quot;Value pointed to (**b): %g\n&quot;, **b); + printf(&quot;------------------------------\n&quot;); + + return 0; +}</code></pre> + </div> + </li> + </ul> + </div> + </li> + + <li class="border rounded-lg overflow-hidden"> + <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('practice-c')"> + <div class="flex items-center justify-between"> + <div class="flex items-center"> + <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> + <span class="font-medium text-gray-800">practice-c</span> + <span class="ml-2 text-sm text-gray-500">(11 files)</span> + </div> + <div class="flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/tree/main/practice-c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <div class="chevron" id="chevron-practice-c"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> + </div> + </div> + </div> + <div class="folder-content hidden bg-white" id="folder-practice-c"> + <ul class="divide-y divide-gray-200"> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">pc001.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-practice-c-pc001_c', 'pc001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-practice-c-pc001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc001.c"> + <pre><code class="language-c">/* Pattern : + 1 + 1 2 + 1 2 3 + 1 2 3 4 + 1 2 3 4 5 +for n = 5 +*/ +/* Author - Amit Dutta, Date - 02nd October, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int i, j, num; + printf(&quot;Enter n : &quot;); + scanf(&quot;%d&quot;, &amp;num); + for (i = 1; i &lt;= num; i++) + { + for (j = 1; j &lt;= i; j++) + { + printf(&quot;%d\t&quot;, j); + } + printf(&quot;\n&quot;); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">pc002.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-practice-c-pc002_c', 'pc002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-practice-c-pc002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc002.c"> + <pre><code class="language-c">/* Pattern : + 1 2 3 4 5 + 6 7 8 9 + 10 11 12 + 13 14 + 15 +for n = 5 +*/ + +/* Author - Amit Dutta, Date - 02nd NOVEMBER, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int i, j, n, temp = 1; + printf(&quot;Enter n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for (i = n; i &gt;= 1; i--) + { + for (j = 1; j &lt;= i; j++) + { + printf(&quot;%d\t&quot;, temp); + temp++; + } + printf(&quot;\n&quot;); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">pc003.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-practice-c-pc003_c', 'pc003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-practice-c-pc003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc003.c"> + <pre><code class="language-c">/* Pattern : + 1 + 2 4 + 3 6 9 + 4 8 12 16 + 5 10 15 20 25 +for n = 5 +*/ + +#include &lt;stdio.h&gt; +int main() +{ + int i, j, n; + printf(&quot;Enter n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for (i = 1; i &lt;= n; i++) + { + for (j = 1; j &lt;= i; j++) + { + printf(&quot;%d\t&quot;, i * j); + } + printf(&quot;\n&quot;); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">pc004.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-practice-c-pc004_c', 'pc004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-practice-c-pc004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc004.c"> + <pre><code class="language-c">/* Pattern : + 5 4 3 2 1 + 4 3 2 1 + 3 2 1 + 2 1 + 1 +for n = 5 +*/ + +#include &lt;stdio.h&gt; +int main() +{ + int i, j, k, n; + printf(&quot;Enter n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for (i = n; i &gt;= 1; i--) + { + for (j = 1; j &lt;= i - 1; j++) + { + printf(&quot;\t&quot;); + } + for (k = i; k &gt;= 1; k--) + { + printf(&quot;%d\t&quot;, k); + } + printf(&quot;\n&quot;); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">pc005.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-practice-c-pc005_c', 'pc005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-practice-c-pc005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc005.c"> + <pre><code class="language-c">/* Pattern : + 1 + 1 2 + 3 5 8 + 13 21 34 55 + 89 144 233 377 610 +for n = 5 +*/ + +#include &lt;stdio.h&gt; +int main() +{ + int i, j, n; + long long temp1 = 0, temp2 = 1, temp3; + printf(&quot;Enter n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + printf(&quot;1\n&quot;); + for (i = 2; i &lt;= n; i++) + { + for (j = 1; j &lt;= i; j++) + { + temp3 = temp1 + temp2; + printf(&quot;%lld\t&quot;, temp3); + temp1 = temp2; + temp2 = temp3; + } + printf(&quot;\n&quot;); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">pc006.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-practice-c-pc006_c', 'pc006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-practice-c-pc006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc006.c"> + <pre><code class="language-c">/* Prime number check */ +/* Author - Amit Dutta, Date - 03rd NOVEMBER, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + int num, i, temp; + printf(&quot;Enter the number : &quot;); + if(scanf(&quot;%d&quot;, &amp;num) != 1) { + printf(&quot;Only postive number allowed.&quot;); + return 1; + } + if(num &lt;= 0) { + printf(&quot;\nOnly potive number are allowed.&quot;); + return 1; + } + if(num == 1) { + printf(&quot;\nInput 1 is not a prime number.&quot;); + return 0; + } + if(num == 2) { + printf(&quot;\nInput 2 is a prime number.&quot;); + return 0; + } + if(num % 2 == 0) { + printf(&quot;\nInput %d is not a prime number.&quot;, num); + return 0; + } + temp = (int)sqrt(num); + for (i = 3; i &lt;= temp; i += 2) + { + if (num % i == 0) + { + printf(&quot;\nInput %d is not a prime number.&quot;, num); + return 0; + } + } + printf(&quot;\nInput %d is a prime number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">pc007.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-practice-c-pc007_c', 'pc007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-practice-c-pc007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc007.c"> + <pre><code class="language-c">/* Armstrong number check only for three digit */ +/* Author - Amit Dutta, Date - 03rd NOVEMBER, 2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int num, temp1, armstrongCheck = 0; + printf(&quot;Enter a three digit number : &quot;); + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nOnly positive number allowed.&quot;); + return 1; + } + if (num &lt; 100 || num &gt; 999) + { + printf(&quot;\nOnly Three digit postive number allowed.&quot;); + return 1; + } + temp1 = num; + while (temp1 &gt; 0) + { + armstrongCheck += (temp1 % 10) * (temp1 % 10) * (temp1 % 10); + temp1 /= 10; + } + if (armstrongCheck == num) + printf(&quot;\nInput %d is a armstrong number.&quot;, num); + else + printf(&quot;\nInput %d is not a armstrong number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">pc008.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-practice-c-pc008_c', 'pc008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-practice-c-pc008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc008.c"> + <pre><code class="language-c">/* Factorial upto N */ +/* Author - Amit Dutta, Date - 03rd November, 2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int n, i; + long long fact = 1; + printf(&quot;Enter n : &quot;); + if (scanf(&quot;%d&quot;, &amp;n) != 1) + { + printf(&quot;\nOnly non-negative number allowed.&quot;); + return 1; + } + if (n &lt; 0) + { + printf(&quot;\nOnly non-negative number allowed.&quot;); + return 1; + } + if (n == 0) + { + printf(&quot;\nFactorial of 0 : 1&quot;); + return 0; + } + for (i = 1; i &lt;= n; i++) + fact *= i; + printf(&quot;\nFactorial of %d : %lld&quot;, n, fact); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">pc009.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-practice-c-pc009_c', 'pc009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-practice-c-pc009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc009.c"> + <pre><code class="language-c">/* Sum of digit */ +/* Author - Amit Dutta, Date - 04th November, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int num, sumOfDigit = 0, temp; + printf(&quot;Enter the number : &quot;); + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nOnly a number is allowed.&quot;); + return 1; + } + temp = num; + while (temp &gt; 0) + { + sumOfDigit += temp % 10; + temp /= 10; + } + printf(&quot;\nSum of the digit %d : %d&quot;, num, sumOfDigit); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">pc010.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-practice-c-pc010_c', 'pc010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-practice-c-pc010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc010.c"> + <pre><code class="language-c">/* Reverse a number */ +/* Author - Amit Dutta, Date - 04th November, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int num, temp, rev = 0; + printf(&quot;\nEnter the number : &quot;); + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nOnly a number is allowed.&quot;); + return 1; + } + temp = num; + while (temp &gt; 0) + { + rev = (rev * 10) + (temp % 10); + temp /= 10; + } + printf(&quot;\nReverse of the number %d : %d&quot;, num, rev); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">pc011.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-practice-c-pc011_c', 'pc011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-practice-c-pc011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/practice-c/pc011.c"> + <pre><code class="language-c">/* Write a C program that takes two positive integers, L (Lower Bound) +and U (Upper Bound), as input from the user. The program must find and print +the count of all numbers between L and U (inclusive) that +are also a Palindrome Number. */ +/* Author - Amit Dutta, Date - 11th November, 2025 */ + +#include &lt;stdio.h&gt; +#define true 1 +#define false 0 + +int isPalindrome(int num) +{ + int temp = num, numRev = 0; + while (temp &gt; 0) + { + numRev = (numRev * 10) + (temp % 10); + temp /= 10; + } + if (num == numRev) + return true; + else + return false; +} + +int main() +{ + int uBound, lBound, num, palindromeCount = 0; + printf(&quot;Enter the Lower Bound and Upper Bound : &quot;); + if (scanf(&quot;%d %d&quot;, &amp;lBound, &amp;uBound) != 2) + { + printf(&quot;\nOnly Integer values are allowed.&quot;); + return 1; + } + if (lBound &lt; 0 || uBound &lt; 0 || lBound &gt; uBound) + { + printf(&quot;\nPlease enter appropriate inforamtion.&quot;); + return 1; + } + printf(&quot;Palindrome Numbers from %d to %d :&quot;, lBound, uBound); + for (num = lBound; num &lt;= uBound; num++) + { + if (isPalindrome(num)) + { + printf(&quot; %d&quot;, num); + palindromeCount++; + } + } + printf(&quot;\nTotal Palindrome number found inside the range (%d to %d) : %d&quot;, lBound, uBound, palindromeCount); + return 0; +}</code></pre> + </div> + </li> + </ul> + </div> + </li> + + <li class="border rounded-lg overflow-hidden"> + <div class="folder-header bg-gray-100 p-4 cursor-pointer hover:bg-blue-100 transition-colors duration-200" onclick="toggleFolder('tuition-c')"> + <div class="flex items-center justify-between"> + <div class="flex items-center"> + <svg class="w-6 h-6 text-blue-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg> + <span class="font-medium text-gray-800">tuition-c</span> + <span class="ml-2 text-sm text-gray-500">(121 files)</span> + </div> + <div class="flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/tree/main/tuition-c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" onclick="event.stopPropagation()" title="View folder on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <div class="chevron" id="chevron-tuition-c"><svg class="w-5 h-5 text-gray-500 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></div> + </div> + </div> + </div> + <div class="folder-content hidden bg-white" id="folder-tuition-c"> + <ul class="divide-y divide-gray-200"> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-001.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-001_c', 'APC-PRAC-001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-001.c"> + <pre><code class="language-c">/* WAP to calculate area and perimeter of a rectangle +by accepting length and breadth as input. */ +// Author - Amit Dutta, Date - 18th SEP, 2025 + +#include&lt;stdio.h&gt; +int main() { + double length, breadth, area, perimeter; + printf(&quot;Enter the length and breadth of the Rectangle : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;length, &amp;breadth); + area = length * breadth; + perimeter = 2 * (length + breadth); + printf(&quot;\nArea of the Rectangle : %g&quot; + &quot;\nPerimeter of the Rectangle : %g&quot;, area, perimeter); + return 0; + +} + +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-002.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-002_c', 'APC-PRAC-002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-002.c"> + <pre><code class="language-c">/* WAP to calculate area of a circle using math library +method. Take radius of the circle as input. */ +/* Author - Amit Dutta, Date - 18th SEP, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + double r, area; + printf(&quot;Enter the radius of the circle : &quot;); + scanf(&quot;%lf&quot;, &amp;r); + area = M_PI * pow(r, 2); + printf(&quot;\nArea of the circle : %g&quot;, area); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-003.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-003_c', 'APC-PRAC-003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-003.c"> + <pre><code class="language-c">/* WAP to accept diagonal of a square and calculate area, parimeter */ +/* Author - Amit Dutta, Date - 18th SEP, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + double dia, side, area, peri; + printf(&quot;Enter the diagonal of the square : &quot;); + scanf(&quot;%lf&quot;, &amp;dia); + side = dia / sqrt(2); + area = pow(side, 2); + peri = 4 * side; + printf(&quot;\nArea of the square : %g&quot; + &quot;\nPerimeter of the square : %g&quot;, + area, peri); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-004.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-004_c', 'APC-PRAC-004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-004.c"> + <pre><code class="language-c">/* WAP to calculate and display radius of a circle by taking the area as input. */ +/* Author - Amit Dutta, Date - 18th SEP, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + double r, area; + printf(&quot;Enter the area of the circle : &quot;); + scanf(&quot;%lf&quot;, &amp;area); + r = sqrt(area / M_PI); + printf(&quot;\nRadius of the circle : %g&quot;, r); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-005.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-005_c', 'APC-PRAC-005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-005.c"> + <pre><code class="language-c">/* WAP a program that accept number of days +as input and represent it as years, months and days. */ +/* Author - Amit Dutta, Date - 19th SEP, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int days, months, years, temp; + printf(&quot;Enter the No. of days : &quot;); + scanf(&quot;%d&quot;, &amp;days); + temp = days; + years = days / 365; + days = days % 365; + months = days / 30; + days = days % 30; + printf(&quot;%d Days = %d Years, %d Months, %d Days&quot;, temp, years, months, days); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-006.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-006_c', 'APC-PRAC-006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-006.c"> + <pre><code class="language-c">/* WAP that accept seconds as input and represent it an hours, minutes and seconds. */ +/* Author - Amit Dutta, Date - 19th SEP, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int sec, hours, minutes, temp; + printf(&quot;Enter the no of seconds : &quot;); + scanf(&quot;%d&quot;, &amp;sec); + temp = sec; + hours = sec / 3600; + sec = sec % 3600; + minutes = sec / 60; + sec = sec % 60; + printf(&quot;\n%d Seconds = %d Hours, %d Minutes, %d Seconds.&quot;, temp, hours, minutes, sec); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-007.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-007_c', 'APC-PRAC-007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-007.c"> + <pre><code class="language-c">/* WAP that accept basic salary of an employee and display gross salary, +net salary generated by below formula. + DA = 25% of the basic salary. + HRA = 12.5% of the basic salary. + PF = 10% of the basic salary. + gross salary = basic salary + da + hra + net salary = gross salary - pf +*/ +/* Author - Amit Dutta, Date - 19th SEP, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + double bs, gs, ns, da, hra, pf; + printf(&quot;Enter the basic salary of the employee : &quot;); + scanf(&quot;%lf&quot;, &amp;bs); + da = bs * 0.25; + hra = bs * 0.125; + pf = bs * 0.10; + gs = bs + da + hra; + ns = gs - pf; + printf(&quot;\nGross Salary : %g&quot; + &quot;\nNet Salary : %g&quot;, + gs, ns); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-008.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-008_c', 'APC-PRAC-008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-008.c"> + <pre><code class="language-c">/* WAP to multiply and divide a number by 4 without +using multiplication and division operator. */ +/* Author - Amit Dutta, Date - 19th SEP, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int num, multi, div; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + multi = num &lt;&lt; 2; + div = num &gt;&gt; 2; + printf(&quot;Multiplication : %d&quot; + &quot;\nDivision : %d&quot;, + multi, div); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-009.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-009_c', 'APC-PRAC-009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-009.c"> + <pre><code class="language-c">/* WAP to swap two integer variable without using Third variable. */ +/* Author - Amit Dutta, Date - 19th SEP, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int a = 4, b = 6; + printf(&quot;Before swap : A = %d and B = %d&quot;, a, b); + a = a ^ b; + b = a ^ b; + a = a ^ b; + printf(&quot;\nAfter swap : A = %d and B = %d&quot;, a, b); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-010.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-010_c', 'APC-PRAC-010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-010.c"> + <pre><code class="language-c">/* WAP to calculate and display the valve of the given expression : + (1/a^3) + (1/(b+2)^3) + (1/(c^4 + root(2))) + take a, b, c as input. +*/ +/* Author - Amit Dutta, Date - 19th SEP, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + double a, b, c, result; + printf(&quot;Enter the value for a, b and c : &quot;); + scanf(&quot;%lf %lf %lf&quot;, &amp;a, &amp;b, &amp;c); + result = (1 / pow(a, 3)) + (1 / pow((b + 2), 3)) + (1 / (pow(c, 4) + sqrt(2))); + printf(&quot;\nResult = %g&quot;, result); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-011.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-011_c', 'APC-PRAC-011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-011.c"> + <pre><code class="language-c">/* Write a program to input positive number and check whether the number is +perfect square or not. If the number is negetive then display appropriate message */ +/* Author - Amit Dutta, Date - 31st October, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + int num, temp; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + if (num &lt; 0) + { + printf(&quot;\nYou entered a negetive number.&quot;); + return 1; + } + temp = (int)sqrt(num); + if (temp * temp == num) + { + printf(&quot;\nInput %d is a perfect square number.&quot;, num); + return 0; + } + else + printf(&quot;\nInput %d is not a perfect square number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-012.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-012.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-012_c', 'APC-PRAC-012.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-012_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-012.c"> + <pre><code class="language-c">/* Write a program to input three integer and find out second largest */ +/* Author - Amit Dutta, Date - 31st October, 2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int a, b, c, secondLargest; + printf(&quot;Enter three number : &quot;); + scanf(&quot;%d %d %d&quot;, &amp;a, &amp;b, &amp;c); + if ((a &lt; b &amp;&amp; a &gt; c) || (a &gt; b &amp;&amp; a &lt; c)) + secondLargest = a; + if ((b &lt; a &amp;&amp; b &gt; c) || (b &gt; a &amp;&amp; b &lt; c)) + secondLargest = b; + if ((c &lt; b &amp;&amp; c &gt; a) || (c &gt; b &amp;&amp; c &lt; a)) + secondLargest = c; + printf(&quot;\nSecond Largest : %d&quot;, secondLargest); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-013.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-013.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-013_c', 'APC-PRAC-013.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-013_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-013.c"> + <pre><code class="language-c">/* Write a program to input sum(p), rate of interest(r), time(t) and type of interest +(&#x27;s&#x27; for simple interes, &#x27;c&#x27; for compound interest), then calculate and display the earned interest */ +/* Author - Amit Dutta, Date - 31st October, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +#include &lt;ctype.h&gt; + +int main() +{ + double p, t, r, si, ci; + char mode; + printf(&quot;Enter the Principle, Time (Year) and the Rate of Interest : &quot;); + scanf(&quot;%lf %lf %lf&quot;, &amp;p, &amp;t, &amp;r); + printf(&quot;Enter the mode of calculation (&#x27;s&#x27; for simple interest, &#x27;c&#x27; for compound interest) : &quot;); + scanf(&quot; %c&quot;, &amp;mode); + mode = tolower(mode); + switch (mode) + { + case &#x27;s&#x27;: + si = (p * t * r) / 100; + printf(&quot;\nSimple Interest : %g&quot;, si); + return 0; + case &#x27;c&#x27;: + ci = (p * pow(1 + (r / 100), t)) - p; + printf(&quot;\nCompound Interest : %g&quot;, ci); + return 0; + default: + printf(&quot;\nYou entered a wrong choice.&quot;); + return 1; + } +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-014.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-014.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-014_c', 'APC-PRAC-014.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-014_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-014.c"> + <pre><code class="language-c">/* Write a program to calculate and display the maturity amount taking +the sum and number of days as input. + No. of Days Rate of Interest + =========== ================ + &lt;= 180 5.57 % + 181 - 364 7.75 % + 365 - 500 9.25 % + &gt; 500 9.15 % +*/ +/* Author - Amit Dutta, Date - 31st October, 2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + double p, t, r, si; + int days; + printf(&quot;Enter the Principle, Time (Days) : &quot;); + scanf(&quot;%lf %d&quot;, &amp;p, &amp;days); + if (days &gt; 0 &amp;&amp; days &lt;= 180) + r = 5.57; + else if (days &gt; 180 &amp;&amp; days &lt;= 364) + r = 7.75; + else if (days &gt; 364 &amp;&amp; days &lt;= 500) + r = 9.25; + else if (days &gt; 500) + r = 9.15; + si = (p * t * r) / 100; + printf(&quot;\nMaturity Amount : %d&quot;, si + p); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-015.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-015.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-015_c', 'APC-PRAC-015.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-015_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-015.c"> + <pre><code class="language-c">/* Write a program to display all numbers between lb (lower bound) and up (upper bound) +which ends with digit 7 or divisible by 7. */ +/* Author - Amit Dutta, Date - 06th November, 2025 */ +// File Name - amit0611202501.c (LAB), APC-PRAC-015.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int lb, ub, i; + printf(&quot;Enter the lb, ub : &quot;); + scanf(&quot;%d %d&quot;, &amp;lb, &amp;ub); + printf(&quot;\nEnds with 7 :&quot;); + for (i = lb; i &lt;= ub; i++) + { + if (i % 10 == 7) + { + printf(&quot; %d&quot;, i); + } + } + printf(&quot;\nDivisible by 7 :&quot;); + for (i = lb; i &lt;= ub; i++) + { + if (i % 7 == 0) + { + printf(&quot; %d&quot;, i); + } + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-016.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-016.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-016_c', 'APC-PRAC-016.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-016_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-016.c"> + <pre><code class="language-c">/* Write a program to check palindrome number. */ +/* Author - Amit Dutta, Date - 06th November, 2025 */ +// File Name - amit0611202502.c (LAB), APC-PRAC-016.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int num, temp, rev = 0; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + temp = num; + while (temp &gt; 0) + { + rev = (rev * 10) + (temp % 10); + temp /= 10; + } + if (rev == num) + printf(&quot;\nInput %d is a palindrome number.&quot;, num); + else + printf(&quot;\nInput %d is not a palindrome number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-017.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-017.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-017_c', 'APC-PRAC-017.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-017_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-017.c"> + <pre><code class="language-c">/* Write a program to check perfect number. */ +/* Author - Amit Dutta, Date - 06th November, 2025 */ +// File Name - amit0611202503.c (LAB), APC-PRAC-017.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int num, i, divisibleSum = 0; + printf(&quot;Enter a number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + for (i = 1; i &lt;= num / 2; i++) + { + if (num % i == 0) + { + divisibleSum += i; + } + } + if (divisibleSum == num) + printf(&quot;\nInput %d ia a Perfect Number.&quot;, num); + else + printf(&quot;\nInput %d is NOT a Perfect Number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-018.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-018.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-018_c', 'APC-PRAC-018.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-018_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-018.c"> + <pre><code class="language-c">/* Write a program to check Automorphic Number. */ +/* Author - Amit Dutta, Date - 06th November, 2025 */ +// File Name - amit0611202504.c (LAB), APC-PRAC-018.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + int num, square, count = 0, temp, modNum; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + square = (int)pow(num, 2); + temp = num; + while (temp &gt; 0) + { + temp /= 10; + count++; + } + modNum = (int)pow(10, count); + temp = square % modNum; + if (num == temp) + printf(&quot;\nInput %d is a Automorphic Number.&quot;, num); + else + printf(&quot;\nInput %d is a Automorphic Number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-019.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-019.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-019_c', 'APC-PRAC-019.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-019_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-019.c"> + <pre><code class="language-c">/* Write a program to find hcf of two numbers */ +/* Author - Amit Dutta, Date - 07th November, 2025 */ +// File Name - amit0711202501.c (LAB), APC-PRAC-019.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int a, b, temp, temp_a, temp_b; + printf(&quot;Enter the a and b : &quot;); + scanf(&quot;%d %d&quot;, &amp;a, &amp;b); + temp_a = a, temp_b = b; + while (b &gt; 0) + { + temp = a; + a = b; + b = temp % b; + } + printf(&quot;\nHCF of %d and %d is : %d\n&quot;, temp_a, temp_b, a); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-020.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-020.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-020_c', 'APC-PRAC-020.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-020_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-020.c"> + <pre><code class="language-c">/* Write a program to check if two number is co-prime or not */ +/* Author - Amit Dutta, Date - 07th November, 2025 */ +// File Name - amit0711202502.c (LAB), APC-PRAC-020.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int a, b, temp, temp_a, temp_b; + printf(&quot;Enter the a and b : &quot;); + scanf(&quot;%d %d&quot;, &amp;a, &amp;b); + temp_a = a, temp_b = b; + while (b &gt; 0) + { + temp = a; + a = b; + b = temp % b; + } + if (a == 1) + printf(&quot;\n%d and %d is co-prime\n&quot;, temp_a, temp_b); + else + printf(&quot;\n%d and %d is NOT co-prime\n&quot;, temp_a, temp_b); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-021.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-021.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-021_c', 'APC-PRAC-021.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-021_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-021.c"> + <pre><code class="language-c">/* Write a program to check special number (sum of digit + product of digit = original number) */ +/* Author - Amit Dutta, Date - 07th November, 2025 */ +// File Name - amit0711202503.c (LAB), APC-PRAC-021.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int num, temp, sumOfDigit = 0, productOfDigit = 1; + printf(&quot;Enter the number to check if it is a special number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + temp = num; + while (temp &gt; 0) + { + sumOfDigit += temp % 10; + productOfDigit *= temp % 10; + temp /= 10; + } + temp = sumOfDigit + productOfDigit; + if (num == temp) + printf(&quot;\nInput %d is a special number.&quot;, num); + else + printf(&quot;\nInput %d is not a special number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-022.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-022.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-022_c', 'APC-PRAC-022.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-022_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-022.c"> + <pre><code class="language-c">/* Write a program to accept a number and check whether the number is twisted prime or not */ +/* Author - Amit Dutta, Date - 07th November, 2025 */ +// File Name - amit0711202504.c (LAB), APC-PRAC-022.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +#include &lt;stdbool.h&gt; + +bool checkPrime(int num) +{ + if (num &lt; 2) + return false; + if (num == 2) + return true; + if (num % 2 == 0) + return false; + int limit = (int)sqrt(num); + for (int i = 3; i &lt;= limit; i += 2) + if (num % i == 0) + return false; + return true; +} + +int reverseNumber(int num) +{ + int reverse = 0; + while (num &gt; 0) + { + reverse = (reverse * 10) + (num % 10); + num /= 10; + } + return reverse; +} + +int main() +{ + int num; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + if (!checkPrime(num)) + { + printf(&quot;\nInput %d is not a prime number.&quot;, num); + return 0; + } + if (checkPrime(reverseNumber(num))) + printf(&quot;\nInput %d is a twisted prime number.&quot;, num); + else + printf(&quot;\nInput %d is not a twisted prime number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-023.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-023.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-023_c', 'APC-PRAC-023.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-023_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-023.c"> + <pre><code class="language-c">/* Pattern : + (a) 1, -3, 5, -7, 9, -11, ... upto n times + (b) 0, 3, 8, 15, ... upto n times +*/ +/* Author - Amit Dutta, Date - 07th November, 2025 */ +// File Name - amit0711202505.c (LAB), APC-PRAC-023.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; +#include &lt;stdbool.h&gt; + +int main() +{ + int n, i, temp = 1; + bool isNegative = true; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + printf(&quot;\nPattern A :&quot;); + for (i = 1; i &lt;= n; i++) + { + if (!isNegative) + { + printf(&quot; %d&quot;, temp * -1); + isNegative = true; + } + else + { + printf(&quot; %d&quot;, temp); + isNegative = false; + } + temp += 2; + } + printf(&quot;\nPattern B :&quot;); + for (i = 1; i &lt;= n; i++) + { + temp = (i * i) - 1; + printf(&quot; %d&quot;, temp); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-024.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-024.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-024_c', 'APC-PRAC-024.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-024_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-024.c"> + <pre><code class="language-c">/* +Pattern: + 1 + 2 1 + 3 2 1 + 4 3 2 1 + 5 4 3 2 1 +*/ +/* Author = Amit Dutta, Date - 13th November, 2025 */ +// File Name - amit1311202501.c (LAB), APC-PRAC-024.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include&lt;stdio.h&gt; +int main() { + int n, i, j; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for(i = 1; i &lt;= n; i++) { + for(j = i; j &gt;= 1; j--) { + printf(&quot;%d &quot;, j); + } + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-025.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-025.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-025_c', 'APC-PRAC-025.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-025_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-025.c"> + <pre><code class="language-c">/* +Pattern: + 5 4 3 2 1 + 5 4 3 2 + 5 4 3 + 5 4 + 5 +*/ +/* Author = Amit Dutta, Date - 13th November, 2025 */ +// File Name - amit1311202502.c (LAB), APC-PRAC-025.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include&lt;stdio.h&gt; +int main() { + int n, i, j; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for(i = 1; i &lt;= n; i++) { + for(j = n; j &gt;= i; j--) { + printf(&quot;%d &quot;, j); + } + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-026.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-026.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-026_c', 'APC-PRAC-026.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-026_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-026.c"> + <pre><code class="language-c">/* +Pattern: + 5 + 5 4 + 5 4 3 + 5 4 3 2 + 5 4 3 2 1 +*/ +/* Author = Amit Dutta, Date - 13th November, 2025 */ +// File Name - amit1311202503.c (LAB), APC-PRAC-026.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include&lt;stdio.h&gt; +int main() { + int n, i, j; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for(i = n; i &gt;= 1; i--) { + for(j = n; j &gt;= i; j--) { + printf(&quot;%d &quot;, j); + } + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-027.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-027.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-027_c', 'APC-PRAC-027.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-027_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-027.c"> + <pre><code class="language-c">/* +Pattern: + 1 2 3 4 5 + 2 3 4 5 + 3 4 5 + 4 5 + 5 +*/ +/* Author = Amit Dutta, Date - 13th November, 2025 */ +// File Name - amit1311202504.c (LAB), APC-PRAC-027.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include&lt;stdio.h&gt; +int main() { + int n, i, j; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for(i = 1; i &lt;= n; i++) { + for(j = i; j &lt;= n; j++) { + printf(&quot;%d &quot;, j); + } + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-028.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-028.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-028_c', 'APC-PRAC-028.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-028_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-028.c"> + <pre><code class="language-c">/* +Pattern: + 1 + 2 3 + 4 5 6 + 7 8 9 10 + 11 12 13 14 15 +*/ +/* Author = Amit Dutta, Date - 13th November, 2025 */ +// File Name - amit1311202505.c (LAB), APC-PRAC-028.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include&lt;stdio.h&gt; +int main() { + int n, i, j, temp = 1; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for(i = 1; i &lt;= n; i++) { + for(j = 1; j &lt;= i; j++) { + printf(&quot;%d\t&quot;, temp); + temp++; + } + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-029.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-029.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-029_c', 'APC-PRAC-029.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-029_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-029.c"> + <pre><code class="language-c">/* +Pattern: + 1 + 1 0 + 1 0 1 + 1 0 1 0 + 1 0 1 0 1 +*/ +/* Author = Amit Dutta, Date - 13th November, 2025 */ +// File Name - amit1311202506.c (LAB), APC-PRAC-029.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include&lt;stdio.h&gt; +int main() { + int n, i, j; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for(i = 1; i &lt;= n; i++) { + for(j = 1; j &lt;= i; j++) { + if(j % 2 == 0) printf(&quot;0 &quot;); + else printf(&quot;1 &quot;); + } + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-030.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-030.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-030_c', 'APC-PRAC-030.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-030_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-030.c"> + <pre><code class="language-c">/* +Pattern: + # + @ @ + # # # + @ @ @ @ + # # # # # +*/ +/* Author = Amit Dutta, Date - 13th November, 2025 */ +// File Name - amit1311202507.c (LAB), APC-PRAC-030.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include&lt;stdio.h&gt; +int main() { + int n, i, j; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for(i = 1; i &lt;= n; i++) { + for(j = 1; j &lt;= i; j++) { + if(i % 2 == 0) printf(&quot;@ &quot;); + else printf(&quot;# &quot;); + } + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-031.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-031.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-031_c', 'APC-PRAC-031.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-031_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-031.c"> + <pre><code class="language-c">/* +Pattern: + 1 2 3 4 5 + 6 7 8 9 + 10 11 12 + 13 14 + 15 +*/ +/* Author = Amit Dutta, Date - 13th November, 2025 */ +// File Name - amit1311202508.c (LAB), APC-PRAC-031.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include&lt;stdio.h&gt; +int main() { + int n, i, j, temp = 1; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for(i = n; i &gt;= 1; i--) { + for(j = 1; j &lt;= i; j++) { + printf(&quot;%d\t&quot;, temp); + temp++; + } + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-032.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-032.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-032_c', 'APC-PRAC-032.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-032_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-032.c"> + <pre><code class="language-c">/* +Pattern: + A + B B + C C C + D D D D + E E E E E +*/ +/* Author = Amit Dutta, Date - 13th November, 2025 */ +// File Name - amit1311202509.c (LAB), APC-PRAC-032.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include&lt;stdio.h&gt; +int main() { + int n, i, j; char temp = &#x27;A&#x27;; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for(i = 1; i &lt;= n; i++) { + for(j = 1; j &lt;= i; j++) { + printf(&quot;%c\t&quot;, temp); + } + temp++; + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-033.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-033.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-033_c', 'APC-PRAC-033.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-033_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-033.c"> + <pre><code class="language-c">/* Print the factorial of the digits off a number */ +/* Auhtor: Amit Dutta, Date: 20-11-2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int factorial(int); + +int factorial(int n) +{ + int i, fact = 1; + for (i = 1; i &lt;= n; i++) + fact *= i; + return fact; +} + +int main() +{ + int n, temp; + printf(&quot;Enter the number: &quot;); + scanf(&quot;%d&quot;, &amp;n); + if (n &lt; 0) + { + printf(&quot;Only non-negetive number is allowed.&quot;); + return 1; + } + temp = n; + while (temp &gt; 0) + { + printf(&quot;\nFactorial of %d: %d&quot;, temp % 10, factorial(temp % 10)); + temp /= 10; + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-034.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-034.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-034_c', 'APC-PRAC-034.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-034_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-034.c"> + <pre><code class="language-c">/* Take a Range as input from user and print the prime number between it. */ +/* Auhtor: Amit Dutta, Date: 20-11-2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int isPrime(int); + +int isPrime(int n) +{ + if (n &lt;= 1) + return 0; + if (n == 2) + return 1; + if (n % 2 == 0) + return 0; + int temp = (int)sqrt(n), i; + for (i = 3; i &lt;= temp; i += 2) + if (n % i == 0) + return 0; + return 1; +} + +int main() +{ + int lb, ub, i; + printf(&quot;Enter the lower bound and the upper bound: &quot;); + scanf(&quot;%d %d&quot;, &amp;lb, &amp;ub); + printf(&quot;\nPrime numbers between %d and %d: &quot;, lb, ub); + for (i = lb; i &lt;= ub; i++) + if (isPrime(i)) + printf(&quot;%d &quot;, i); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-035.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-035.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-035_c', 'APC-PRAC-035.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-035_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-035.c"> + <pre><code class="language-c">/* Print all the 3 and 4 digit palindrome number. */ +/* Auhtor: Amit Dutta, Date: 20-11-2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int palindromeCheck(int); + +int palindromeCheck(int n) +{ + int temp = n, rev = 0; + while (temp &gt; 0) + { + rev = (rev * 10) + (temp % 10); + temp /= 10; + } + if (rev == n) + return 1; + else + return 0; +} + +int main() +{ + int i; + printf(&quot;Palindrome number of 3 and 4 digits: &quot;); + for (i = 100; i &lt;= 9999; i++) + if (palindromeCheck(i)) + printf(&quot;%d &quot;, i); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-036.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-036.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-036_c', 'APC-PRAC-036.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-036_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-036.c"> + <pre><code class="language-c">/* Check krishnamurty number. */ +/* Auhtor: Amit Dutta, Date: 20-11-2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int factorial(int); +int checkKrishnamurty(int); + +int factorial(int n) +{ + int i, fact = 1; + for (i = 1; i &lt;= n; i++) + fact *= i; + return fact; +} + +int checkKrishnamurty(int n) +{ + int temp1 = n, temp2 = 0; + while (temp1 &gt; 0) + { + temp2 += factorial(temp1 % 10); + temp1 /= 10; + } + if (temp2 == n) + return 1; + else + return 0; +} + +int main() +{ + int n; + printf(&quot;Enter the number: &quot;); + scanf(&quot;%d&quot;, &amp;n); + if (checkKrishnamurty(n)) + printf(&quot;\nInput %d is a Krishnamurty number.&quot;, n); + else + printf(&quot;\ninput %d is not a Krishnamurty number.&quot;, n); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-037.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-037.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-037_c', 'APC-PRAC-037.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-037_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-037.c"> + <pre><code class="language-c">/* Show all the armstrong number between a range. */ +/* Author: Amit Dutta, Date: 21-11-2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +#define lowerBound 100 +#define upperBound 999 + +int isArmstrongNumber(int); + +int isArmstrongNumber(int n) +{ + int temp = n, sum = 0, count = 0; + while (temp &gt; 0) + { + count++; + temp /= 10; + } + temp = n; + while (temp &gt; 0) + { + sum += (int)pow(temp % 10, count); + temp /= 10; + } + return sum == n; +} + +int main() +{ + int n, i, count = 0; + printf(&quot;Armstrong number between %d and %d are: &quot;, lowerBound, upperBound); + for (i = lowerBound; i &lt;= upperBound; i++) + if (isArmstrongNumber(i)) + { + printf(&quot;%d &quot;, i); + count++; + } + printf(&quot;\n\nCount: %d\n&quot;, count); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-038.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-038.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-038_c', 'APC-PRAC-038.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-038_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-038.c"> + <pre><code class="language-c">/* +Print all combinations of two two-digit numbers such that the sum of digits of both numbers is equal. +Example: 23 and 41 → (2+3) = 5, (4+1) = 5. +*/ +/* Author: Amit Dutta, Date: 21-11-2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + printf(&quot;Combinations of two two-digit numbers such that the sum of digits of both numbers is equal: &quot;); + int i, j, sum1, sum2, count = 0; + for (i = 10; i &lt;= 99; i++) + { + sum1 = (i % 10) + (i / 10); + for (j = i + 1; j &lt;= 99; j++) + { + sum2 = (j % 10) + (j / 10); + if (sum1 == sum2) + { + printf(&quot;(%d, %d) &quot;, i, j); + count++; + } + } + } + printf(&quot;\nCount: %d\n&quot;, count); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-039.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-039.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-039_c', 'APC-PRAC-039.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-039_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-039.c"> + <pre><code class="language-c">/* +Write a C program to print all unique combinations of three numbers (a, b, c) such that: +1 ≤ a, b, c ≤ 30 and a² + b² = c² (Pythagorean triplets) +*/ +/* Author: Amit Dutta, Date: 21-11-2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + printf(&quot;a² + b² = c² : &quot;); + int i, j, k, sq1, sq2, count = 0; + for (i = 1; i &lt;= 30; i++) + { + sq1 = i * i; + for (j = i + 1; j &lt;= 30; j++) + { + sq2 = j * j; + for (k = j + 1; k &lt;= 30; k++) + { + if (sq1 + sq2 == k * k) + { + printf(&quot;(%d, %d, %d) &quot;, i, j, k); + count++; + } + } + } + } + printf(&quot;\n\nCount: %d\n&quot;, count); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-040.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-040.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-040_c', 'APC-PRAC-040.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-040_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-040.c"> + <pre><code class="language-c">/* +Write a C program to count how many numbers between 100 and 999 have all distinct digits (e.g., 123, 709, 981). +*/ +/* Author: Amit Dutta, Date: 21-11-2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int i, count = 0, n1, n2, n3; + printf(&quot;Distinct numbers between 100 and 999: &quot;); + for (i = 100; i &lt;= 999; i++) + { + n1 = i / 100; + n2 = (i % 100) / 10; + n3 = i % 10; + if (n1 != n2 &amp;&amp; n2 != n3 &amp;&amp; n1 != n3) + { + printf(&quot;%d &quot;, i); + count++; + } + } + printf(&quot;\nCount: %d\n&quot;, count); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-041.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-041.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-041_c', 'APC-PRAC-041.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-041_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-041.c"> + <pre><code class="language-c">/* +Write a C program to find and print all twin prime pairs between 1 and n using nested loops. +(Twin primes are prime numbers having a difference of 2, like 11 and 13) +*/ +/* Author: Amit Dutta, Date: 21-11-2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int isPrime(int n) +{ + if (n &lt; 2) + return 0; + if (n == 2) + return 1; + if (n % 2 == 0) + return 0; + int i, temp = (int)sqrt(n); + for (i = 3; i &lt;= temp; i += 2) + if (n % i == 0) + return 0; + return 1; +} + +int main() +{ + int n, i, count = 0; + printf(&quot;enter the n: &quot;); + scanf(&quot;%d&quot;, &amp;n); + printf(&quot;\nAll the twin numbers: &quot;); + for (i = 1; i &lt;= n - 2; i++) + { + if (isPrime(i)) + { + if (isPrime(i + 2)) + { + printf(&quot;(%d, %d) &quot;, i, i + 2); + count++; + } + } + } + printf(&quot;\nCount; %d&quot;, count); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-001.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-001_c', 'APC-S-001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-001.c"> + <pre><code class="language-c">#include&lt;stdio.h&gt; +int main() { + int a = 9, b = 4, c; + c = a + b; + printf(&quot;A + B = %d\n&quot;, c); + c = a / b; + printf(&quot;A / B = %d\n&quot;, c); + c = a % b; + printf(&quot;A %% B = %d\n&quot;, c); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-002.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-002_c', 'APC-S-002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-002.c"> + <pre><code class="language-c">#include&lt;stdio.h&gt; +int main() { + int a = 5, b = 5, c = 10; + printf(&quot;a = b = %d\n&quot;, a == b); + printf(&quot;a &gt; b = %d\n&quot;, a &gt; b); + printf(&quot;a &lt; b = %d\n&quot;, a &lt; b); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-003.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-003_c', 'APC-S-003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-003.c"> + <pre><code class="language-c">#include &lt;stdio.h&gt; +int main() { + int a = 5, b = 5, c = 10, result; + + result = (a == b) &amp;&amp; (c &gt; b); + printf(&quot;Result is %d\n&quot;, result); + + result = (a == b) &amp;&amp; (c &lt; b); + printf(&quot;Result is %d\n&quot;, result); + + result = (a != b) || (c &lt; b); + printf(&quot;Result is %d\n&quot;, result); + + result = (a != b) || (c &lt; b); + printf(&quot;Result is %d\n&quot;, result); + + result = !(a != b); + printf(&quot;Result is %d\n&quot;, result); + + result = !(a == b); + printf(&quot;Result is %d\n&quot;, result); + + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-004.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-004_c', 'APC-S-004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-004.c"> + <pre><code class="language-c">/* Program to print first 10 natural numbers using while loop. */ +/* Author - Amit Dutta, Date - 29th October, 2025 */ + +/* + * Compiler Note: This source code is specifically designed for compilation + * and execution within the ** Turbo C ** environment. + * + * Testing Disclaimer: Due to a lack of access to the required Turbo C + * compiler software, this code has not been formally compiled or tested. + */ + +#include &lt;stdio.h&gt; +#include &lt;conio.h&gt; + +void main() +{ + clrscr(); + int x; + x = 1; + while (x &lt;= 10) + { + printf(&quot;%d &quot;, x); + x++; + } + getch(); +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-005.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-005_c', 'APC-S-005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-005.c"> + <pre><code class="language-c">/* Write to reverse a number. */ +/* Author - Amit Dutta, Date - 29th October, 2025 */ + +/* + * Compiler Note: This source code is specifically designed for compilation + * and execution within the ** Turbo C ** environment. + * + * Testing Disclaimer: Due to a lack of access to the required Turbo C + * compiler software, this code has not been formally compiled or tested. + */ + +#include &lt;stdio.h&gt; +#include &lt;conio.h&gt; + +void main() +{ + clrscr(); + int n, reverse = 0, rem; + printf(&quot;Enter the numner : &quot;); + scanf(&quot;%d&quot;, &amp;n); + while (n != 0) + { + rem = n % 10; + reverse = reverse * 10 + rem; + n /= 10; + } + printf(&quot;Reversed Number : %d&quot;, reverse); + getch(); +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-006.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-006_c', 'APC-S-006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-006.c"> + <pre><code class="language-c">/* Write a program to print first 10 multiple of 5 */ +/* Author - Amit Dutta, Date - 29th October, 2025 */ + +/* + * Compiler Note: This source code is specifically designed for compilation + * and execution within the ** Turbo C ** environment. + * + * Testing Disclaimer: Due to a lack of access to the required Turbo C + * compiler software, this code has not been formally compiled or tested. + */ + +#include &lt;stdio.h&gt; +#include &lt;conio.h&gt; + +void main() +{ + clrscr(); + int a = 5, i = 1, res; + while (i &lt;= 10) + { + res = a * i; + printf(&quot;%d * %d = %d\n&quot;, a, i, res); + i++; + } + getch(); +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-007.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-007_c', 'APC-S-007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-007.c"> + <pre><code class="language-c">/* Write a program the sum of first 10 natural numbers. */ +/* Author - Amit Dutta, Date - 29th October, 2025 */ + +/* + * Compiler Note: This source code is specifically designed for compilation + * and execution within the ** Turbo C ** environment. + * + * Testing Disclaimer: Due to a lack of access to the required Turbo C + * compiler software, this code has not been formally compiled or tested. + */ + +#include &lt;stdio.h&gt; +#include &lt;conio.h&gt; + +void main() +{ + clrscr(); + int i, sum = 0; + for (i = 1; i &lt;= 10; i++) + { + sum += i; + } + printf(&quot;\nSum of the first natural number : %d&quot;, sum); + getch(); +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-008.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-008_c', 'APC-S-008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-008.c"> + <pre><code class="language-c">/* Write a program to print the sum of two matrix as input given by the user. */ +/* Author: Amit Dutta, Date: 18-11-2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int rows, cols, i, j; + printf(&quot;Enter the number of rows and columns: &quot;); + scanf(&quot;%d %d&quot;, &amp;rows, &amp;cols); + + int a[rows][cols], b[rows][cols], c[rows][cols]; + + printf(&quot;Enter the elements of matrix A (%d x %d): \n&quot;, rows, cols); + for (i = 0; i &lt; rows; i++) + for (j = 0; j &lt; cols; j++) + { + printf(&quot;Position %d%d: &quot;, i, j); + scanf(&quot;%d&quot;, &amp;a[i][j]); + } + printf(&quot;\nMatrix A: \n&quot;); + for (i = 0; i &lt; rows; i++) + { + for (j = 0; j &lt; cols; j++) + printf(&quot;%d &quot;, a[i][j]); + printf(&quot;\n&quot;); + } + + printf(&quot;\nEnter the elements of matrix B(%d x %d): \n&quot;, rows, cols); + for (i = 0; i &lt; rows; i++) + for (j = 0; j &lt; cols; j++) + { + printf(&quot;Position %d%d: &quot;, i, j); + scanf(&quot;%d&quot;, &amp;b[i][j]); + } + printf(&quot;\nMatrix B: \n&quot;); + for (i = 0; i &lt; rows; i++) + { + for (j = 0; j &lt; cols; j++) + printf(&quot;%d &quot;, b[i][j]); + printf(&quot;\n&quot;); + } + + for (i = 0; i &lt; rows; i++) + for (j = 0; j &lt; cols; j++) + c[i][j] = a[i][j] + b[i][j]; + + printf(&quot;\nResult Matrix: \n&quot;); + for (i = 0; i &lt; rows; i++) + { + for (j = 0; j &lt; cols; j++) + printf(&quot;%d &quot;, c[i][j]); + printf(&quot;\n&quot;); + } + + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-009.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-009_c', 'APC-S-009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-009.c"> + <pre><code class="language-c">/* Write a program to find the upper and lower triangular matrix. */ +/* Author: Amit Dutta, Date: 18-11-2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int i, j, rows, cols; + printf(&quot;\nEnter the number of rows and columns : &quot;); + scanf(&quot;%d %d&quot;, &amp;rows, &amp;cols); + + if (rows != cols) + { + printf(&quot;Triangular matrix definitions only apply to square matrices (rows == columns).\n&quot;); + return 1; + } + + int matrix[rows][cols]; + + printf(&quot;Enter the elements of matrix (%d x %d): \n&quot;, rows, cols); + for (i = 0; i &lt; rows; i++) + for (j = 0; j &lt; cols; j++) + { + printf(&quot;Position %d%d: &quot;, i, j); + scanf(&quot;%d&quot;, &amp;matrix[i][j]); + } + printf(&quot;\nMatrix: \n&quot;); + for (i = 0; i &lt; rows; i++) + { + for (j = 0; j &lt; cols; j++) + printf(&quot;%d &quot;, matrix[i][j]); + printf(&quot;\n&quot;); + } + + printf(&quot;\nUpper triangular of the Matrix: \n&quot;); + for (i = 0; i &lt; rows; i++) + { + for (j = 0; j &lt; cols; j++) + { + if (j &gt;= i) + printf(&quot;%d &quot;, matrix[i][j]); + else + printf(&quot;~ &quot;); + } + printf(&quot;\n&quot;); + } + + printf(&quot;\nLower triangular of the Matrix: \n&quot;); + for (i = 0; i &lt; rows; i++) + { + for (j = 0; j &lt; cols; j++) + { + if (j &lt;= i) + printf(&quot;%d &quot;, matrix[i][j]); + else + printf(&quot;~ &quot;); + } + printf(&quot;\n&quot;); + } + + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-010.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-010_c', 'APC-S-010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-010.c"> + <pre><code class="language-c">/* Write a program to input a new element at a specific position of an array. + a[] = {4, 5, 2, 10, 6, 9, 8}, newItem = 7, position = 3 +*/ +/* Author: Amit Dutta, Date: 18-11-2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int a[8] = {4, 5, 2, 10, 6, 9, 8}; + int i; + + printf(&quot;Elemnts of the array: &quot;); + for (i = 0; i &lt;= 6; i++) + printf(&quot;%d &quot;, a[i]); + + printf(&quot;\nMethod 1: &quot;); + for (i = 7; i &gt;= 4; i--) + a[i] = a[i - 1]; + a[3] = 7; + for (i = 0; i &lt;= 7; i++) + printf(&quot;%d &quot;, a[i]); + + // another method + printf(&quot;\nMethod 2: &quot;); + int b[8] = {4, 5, 2, 10, 6, 9, 8}; + int temp1 = 7; + for (i = 3; i &lt;= 7; i++) + { + int temp2 = b[i]; + b[i] = temp1; + temp1 = temp2; + } + for (i = 0; i &lt;= 7; i++) + printf(&quot;%d &quot;, b[i]); + + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-011.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-011_c', 'APC-S-011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-011.c"> + <pre><code class="language-c">/* Linear search */ +/* Author: Amit Dutta, Date: 19-11-2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int elementCount, i, keyElement; + + printf(&quot;Enter the number of element you want to add: &quot;); + scanf(&quot;%d&quot;, &amp;elementCount); + + int elements[elementCount]; + + for (i = 0; i &lt; elementCount; i++) + { + printf(&quot;Enter Element %d: &quot;, i + 1); + scanf(&quot;%d&quot;, &amp;elements[i]); + } + + printf(&quot;\nEnter the Key Element you want to search: &quot;); + scanf(&quot;%d&quot;, &amp;keyElement); + for (i = 0; i &lt; elementCount; i++) + if (elements[i] == keyElement) + { + printf(&quot;\nKey Element %d is found in %d position.&quot;, keyElement, i); + return 0; + } + printf(&quot;\nKey Element %d is not found.&quot;, keyElement); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-012.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-012.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-012_c', 'APC-S-012.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-012_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-012.c"> + <pre><code class="language-c">/* Write a program to check if a matrix is a sparx matrix. */ +/* Author: Amit Dutta, Date: 19-11-2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int i, j, row, col, count = 0; + + printf(&quot;Enter the number of rows and columns in the matrix: &quot;); + scanf(&quot;%d %d&quot;, &amp;row, &amp;col); + + int matrix[row][col]; + + for (i = 0; i &lt; row; i++) + for (j = 0; j &lt; col; j++) + { + printf(&quot;Postion %d%d: &quot;, i, j); + scanf(&quot;%d&quot;, &amp;matrix[i][j]); + if (matrix[i][j] == 0) + count++; + } + + printf(&quot;\nEntered Matrix: \n&quot;); + for (i = 0; i &lt; row; i++) + { + for (j = 0; j &lt; col; j++) + printf(&quot;%d &quot;, matrix[i][j]); + printf(&quot;\n&quot;); + } + + if (count &gt; (row * col) / 2) + printf(&quot;\nEntered matrix is a Sparx Matrix.&quot;); + else + printf(&quot;\nEntered matrix is not a Sparx Matrix&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-S-013.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-013.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-S-013_c', 'APC-S-013.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-S-013_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-S-013.c"> + <pre><code class="language-c">/* Write a fuction to calculate the average of an array */ +/* Author: Amit Dutta, Date: 26-11-2025 */ + +#include &lt;stdio.h&gt; + +double average(int []); + +int main() +{ + int marks[10], i; + printf(&quot;\nEnter 10 numbers: \n&quot;); + for (i = 0; i &lt;= 9; i++) + { + printf(&quot;Enter number %d: &quot;, i + 1); + scanf(&quot;%d&quot;, &amp;marks[i]); + } + printf(&quot;\nAverage = %g&quot;, average(marks)); + return 0; +} + +double average(int marks[10]) +{ + int sum = 0; + for (int i = 0; i &lt;= 9; i++) + sum += marks[i]; + return sum / 10.0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-SPS-001.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-SPS-001_c', 'APC-SPS-001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-SPS-001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-001.c"> + <pre><code class="language-c">// WAP to perform arithmatic operation on integer data + +#include&lt;stdio.h&gt; +int main() { + int a, b, sum, sub, multi, div, mod; + printf(&quot;Enter 1st number : &quot;); + scanf(&quot;%d&quot;, &amp;a); + printf(&quot;Enter 2nd number : &quot;); + scanf(&quot;%d&quot;, &amp;b); + sum = a + b; + sub = a - b; + multi = a * b; + div = a / b; + mod = a % b; + printf(&quot;\nSum = %d&quot;, sum); + printf(&quot;\nSubtraction = %d&quot;, sub); + printf(&quot;\nMultiplication = %d&quot;, multi); + printf(&quot;\nDivision = %d&quot;, div); + printf(&quot;\nModulas = %d&quot;, div); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-SPS-002.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-SPS-002_c', 'APC-SPS-002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-SPS-002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-002.c"> + <pre><code class="language-c">/* WAP to swap two integers. Display both numbers +before and after swap */ + +#include&lt;stdio.h&gt; +int main() { + int a = 10, b = 20, temp; + printf(&quot;Before swap A : %d, B : %d&quot;, a, b); + temp = a; + a = b; + b = temp; + printf(&quot;\nAfter swap A : %d, B : %d&quot;, a, b); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-SPS-003.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-SPS-003_c', 'APC-SPS-003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-SPS-003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-003.c"> + <pre><code class="language-c">/* Bitwise AND &#x27;&amp;&#x27; */ + +#include&lt;stdio.h&gt; +int main() { + unsigned int a = 4, b = 5, c = 6; + unsigned int x, y; + x = a &amp; b; + y = b &amp; c; + printf(&quot;x = %u y = %u&quot;, x, y); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-SPS-004.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-SPS-004_c', 'APC-SPS-004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-SPS-004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-004.c"> + <pre><code class="language-c">#include&lt;stdio.h&gt; +int main() { + int x = 25, y = 19, z; + z = x - y; + z = z &amp; x ; + printf(&quot;Z = %d&quot;, z); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-SPS-005.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-SPS-005_c', 'APC-SPS-005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-SPS-005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-005.c"> + <pre><code class="language-c">/* Bitwise OR &#x27;|&#x27; */ + +#include&lt;stdio.h&gt; +int main() { + int x = 12, y = 14, z = 10, res; + x++; + z++; + x = x + y + z; + res = x | y; + z = res | z; + printf(&quot;x = %d y = %d z = %d res = %d&quot;, x, y, z, res); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-SPS-006.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-SPS-006_c', 'APC-SPS-006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-SPS-006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-006.c"> + <pre><code class="language-c">/* Bitwise NOT &#x27;~&#x27; */ + +#include&lt;stdio.h&gt; +int main() { + int x = 12, y = 15, z = 21; + int res, res1, res2; + res = x &gt; 10; + res1 = ~res; + res2 = ~x; + printf(&quot;REs = %d, Res1 = %d, Res2 = %d&quot;, res, res1, res2); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-SPS-007.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-SPS-007_c', 'APC-SPS-007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-SPS-007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-007.c"> + <pre><code class="language-c">/* WAP to check a number is even or odd using bitwise operator */ + +#include&lt;stdio.h&gt; +int main() { + int x, res = 1; + printf(&quot;Enter a number : &quot;); + scanf(&quot;%d&quot;, &amp;x); + res = res &amp; x; + if (res == 0) { + printf(&quot;\nInput %d is a even number.&quot;, x); + } + else { + printf(&quot;\nInput %d is a odd number.&quot;, x); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-SPS-008.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-SPS-008_c', 'APC-SPS-008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-SPS-008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-SPS-008.c"> + <pre><code class="language-c">/* WAP to calculate area of circle by accepting radius as input */ +/* Author : Amit Dutta, Date : 15th September, 2025 */ + +#include&lt;stdio.h&gt; +#include&lt;math.h&gt; +int main() { + double r, area; + printf(&quot;Enter the radius of circle : &quot;); + scanf(&quot;%lf&quot;, &amp;r); + area = M_PI * r * r; + printf(&quot;\nArea : %lf&quot;, area); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P001.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P001.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P001_c', 'P001.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P001_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P001.c"> + <pre><code class="language-c">//sample code +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +int main() { + printf(&quot;Hello world&quot;); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P002.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P002.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P002_c', 'P002.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P002_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P002.c"> + <pre><code class="language-c">//sample code with a new line charecter +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +int main() { + printf(&quot;Hello\nworld&quot;); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P003.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P003.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P003_c', 'P003.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P003_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P003.c"> + <pre><code class="language-c">//WAP to perform addtion and multiplication of two integer numbers +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +int main() { + int a, b, sum, multi; + printf(&quot;Enter the 1st number : &quot;); + scanf(&quot;%d&quot;,&amp;a); + printf(&quot;Enter the 2nd number : &quot;); + scanf(&quot;%d&quot;,&amp;b); + sum = a + b; + multi = a * b; + printf(&quot;\nSum = %d&quot; + &quot;\nMultiplication = %d&quot;,sum,multi); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P004.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P004.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P004_c', 'P004.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P004_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P004.c"> + <pre><code class="language-c">/* WAP to find and display the value of given expression : +((x+3)/4) - ((2x+4)/3) taking the value of x = 5 */ +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +int main() { + double x =5, result; + result = ((x + 3) / 4) - ((2 * x + 4) / 3); + printf(&quot;Result = %lf&quot;,result); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P005.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P005.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P005_c', 'P005.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P005_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P005.c"> + <pre><code class="language-c">/* A person is paid Rs. 455 for each day he works and fined +Rs. 150 for each day he remains absent. WAP to calculate his +monthly income taking the number of days present as input. */ +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +int main() { + int daily_wage = 455, fine = 150, present, absent, income; + printf(&quot;No of days present : &quot;); + scanf(&quot;%d&quot;, &amp;present); + absent = 30 - present; + income = (present * 455) - (absent * 150); + printf(&quot;\nIncome : %d&quot;,income); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P006.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P006.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P006_c', 'P006.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P006_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P006.c"> + <pre><code class="language-c">/* The normal temperature of human body +is 98.6 Degree Fahrenheit. WAP to convert the temperature +to Degree Celcius and display the output. */ +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +int main() { + double f = 98.6, c; + c = ((f - 32) * 5) / 9; + printf(&quot;Temperature in Celcius is : %lf&quot;,c); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P007.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P007.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P007_c', 'P007.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P007_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P007.c"> + <pre><code class="language-c">/* A shopkeeper offers 10% discount on printed +price of a digital camera. However a customer has +to pay 6% GST on the remaining amount. WAP to +calculate and display the amount to paid by the +customer, taking the printed price as input. */ +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +int main() { + double mrp, final_price, temp; + printf(&quot;Enter the printed price : &quot;); + scanf(&quot;%lf&quot;, &amp;mrp); + temp = mrp * 0.90; + final_price = temp * 1.06; + printf(&quot;\nCustomer have to pay : %lf&quot;, final_price); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P008.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P008.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P008_c', 'P008.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P008_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P008.c"> + <pre><code class="language-c">/* A shopkeeper offers 30% discount on purchasing an +item whereas the other shopkeeper offers 2 successive +discount of 20% and 10% for purchasing the same item. +WAP to caompute and display the discounted price of the +item by taking the price as input. */ +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +int main() { + double mrp, shop1, shop2, temp; + printf(&quot;Enter the price : &quot;); + scanf(&quot;%lf&quot;, &amp;mrp); + shop1 = mrp * 0.70; + temp = mrp * 0.80; + shop2 = temp * 0.90; + printf(&quot;\nShopkeeper 1 price : %lf&quot; + &quot;\nShopkeeper 2 price : %lf&quot;,shop1,shop2); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P009.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P009.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P009_c', 'P009.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P009_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P009.c"> + <pre><code class="language-c">/* WAP to calculate gross and net salary +by accepting basic salary as input. +IMP : DA = 30% of Basic Pay + HRA = 20% of Basic Pay + PF = 12.5% of Basic Pay + Gross Salary = Basic Pay + DA + HRA + Net Salary = Gross Salary - PF +*/ +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +int main() { + double bs, da, hra, pf, gs, ns; + printf(&quot;Enter the Basic Salary : &quot;); + scanf(&quot;%lf&quot;, &amp;bs); + da = bs * 0.3; + hra = bs * 0.2; + pf = bs * 0.125; + gs = bs + da + hra; + ns = gs - pf; + printf(&quot;\nGross Salary : %lf&quot; + &quot;\nNet Salary : %lf&quot;, gs, ns); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P010.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P010.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P010_c', 'P010.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P010_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P010.c"> + <pre><code class="language-c">/* WAP to find and display the difference +between compound Interest and Simple Interest. +Take principle amount as input. +Hint : si = (p * r * t) / 100 + a = p * ((1 + (r / 100)) ^ t) + ci = a - p +*/ +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +#include&lt;math.h&gt; +int main() { + double p, r, t, si, a, ci, dif; + printf(&quot;Enter the principle amount, rate of interest, time in year : &quot;); + scanf(&quot;%lf %lf %lf&quot;, &amp;p, &amp;r, &amp;t); + si = (p * r * t) / 100; + a = p * pow((1 + (r / 100)), t); + ci = a - p; + dif = ci - si; + printf(&quot;\nSimple Interest : %lf&quot; + &quot;\nCompound Interest : %lf&quot; + &quot;\nInterest Difference : %lf&quot;, si, ci, dif); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P011.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P011.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P011_c', 'P011.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P011_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P011.c"> + <pre><code class="language-c">/* The time period of a simple pendulam is +given by the formula : + t = 2 * pi * square_root(l / g) +WAP to calculate T take length(L) and gravity +as input +*/ +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +#include&lt;math.h&gt; +int main() { + double l, g, t; + printf(&quot;Enter the Length and Gravity measures : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;l, &amp;g); + t = 2 * M_PI * sqrt(l / g); + // using M_PI variable for PI value from math.h header file + printf(&quot;\nTime Period : %lf&quot;, t); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P012.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P012.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P012_c', 'P012.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P012_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P012.c"> + <pre><code class="language-c">/* WAP to swap two integer variable without +using third variable */ +// using Approch Mode : simple, slow, time consuming +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +int main() { + int a = 4, b = 6; + printf(&quot;Before Swap : A = %d, B = %d&quot;, a, b); + a = a + b; + b = a - b; + a = a - b; + printf(&quot;\nAfter Swap : A = %d, B = %d&quot;, a, b); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P013.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P013.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P013_c', 'P013.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P013_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P013.c"> + <pre><code class="language-c">/* WAP to swap two integer variable without +using third variable */ +// using Approch Mode : complex, fast, less time consumimg +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +#include&lt;math.h&gt; +int main() { + int a = 4, b = 6; + printf(&quot;Before Swap : A = %d, B = %d&quot;, a, b); + a = a ^ b; + b = a ^ b; + a = a ^ b; + printf(&quot;\nAfter Swap : A = %d, B = %d&quot;, a, b); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P014.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P014.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P014_c', 'P014.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P014_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P014.c"> + <pre><code class="language-c">/* WAP to accept the diagonal of +square. Find and display the area and +perimeter of the square. */ +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +#include&lt;math.h&gt; +int main() { + double d, side, area, per; + printf(&quot;Enter the diagonal : &quot;); + scanf(&quot;%lf&quot;, &amp;d); + side = d / sqrt (2); + area = side * side; + per = 4 * side; + printf(&quot;\nArea of the Square : %lf&quot; + &quot;\nPerimeter of the Square : %lf&quot;, area, per); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P015.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P015.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P015_c', 'P015.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P015_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P015.c"> + <pre><code class="language-c">/*WAP to accept number of days and +display it after converting into +number of years, months and days */ +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +int main() { + int day, month, year, temp; + printf(&quot;Enter the number of days : &quot;); + scanf(&quot;%d&quot;, &amp;day); + temp = day; + year = day / 365; + day = day % 365; + month = day / 30; + day = day % 30; + printf(&quot;\n%d Days = %d Years %d Months %d Days&quot;, temp, year, month, day); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P016.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P016.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P016_c', 'P016.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P016_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P016.c"> + <pre><code class="language-c">/* WAP to calculate and display radius of a +circle by taking the area as input */ +// Author - Amit Dutta, Date - Unknown + +#include&lt;stdio.h&gt; +#include&lt;math.h&gt; +int main() { + double area, r; + printf(&quot;Enter the area of a circle : &quot;); + scanf(&quot;%lf&quot;, &amp;area); + r = sqrt((7 * area) / 22); + printf(&quot;\nRadius : %lf&quot;, r); + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P017.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P017.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P017_c', 'P017.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P017_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P017.c"> + <pre><code class="language-c">/* Find maximum between three number. */ +// Author - Amit Dutta, Date - Unknown + +#include &lt;stdio.h&gt; +int main() +{ + int a, b, c, max; + printf(&quot;Enter the value for a, b, c : &quot;); + scanf(&quot;%d %d %d&quot;, &amp;a, &amp;b, &amp;c); + max = a; + if (max &lt; b) + max = b; + if (max &lt; c) + max = c; + printf(&quot;Maximum : %d&quot;, max); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P018.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P018.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P018_c', 'P018.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P018_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P018.c"> + <pre><code class="language-c">/* WAP to input the cost price and selling price and +calculate profit, profit percentage, loss percentage or +display the manage nither profit nor loss. */ +// Author - Amit Dutta, Date - Unknown + +#include &lt;stdio.h&gt; +int main() +{ + double cost, sell, pro, prop, loss, lossp; + printf(&quot;Enter the cost and selling price : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;cost, &amp;sell); + if (sell &gt; cost) + { + pro = sell - cost; + prop = (pro / cost) * 100; + printf(&quot;Profit : RS %g, Profit Percentage : %g&quot;, pro, prop); + } + else if (sell &lt; cost) + { + loss = cost - sell; + lossp = (loss / cost) * 100; + printf(&quot;Loss : RS %g, Loss Percentage : %g&quot;, loss, lossp); + } + else + printf(&quot;Neither loss nor Profit.&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P019.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P019.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P019_c', 'P019.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P019_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P019.c"> + <pre><code class="language-c">/* WAP to input the distance covered and calculate +the amount to be paid by the passanger. + Distance Rate + =&lt;5KM RS 90 + next 10KM RS 20/KM + next 10KM RS 10/KM + more than 25KM RS 9/KM +*/ +// Author - Amit Dutta, Date - Unknown + +#include &lt;stdio.h&gt; +int main() +{ + double dis, amt; + printf(&quot;Enter the distance : &quot;); + scanf(&quot;%lf&quot;, &amp;dis); + if (dis &lt;= 5.0) + amt = 90.0; + else if (dis &gt; 5.0 &amp;&amp; dis &lt;= 15.0) + amt = 90.0 + (dis - 5.0) * 20; + else if (dis &gt; 15.0 &amp;&amp; dis &lt;= 25.0) + amt = 90.0 + 200.0 + (dis - 15.0) * 10; + else if (dis &gt; 25.0) + amt = 90.0 + 200.0 + 100.0 + (dis - 25.0) * 9; + printf(&quot;\nAmount to be paid : %g&quot;, amt); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P020.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P020.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P020_c', 'P020.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P020_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P020.c"> + <pre><code class="language-c">/* WAP to calculate and display the maturity amount +taking the sum and number of days as input. + No. of Days Rate of Interest + Upto 180 days 5.5 % + 181 to 364 days 7.5 % + exact 365 days 9.0 % + more than 365 days 8.5 % +*/ +// Author - Amit Dutta, Date - Unknown + +#include &lt;stdio.h&gt; +int main() +{ + double nod, amt, s, i; + printf(&quot;Enter the amount and the time in days : &quot;); + scanf(&quot;%lf %lf&quot;, &amp;s, &amp;nod); + if (nod &lt;= 180) + i = (s * 5.5 * (nod / 365)) / 100; + else if (nod &gt; 180.0 &amp;&amp; nod &lt;= 364.0) + i = (s * 7.5 * (nod / 365)) / 100; + else if (nod == 365.0) + i = (s * 9.0 * 1) / 100; + else if (nod &gt; 365.0) + i = (s * 8.5 * (nod / 365)) / 100; + amt = s + i; + printf(&quot;Amount to be paid : %g&quot;, amt); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P021.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P021.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P021_c', 'P021.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P021_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P021.c"> + <pre><code class="language-c">/* WAP to input a positive number and check if it is a perfect +square number or not. */ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +int main() +{ + int n, temp; + double sr; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;n); + sr = sqrt(n); + temp = (int)sr; + if (temp * temp == n) + printf(&quot;\nThis is a perfect square.&quot;); + else + printf(&quot;\nThis is not a perfect square.&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P022.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P022.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P022_c', 'P022.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P022_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P022.c"> + <pre><code class="language-c">/* WAP to find out smallest of three numbers without using if_else block. */ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. + +#include &lt;stdio.h&gt; +int main() +{ + int a, b, c, min; + printf(&quot;Enter three number : &quot;); + scanf(&quot;%d %d %d&quot;, &amp;a, &amp;b, &amp;c); + min = (a &lt; b &amp;&amp; a &lt; c) ? a : (b &lt; a &amp;&amp; b &lt; c) ? b + : c; + printf(&quot;Minimum = %d&quot;, min); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P023.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P023.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P023_c', 'P023.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P023_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P023.c"> + <pre><code class="language-c">/* WAP to input the total cost and compute the amount to be paid +by the customer. */ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. + +#include &lt;stdio.h&gt; +int main() +{ + double cost, amt; + printf(&quot;Enter the total cost : &quot;); + scanf(&quot;%lf&quot;, &amp;cost); + if (cost &lt;= 2000) + amt = cost * 0.94; + else if (cost &gt; 2000 &amp;&amp; cost &lt;= 5000) + amt = cost * 0.9; + else if (cost &gt; 5000 &amp;&amp; cost &lt;= 10000) + amt = cost * 0.85; + else if (cost &gt; 10000) + amt = cost * 0.8; + printf(&quot;\nAmount to be paid : %g&quot;, amt); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P024.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P024.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P024_c', 'P024.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P024_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P024.c"> + <pre><code class="language-c">/* WAP to check whether a year is leapyear or not. */ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. + +#include &lt;stdio.h&gt; +int main() +{ + int year; + printf(&quot;Enter the year : &quot;); + scanf(&quot;%d&quot;, &amp;year); + if (year % 4 == 0 &amp;&amp; year % 100 != 0) + printf(&quot;\nYear %d is a leapyear.&quot;, year); + else if (year % 400 == 0) + printf(&quot;\nYear %d is a leapyear (Century).&quot;, year); + else + printf(&quot;\nYear %d is not a leapyear.&quot;, year); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P025.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P025.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P025_c', 'P025.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P025_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P025.c"> + <pre><code class="language-c">/* WAP to input the electricity unit consumed and calculate the total +bill amount according to the given condition : + for 1st 50 unit Rs. 0.50 per unit + next 100 unit Rs. 0.75 per unit + next 100 unit Rs. 1.20 per unit + above 250 unit Rs. 1.50 per unit +And additional charge of 20 percent is added to the bill. +*/ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. + +#include &lt;stdio.h&gt; +int main() +{ + double unit, amt; + printf(&quot;Enter the electricity consp(unit) : &quot;); + scanf(&quot;%lf&quot;, &amp;amt); + if (unit &lt;= 50) + amt = unit * 0.50; + else if (unit &gt; 50 &amp;&amp; unit &lt;= 50) + amt = 25 + ((unit - 50) * 0.75); + else if (unit &gt; 150 &amp;&amp; unit &lt;= 250) + amt = 25 + 75 + ((unit - 150) * 1.20); + else if (unit &gt; 250) + amt = 25 + 75 + 120 + ((unit - 250) * 1.50); + amt = amt * 1.20; + printf(&quot;\nAmount to be paid : %g&quot;, amt); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P026.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P026.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P026_c', 'P026.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P026_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P026.c"> + <pre><code class="language-c">/* WAP to input sum (p), rate of interest (r), time (t) and type of interest +(&#x27;s&#x27; for simple interest amd &#x27;c&#x27; for compound interest). Calculate and display +the interest earned + si = (p * r * t) / 100 + compoundInterest = p * ((1 + r / 100)^t - 1) +*/ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +#include &lt;ctype.h&gt; +int main() +{ + double principalAmount, rateOfInterest, timePeriod, simpleInterest, compoundInterest; + char mode; + printf(&quot;Enter the principle amount, Rate of interest, Time : &quot;); + scanf(&quot;%lf %lf %lf&quot;, &amp;principalAmount, &amp;rateOfInterest, &amp;timePeriod); + printf(&quot;\nEnter the mode (&#x27;s&#x27; : simple interest, &#x27;c&#x27; : compound interest) : &quot;); + scanf(&quot; %c&quot;, &amp;mode); + mode = tolower(mode); + switch (mode) + { + case &#x27;s&#x27;: + simpleInterest = (principalAmount * rateOfInterest * timePeriod) / 100; + printf(&quot;\nSimple Interest : %g&quot;, simpleInterest); + break; + case &#x27;c&#x27;: + compoundInterest = principalAmount * (pow((1 + rateOfInterest / 100), timePeriod) - 1); + printf(&quot;\nCompound Interest : %g&quot;, compoundInterest); + break; + default: + printf(&quot;\nInvalid Input&quot;); + return 1; + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P027.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P027.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P027_c', 'P027.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P027_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P027.c"> + <pre><code class="language-c">/* Purchase Discount on Discount on + Amount Laptop Desktop + -------- ----------- ----------- + Upto 20k 3.0% 5.0% + 20001 - 50k 5.0% 7.5% + 50001 - 75k 7.5% 10.5% + more than 75k 10.0% 15.0% +WAP to input amount of purchase and type of purchase (&#x27;L&#x27; : laptop, &#x27;D&#x27; : desktop) +and display the discount amount and the discounted price (Net Amount). +*/ +/* Author - Amit Dutta, Date - 8th OCT, 2025 */ +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. + +#include &lt;stdio.h&gt; +#include &lt;ctype.h&gt; +int main() +{ + double principal_amount, desktop_discount, laptop_discount, discount_amount, discounted_price; + char choice; + printf(&quot;Enter the purchase amount : &quot;); + scanf(&quot;%lf&quot;, &amp;principal_amount); + printf(&quot;Type of purchase (&#x27;L&#x27; : Laptop, &#x27;D&#x27; : Desktop) : &quot;); + scanf(&quot; %c&quot;, &amp;choice); + choice = toupper(choice); + if (principal_amount &lt;= 20000) + { + laptop_discount = 0.03; + desktop_discount = 0.05; + } + else if (principal_amount &gt; 20000 &amp;&amp; principal_amount &lt;= 50000) + { + laptop_discount = 0.05; + desktop_discount = 0.075; + } + else if (principal_amount &gt; 50000 &amp;&amp; principal_amount &lt;= 75000) + { + laptop_discount = 0.075; + desktop_discount = 0.105; + } + else if (principal_amount &gt; 75000) + { + laptop_discount = 0.1; + desktop_discount = 0.15; + } + switch (choice) + { + case &#x27;L&#x27;: + discount_amount = principal_amount * laptop_discount; + discounted_price = principal_amount - discount_amount; + printf(&quot;\nDiscount Amount : %g&quot; + &quot;\nDiscounted Price : %g&quot;, + discount_amount, discounted_price); + break; + case &#x27;D&#x27;: + discount_amount = principal_amount * desktop_discount; + discounted_price = principal_amount - discount_amount; + printf(&quot;\nDiscount Amount : %g&quot; + &quot;\nDiscounted Price : %g&quot;, + discount_amount, discounted_price); + break; + default: + printf(&quot;\nInvalid Input.&quot;); + return 1; + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P028.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P028.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P028_c', 'P028.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P028_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P028.c"> + <pre><code class="language-c">/* WAP to calculate factorial of a number */ +/* Author - Amit Dutta, Date - 11th OCT, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int i = 1, num, fact = 1; + printf(&quot;Enter the number : &quot;); + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nPlease enter a number.&quot;); + return 1; + } + if (num == 0) + { + printf(&quot;\nFactorial of 0 : 1&quot;); + return 0; + } + if (num &lt; 0) + { + printf(&quot;\nFactorial of %d : UNDEFINED&quot;, num); + return 0; + } + while (i &lt;= num) + { + fact = fact * i; + i++; + } + printf(&quot;Factorial of %d : %d&quot;, num, fact); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P029.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P029.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P029_c', 'P029.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P029_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P029.c"> + <pre><code class="language-c">/* WAP to perform addition of first n natural numbers. sum = 1 + 2 + 3 + ... */ +/* Author - Amit Dutta, Date - 11th OCT, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int num, i = 0, result = 0; + printf(&quot;Enter the value for n : &quot;); + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nPlease enter a number.&quot;); + return 1; + } + if (num &lt; 1) + { + printf(&quot;\nPlease enter a positive number.&quot;); + return 1; + } + while (i &lt;= num) + { + result = result + i; + i++; + } + printf(&quot;\nResult : %d&quot;, result); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P030.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P030.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P030_c', 'P030.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P030_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P030.c"> + <pre><code class="language-c">/* Display the first 15 terms of the series. */ +/* Author - Amit Dutta, Date - 11th OCT, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + int i, r; + + // 3, 6, 9, 12, ... + { + i = 3, r = 0; + printf(&quot;Series 1 (3, 6, 9, 12, ...) :&quot;); + while (i &lt;= 15) + { + r = r + 3; + printf(&quot; %d&quot;, r); + i++; + } + } + + // 1, 4, 9, 16, ... + { + i = 1; + printf(&quot;\nSeries 2 (1, 4, 9, 16, ...) :&quot;); + while (i &lt;= 15) + { + printf(&quot; %d&quot;, i * i); + i++; + } + } + + // 4, 8, 16, 32, ... + { + i = 1, r = 2; + printf(&quot;\nSeries 3 (4, 8, 16, 32, ...) :&quot;); + while (i &lt;= 15) + { + r = r * 2; + printf(&quot; %d&quot;, r); + i++; + } + } + + // 0, 7, 26, ... + { + i = 1, r; + printf(&quot;\nSeries 4 (0, 7, 26, ...) :&quot;); + while (i &lt;= 15) + { + r = (int)pow(i, 3) - 1; + printf(&quot; %d&quot;, r); + i++; + } + } + + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P031.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P031.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P031_c', 'P031.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P031_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P031.c"> + <pre><code class="language-c">/* Find the sum of the series */ +/* Author - Amit Dutta, Date - 11th OCT, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + double a, res, n; + int i; + + // s = (a ^ 2) + (a ^ 2 / 2) + (a ^ 2 / 3) + ... + (a ^ 2 / 10) + { + res = 0, i = 1; + printf(&quot;--- s = (a ^ 2) + (a ^ 2 / 2) + (a ^ 2 / 3) + ... + (a ^ 2 / 10) ---&quot;); + printf(&quot;\nEnter the number : &quot;); + scanf(&quot;%lf&quot;, &amp;a); + while (i &lt;= 10) + { + res = res + ((a * a) / i); + i++; + } + printf(&quot;S = %g&quot;, res); + } + + // s = 1 + (2 ^ 2 / a) + (3 ^ 3 / a ^ 2) + ... + n + { + res = 0, i = 0; + printf(&quot;\n--- // s = 1 + (2 ^ 2 / a) + (3 ^ 3 / a ^ 2) + ... + n ---&quot;); + printf(&quot;\nEnter the value for a and n : &quot;); + scanf(&quot; %lf %lf&quot;, &amp;a, &amp;n); + while (i &lt;= n - 1) + { + res = res + (pow(i + 1, i + 1) / pow(a, i)); + i++; + } + printf(&quot;S = %g&quot;, res); + } + + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P032.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P032.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P032_c', 'P032.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P032_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P032.c"> + <pre><code class="language-c">/* WAP to input a number and check whether it is a Niven number +or not. (When a number is divisible by its sum of digit) e.g. : n = 126*/ +/* Author - Amit Dutta, Date - 11th OCT, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int n, temp, sod = 0; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;n); + temp = n; + while (temp &gt; 0) + { + sod = sod + (temp % 10); + temp = temp / 10; + } + if (n % sod == 0) + printf(&quot;\nIt is Niven number.&quot;); + else + printf(&quot;\nIt is not a Niven number.&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P033.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P033.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P033_c', 'P033.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P033_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P033.c"> + <pre><code class="language-c">/* WAP to calculate the sum of even digits and odd digits. Number will be provided by user. */ +/* Author - Amit Dutta, Date - 18th OCT, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int inp, odd = 0, even = 0, temp; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;inp); + temp = inp; + while (temp &gt; 0) + { + if ((temp % 10) % 2 == 0) + even += temp % 10; + else + odd += temp % 10; + temp /= 10; + } + printf(&quot;\nSum of even : %d&quot; + &quot;\nSum of odd : %d&quot;, + even, odd); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P034.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P034.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P034_c', 'P034.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P034_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P034.c"> + <pre><code class="language-c">/* Get sum of even position digit and odd position digit */ +/* Counting starts from the rightmost digit as position 1 (Odd). */ +/* Author - Amit Dutta, Date - 18th OCT, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int inp, temp, index = 1, even = 0, odd = 0; + printf(&quot;Enter the numebr : &quot;); + scanf(&quot;%d&quot;, &amp;inp); + temp = inp; + while (temp &gt; 0) + { + if (index % 2 == 0) + even += temp % 10; + else + odd += temp % 10; + temp /= 10; + index++; + } + printf(&quot;\nSum of even position digits : %d&quot; + &quot;\nSum of odd position digits : %d&quot;, + even, odd); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P035.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P035.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P035_c', 'P035.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P035_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P035.c"> + <pre><code class="language-c">/* WAP to input an int number and display the product of the successors +of even digits of the number entered by user. */ +/* Author - Amit Dutta, Date - 18th OCT, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;stdbool.h&gt; +int main() +{ + int n, res = 1, temp; + bool status = false; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;n); + temp = n; + while (temp &gt; 0) + { + if ((temp % 10) % 2 == 0) + { + res *= (temp % 10) + 1; + status = true; + } + temp /= 10; + } + if (!status) + printf(&quot;\nThere is no even digits.&quot;); + else + printf(&quot;\nThe product of the successors of even digits of the number %d is : %d&quot;, n, res); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P036.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P036.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P036_c', 'P036.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P036_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P036.c"> + <pre><code class="language-c">/* sum = a + (a^2)/2 + (a^3)/3 + ... + (a^n)/n */ +/* Author - Amit Dutta, Date - 18th OCT, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + double a, sum = 0; + int n, i; + printf(&quot;Enter value for a and n : &quot;); + scanf(&quot;%lf %d&quot;, &amp;a, &amp;n); + for (i = 1; i &lt;= n; i++) + sum += pow(a, i) / i; + printf(&quot;\nSum = %g&quot;, sum); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P037.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P037.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P037_c', 'P037.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P037_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P037.c"> + <pre><code class="language-c">/* sum = 1 + 1+2/1*2 + 1+2+3/1*2*3 + ... + 1+2+3+...+n/1*2*3*...*n */ +/* Author - Amit Dutta, Date - 18th OCT, 2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + double sum = 0, temp1 = 0, temp2 = 1; + int n, i; + printf(&quot;Enter value for n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for (i = 1; i &lt;= n; i++) + { + temp1 += i; + temp2 *= i; + sum += temp1 / temp2; + } + printf(&quot;\nSum = %g&quot;, sum); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P038.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P038.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P038_c', 'P038.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P038_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P038.c"> + <pre><code class="language-c">/* Write a program to check prime number */ +/* Author - Amit Dutta, Date - 27th OCT, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +#include &lt;stdbool.h&gt; + +int main() +{ + int num, i, endCheckDigit; + bool isPrime = true; + printf(&quot;Enter the number : &quot;); + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nOnly a number is allowed, not a character.&quot;); + return 1; + } + if (num &lt;= 0) + { + printf(&quot;\nOnly postive number is allowed.&quot;); + return 1; + } + if (num == 1) + { + printf(&quot;\nInput 1 is not a prime number.&quot; + &quot;\nHas only one positive divisor (itself), not exactly two.&quot; + &quot;\nRule: Prime number should have exactly two distinct positive divisors: 1 and itself&quot;); + return 0; + } + if (num == 2) + { + printf(&quot;\nInput 2 is a prime number.&quot; + &quot;\n(Note: 2 is only Even Prime Number)&quot;); + return 0; + } + if (num % 2 == 0) + { + printf(&quot;\nInput %d is not a prime number.&quot;, num); + return 0; + } + endCheckDigit = sqrt(num); + for (i = 3; i &lt;= endCheckDigit; i += 2) + { + if (num % i == 0) + { + isPrime = false; + printf(&quot;\nInput %d is not prime number.&quot;, num); + return 0; + } + } + if (isPrime) + { + printf(&quot;\nInput %d is a prime number.&quot;, num); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P039.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P039.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P039_c', 'P039.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P039_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P039.c"> + <pre><code class="language-c">/* Write a program to print all the factors of a postive integer */ +/* Author - Amit Dutta, Date - 27th OCT, 2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int num, i; + printf(&quot;Enter a number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + printf(&quot;\nFactors of %d : &quot;, num); + for (i = 1; i &lt;= num / 2; i++) + { + if (num % i == 0) + { + printf(&quot; %d&quot;, i); + } + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P040.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P040.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P040_c', 'P040.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P040_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P040.c"> + <pre><code class="language-c">/* Write a program to calculate HCF of two positive number */ +/* Author - Amit Dutta, Date - 27th OCT, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int a, b, temp; + printf(&quot;Enter two number : &quot;); + scanf(&quot;%d %d&quot;, &amp;a, &amp;b); + while (b &gt; 0) + { + temp = a; + a = b; + b = temp % b; + } + printf(&quot;HCF = %d&quot;, a); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P041.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P041.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P041_c', 'P041.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P041_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P041.c"> + <pre><code class="language-c">/* Write a program to enter two numbers and check they are co-prime or not. + co-prime when HCF = 1 +*/ +/* Author - Amit Dutta, Date - 27th OCT, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int a, b, temp, temp_a, temp_b; + printf(&quot;Enter two number : &quot;); + scanf(&quot;%d %d&quot;, &amp;a, &amp;b); + temp_a = a; + temp_b = b; + while (b &gt; 0) + { + temp = a; + a = b; + b = temp % b; + } + if (a == 1) + { + printf(&quot;\n(%d, %d) is co-prime.&quot;, temp_a, temp_b); + } + else + { + printf(&quot;\n(%d, %d) is not co-prime.&quot;, temp_a, temp_b); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P042.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P042.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P042_c', 'P042.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P042_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P042.c"> + <pre><code class="language-c">/* Write a program to accept a number and check whether the number +is twisted prime or not. */ +/* Author - Amit Dutta, Date - 27th OCT, 2025 */ + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + int n, t, i, r, rev, prime = 1; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for (i = 2; i &lt;= (int)sqrt(n); i++) + { + if (n % i == 0) + { + prime = 0; + break; + } + } + if (prime) + { + printf(&quot;%d is a prime number.&quot;, n); + t = n; + rev = 0; + prime = 1; + while (t &gt; 0) + { + r = t % 10; + rev = rev * 10 + r; + t = t / 10; + } + for (i = 2; i &lt;= (int)sqrt(rev); i++) + { + if (rev % i == 0) + { + prime = 0; + break; + } + } + if (prime) + { + printf(&quot;\n%d and %d are prime numbers.. TWISTED PRIME&quot;, n, rev); + } + else + { + printf(&quot;\n%d is non prime&quot;, rev); + } + } + else + { + printf(&quot;\n%d is non prime.&quot;, n); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P043.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P043.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P043_c', 'P043.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P043_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P043.c"> + <pre><code class="language-c">/* Write a program to check palindrome number. */ +/* Author - Amit Dutta, Date - 27th OCT, 2025 */ + +#include &lt;stdio.h&gt; +int main() +{ + int num, temp, rev; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + temp = num; + rev = 0; + while (temp &gt; 0) + { + rev = (rev * 10) + (temp % 10); + temp /= 10; + } + if (num == rev) + { + printf(&quot;%d is a palindrome number.&quot;, num); + } + else + { + printf(&quot;%d is not a palindrome number.&quot;, num); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P044.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P044.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P044_c', 'P044.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P044_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P044.c"> + <pre><code class="language-c">/* Write a program to input a number and check whether the +number is Pronic number or not. + Pronic Number: The number which is the product of two numbers + which is the product of two consecutive integer. + Ex: 20 = 4 * 5 +*/ +/* Author - Amit Dutta, Date - 27th OCT, 2025 */ + +// using boolean... +/* +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; +#include &lt;stdbool.h&gt; + +int main() +{ + int num, iterationIndex; + bool isPronic = false; + printf(&quot;Enter the number : &quot;); + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nYou have to enter a number, not an character or symbol.&quot;); + return 1; + } + if (num &lt; 1) + { + printf(&quot;\nOnly postive number is allowed.&quot;); + return 1; + } + for (iterationIndex = 1; iterationIndex &lt;= num / 2; iterationIndex++) + { + if (iterationIndex * (iterationIndex + 1) == num) + { + printf(&quot;\nInput %d is a Pronic Number.&quot;, num); + isPronic = true; + break; + } + } + if(!isPronic) + { + printf(&quot;\nInput %d is not a Pronic Number.&quot;, num); + } + return 0; +} +*/ + +// using direct return method (more efficient and generally preferred)... + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + int num, iterationIndex, iterationLimit; + printf(&quot;Enter the number : &quot;); + if (scanf(&quot;%d&quot;, &amp;num) != 1) + { + printf(&quot;\nYou have to enter a number, not an character or symbol.&quot;); + return 1; + } + if (num &lt; 1) + { + printf(&quot;\nOnly postive number is allowed.&quot;); + return 1; + } + iterationLimit = (int)sqrt(num); + for (iterationIndex = 1; iterationIndex &lt;= iterationLimit; iterationIndex++) + { + if (iterationIndex * (iterationIndex + 1) == num) + { + printf(&quot;\nInput %d is a Pronic Number.&quot;, num); + return 0; + } + } + printf(&quot;\nInput %d is not a Pronic Number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P045.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P045.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P045_c', 'P045.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P045_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P045.c"> + <pre><code class="language-c">/* Make this pattern for input n. + Pattern : + 1 + 1 2 + 1 2 3 + 1 2 3 4 + 1 2 3 4 5 +*/ +/* Author - Amit Dutta, Date - 01st NOVEMBER, 2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int i, j, n; + printf(&quot;Enter n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for (i = 1; i &lt;= n; i++) + { + for (j = 1; j &lt;= i; j++) + { + printf(&quot;%d\t&quot;, j); + } + printf(&quot;\n&quot;); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P046.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P046.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P046_c', 'P046.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P046_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P046.c"> + <pre><code class="language-c">/* Make this pattern for input n. + Pattern : + 1 + 2 1 + 3 2 1 + 4 3 2 1 + 5 4 3 2 1 +*/ +/* Author - Amit Dutta, Date - 01st NOVEMBER, 2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int i, j, n; + printf(&quot;Enter n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for (i = 1; i &lt;= n; i++) + { + for (j = i; j &gt;= 1; j--) + { + printf(&quot;%d\t&quot;, j); + } + printf(&quot;\n&quot;); + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P047.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P047.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P047_c', 'P047.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P047_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P047.c"> + <pre><code class="language-c">/* Make this pattern for input n. + Pattern : + 5 + 5 4 + 5 4 3 + 5 4 3 2 + 5 4 3 2 1 +*/ +/* Author - Amit Dutta, Date - 01st NOVEMBER, 2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int i, j, n; + printf(&quot;Enter n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for (i = n; i &gt;= 1; i--) + { + for (j = n; j &gt;= i; j--) + { + printf(&quot;%d\t&quot;, j); + } + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P048.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P048.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P048_c', 'P048.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P048_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P048.c"> + <pre><code class="language-c">/* Make this pattern for input n no of row. + Pattern : + 1 + 2 3 + 4 5 6 + 7 8 9 10 + 11 12 13 14 15 +*/ +/* Author - Amit Dutta, Date - 01st NOVEMBER, 2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int i, j, n, temp = 1; + printf(&quot;Enter row number : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for (i = 1; i &lt;= n; i++) + { + for (j = 1; j &lt;= i; j++) + { + printf(&quot;%d\t&quot;, temp); + temp++; + } + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P049.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P049.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P049_c', 'P049.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P049_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P049.c"> + <pre><code class="language-c">/* Make this pattern for input n no of row. + Pattern : + # + @ @ + # # # + @ @ @ @ + # # # # # + */ +/* Author - Amit Dutta, Date - 01st NOVEMBER, 2025 */ + +#include &lt;stdio.h&gt; + +int main() +{ + int i, j, n; + char a = &#x27;#&#x27;, b = &#x27;@&#x27;; + printf(&quot;Enter row number : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for (i = 1; i &lt;= n; i++) + { + for (j = 1; j &lt;= i; j++) + { + if (i % 2 == 0) + printf(&quot;%c\t&quot;, b); + else + printf(&quot;%c\t&quot;, a); + } + printf(&quot;\n&quot;); + } + return 0; +} +</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P050-SHORT.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P050-SHORT.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P050-SHORT_c', 'P050-SHORT.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P050-SHORT_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P050-SHORT.c"> + <pre><code class="language-c">/* Write a program to input a number and check whether it is Disarium Number or not. + Note : A number is said to Disarium if sum of its digit powered by with their + respective position is equal to the original number. */ +/* Author - Amit Dutta, Date - 08th November, 2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + int num; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + int position = printf(&quot;%d&quot;, num); + int temp = num; + int res = 0; + while (temp &gt; 0) + { + res += (int)pow(temp % 10, position); + position--; + temp /= 10; + } + if (res == num) + printf(&quot; is a Disarium Number.&quot;); + else + printf(&quot; is Not a Disarium Number.&quot;); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P050.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P050.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P050_c', 'P050.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P050_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P050.c"> + <pre><code class="language-c">/* Write a program to input a number and check whether it is Disarium Number or not. + Note : A number is said to Disarium if sum of its digit powered by with their + respective position is equal to the original number. */ +/* Author - Amit Dutta, Date - 08th November, 2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + int num, res = 0, temp, position = 0; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + temp = num; + while (temp &gt; 0) + { + position++; + temp /= 10; + } + temp = num; + while (temp &gt; 0) + { + res += (int)pow(temp % 10, position); + position--; + temp /= 10; + } + if (res == num) + printf(&quot;\nInput %d is a Disarium Number.&quot;, num); + else + printf(&quot;\nInput %d is Not a Disarium Number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P051.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P051.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P051_c', 'P051.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P051_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P051.c"> + <pre><code class="language-c">/* Write a program to input two number and check whether they are Amicable Pair or not + Example : Sum of Proper Divisors of 220 (1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110) = 284 + Sum of Proper Divisors of 284 (1, 2, 4, 71, 142) = 220 */ +/* Author - Amit Dutta, Date - 09th November, 2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int a, b, i, sa = 0, sb = 0; + printf(&quot;Enter two number : &quot;); + scanf(&quot;%d %d&quot;, &amp;a, &amp;b); + for (i = 1; i &lt;= a / 2; i++) + if (a % i == 0) + sa += i; + for (i = 1; i &lt;= b / 2; i++) + if (b % i == 0) + sb += i; + if (sa == b &amp;&amp; sb == a) + printf(&quot;\nInput %d and %d is Amicable Pair.&quot;, a, b); + else + printf(&quot;\nInput %d and %d is Not Amicable Pair.&quot;, a, b); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P052.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P052.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P052_c', 'P052.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P052_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P052.c"> + <pre><code class="language-c">/* Print the sum of this series for upto n element. + Series: 1 + (1 + 2) + (1 + 2 + 3) + (1 + 2 + 3 + 4) + ... + (1 + 2 + 3 + ... + n) */ +/* Author - Amit Dutta, Date - 09th November, 2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int n, sum = 0, temp = 0, i; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + for (i = 1; i &lt;= n; i++) + { + temp += i; + sum += temp; + } + printf(&quot;%d&quot;, sum); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P053.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P053.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P053_c', 'P053.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P053_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P053.c"> + <pre><code class="language-c">/* Print all pattern */ +/* Author - Amit Dutta, Date - 09th November, 2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int i, j, temp; + + printf(&quot;\n\nPattern 1 : \n\n&quot;); + /* + 9 9 9 9 9 + 7 7 7 7 7 + 5 5 5 5 5 + 3 3 3 3 3 + 1 1 1 1 1 + */ + temp = 9; + for (i = 1; i &lt;= 5; i++) + { + for (j = 1; j &lt;= 5; j++) + { + printf(&quot;%d &quot;, temp); + } + printf(&quot;\n&quot;); + temp -= 2; + } + + // Another method print above pattern + printf(&quot;\n\nPattern 1 : \n\n&quot;); + for (i = 9; i &gt;= 1; i -= 2) + { + for (j = 1; j &lt;= 5; j++) + { + printf(&quot;%d &quot;, i); + } + printf(&quot;\n&quot;); + } + + printf(&quot;\n\nPattern 2 : \n\n&quot;); + /* + 1 2 3 4 5 + 1 2 3 4 5 + 1 2 3 4 5 + */ + for (i = 1; i &lt;= 3; i++) + { + for (j = 1; j &lt;= 5; j++) + { + printf(&quot;%d &quot;, j); + } + printf(&quot;\n&quot;); + } + + printf(&quot;\n\nPattern 3 : \n\n&quot;); + /* + 5 4 3 2 1 + 5 4 3 2 1 + */ + for (i = 1; i &lt;= 2; i++) + { + for (j = 5; j &gt;= 1; j--) + { + printf(&quot;%d &quot;, j); + } + printf(&quot;\n&quot;); + } + + printf(&quot;\n\nPattern 4 : \n\n&quot;); + /* + 1 2 3 4 + 5 6 7 8 + 9 10 11 12 + */ + temp = 1; + for (i = 1; i &lt;= 3; i++) + { + for (j = 1; j &lt;= 4; j++) + { + printf(&quot;%d &quot;, temp); + temp++; + } + printf(&quot;\n&quot;); + } + + printf(&quot;\n\nPattern 5 : \n\n&quot;); + /* + 1 2 3 4 + 4 8 12 16 + 1 2 3 4 + 4 8 12 16 + 1 2 3 4 + */ + for (i = 1; i &lt;= 5; i++) + { + for (j = 1; j &lt;= 4; j++) + { + if (i % 2 == 0) + printf(&quot;%d &quot;, j * 4); + else + printf(&quot;%d &quot;, j); + } + printf(&quot;\n&quot;); + } + + printf(&quot;\n\nPattern 6 : \n\n&quot;); + /* + 1 + 2 4 + 3 5 7 + 6 8 10 12 + 9 11 13 15 17 + */ + int odd = 1, even = 2; + for (i = 1; i &lt;= 5; i++) + { + for (j = 1; j &lt;= i; j++) + { + if (i % 2 == 0) + { + printf(&quot;%d &quot;, even); + even += 2; + } + else + { + printf(&quot;%d &quot;, odd); + odd += 2; + } + } + printf(&quot;\n&quot;); + } + + printf(&quot;\n\nPattern 7 : \n\n&quot;); + /* + 1 2 3 4 5 + 6 7 8 9 + 10 11 12 + 13 14 + 15 + */ + temp = 1; + for (i = 5; i &gt;= 1; i--) + { + for (j = 1; j &lt;= i; j++) + { + printf(&quot;%d &quot;, temp); + temp++; + } + printf(&quot;\n&quot;); + } + + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P054.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P054.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P054_c', 'P054.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P054_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P054.c"> + <pre><code class="language-c">/* WAP to check Krishnamurty number using user defined methods/functions. */ +/* Author - Amit Dutta, Date - 15th November, 2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int fact(int); +int isKrishnamurty(int); + +int fact(int n) +{ + int fact = 1, i; + for (i = 1; i &lt;= n; i++) + fact *= i; + return fact; +} + +int isKrishnamurty(int n) +{ + int temp = n, sum = 0; + while (temp &gt; 0) + { + sum += fact(temp % 10); + temp /= 10; + } + return n == sum; +} + +int main() +{ + int n; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;n); + if (isKrishnamurty(n)) + printf(&quot;\nInput %d is a Krishnamurty Number.&quot;, n); + else + printf(&quot;\nInput %d is not a Krishnamurty number.&quot;, n); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P055.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P055.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P055_c', 'P055.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P055_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P055.c"> + <pre><code class="language-c">/* WAP to print n terms of Fibbonacci Series (Starting from term 0) */ +/* Author - Amit Dutta, Date - 15th November, 2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +void printFibonacci(int); + +void printFibonacci(int n) +{ + int val1 = 0, val2 = 1, val3, i; + printf(&quot;\nFibonacci series upto %d terms :&quot;, n); + if (n &lt; 0) + printf(&quot; N/A&quot;); + if (n == 0) + printf(&quot; %d&quot;, val1); + if (n &gt; 0) + printf(&quot; %d %d&quot;, val1, val2); + for (i = 2; i &lt;= n; i++) + { + val3 = val1 + val2; + printf(&quot; %d&quot;, val3); + val1 = val2; + val2 = val3; + } +} + +int main() +{ + int n; + printf(&quot;Enter the n : &quot;); + scanf(&quot;%d&quot;, &amp;n); + printFibonacci(n); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P056.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P056.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P056_c', 'P056.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P056_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P056.c"> + <pre><code class="language-c">/* WAP to swap the value of a and b using user defined method. */ +/* Author - Amit Dutta, Date - 22th November, 2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +void swap(int *a, int *b) +{ + int temp = *a; + *a = *b; + *b = temp; +} + +int main() +{ + int a, b; + printf(&quot;Enter A and B: &quot;); + scanf(&quot;%d %d&quot;, &amp;a, &amp;b); + printf(&quot;\nBefore swap A: %d, B: %d&quot;, a, b); + swap(&amp;a, &amp;b); + printf(&quot;\nAfter swap A: %d, B: %d&quot;, a, b); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P057.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P057.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P057_c', 'P057.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P057_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P057.c"> + <pre><code class="language-c">/* WAP to display the series using user defined method. + 0, 7, 26, 63, ... upto n terms using void series(int n) +*/ +/* Author - Amit Dutta, Date - 22th November, 2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +void series(int n) +{ + int i; + printf(&quot;\nSeries: &quot;); + for (i = 1; i &lt;= n; i++) + printf(&quot;%d &quot;, (i * i * i) - 1); +} + +int main() +{ + int n; + printf(&quot;Enter n: &quot;); + scanf(&quot;%d&quot;, &amp;n); + series(n); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">P058.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P058.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-P058_c', 'P058.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-P058_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/P058.c"> + <pre><code class="language-c">/* WAP to display ASCII code of Alphabets (A - Z) using void displayASCII() */ +/* Author - Amit Dutta, Date - 22th November, 2025 */ + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +void displayASCII() +{ + int i; + printf(&quot;ASCII Code\t\tCharacter&quot;); + for (i = &#x27;A&#x27;; i &lt;= &#x27;Z&#x27;; i++) + printf(&quot;\n%c\t\t%d&quot;, i, i); +} + +int main() +{ + displayASCII(); + return 0; +}</code></pre> + </div> + </li> + </ul> + </div> + </li> + </ul> + </div> + </div> + <!-- END INITIAL FILE LIST --> + </div> + <footer class="text-center py-4 bg-gray-50 border-t"> + <p class="text-sm text-gray-500"> + This page is an index for the + <a + href="https://github.com/notamitgamer/bsc" + class="text-blue-600 hover:underline" + >bsc repository</a + >. + </p> + </footer> + </div> + </div> + + <!-- Code Viewer Modal (Enhanced Design) --> + <div + id="code-modal" + class="fixed inset-0 bg-gray-900 bg-opacity-95 flex items-center justify-center p-2 md:p-4 hidden z-50" + > + <div + class="bg-gray-800 text-gray-100 rounded-lg shadow-2xl w-full max-w-5xl modal-content-area flex flex-col" + > + <!-- Modal Header --> + <div + class="flex items-center justify-between p-3 md:p-4 border-b border-gray-700 bg-gray-900 rounded-t-lg flex-shrink-0" + > + <h3 + id="modal-filename" + class="text-sm md:text-lg font-mono text-gray-300 truncate" + ></h3> + <div class="flex items-center space-x-2 md:space-x-3"> + <!-- Share Button --> + <button + id="share-btn" + class="bg-gray-700 text-gray-200 p-2 rounded-md hover:bg-gray-600 relative transition-colors" + title="Share file link (Copies GitHub URL if sharing is unavailable)" + > + <svg + class="w-4 h-4 md:w-5 md:h-5" + fill="none" + stroke="currentColor" + viewBox="0 0 24 24" + xmlns="http://www.w3.org/2000/svg" + id="share-icon-default" + > + <path + stroke-linecap="round" + stroke-linejoin="round" + stroke-width="2" + d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8m-4-6l-4-4-4 4m4-4v13" + ></path> + </svg> + <svg + class="w-4 h-4 md:w-5 md:h-5 absolute inset-0 m-auto hidden text-green-400" + id="share-icon-success" + fill="none" + stroke="currentColor" + viewBox="0 0 24 24" + xmlns="http://www.w3.org/2000/svg" + > + <path + stroke-linecap="round" + stroke-linejoin="round" + stroke-width="2" + d="M5 13l4 4L19 7" + ></path> + </svg> + </button> + <!-- Copy Button --> + <button + id="copy-code-btn" + class="bg-gray-700 text-gray-200 p-2 rounded-md hover:bg-gray-600 relative transition-colors" + title="Copy code to clipboard" + > + <svg + xmlns="http://www.w3.org/2000/svg" + width="16" + height="16" + fill="currentColor" + class="bi bi-copy w-4 h-4 md:w-5 md:h-5" + viewBox="0 0 16 16" + id="copy-icon-default" + > + <path + fill-rule="evenodd" + d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z" + /> + </svg> + <svg + class="w-4 h-4 md:w-5 md:h-5 absolute inset-0 m-auto hidden text-green-400" + id="copy-icon-success" + fill="none" + stroke="currentColor" + viewBox="0 0 24 24" + xmlns="http://www.w3.org/2000/svg" + > + <path + stroke-linecap="round" + stroke-linejoin="round" + stroke-width="2" + d="M5 13l4 4L19 7" + ></path> + </svg> + </button> + <!-- Close Button --> + <button + onclick="hideCode()" + class="text-gray-400 hover:text-white text-2xl md:text-3xl leading-none" + > + &times; + </button> + </div> + </div> + <!-- Modal Body: Code Content --> + <div id="modal-body" class="overflow-y-auto flex-grow"> + <div id="modal-code-container" class="rounded-b-lg"> + <!-- Code will be injected here --> + </div> + </div> + </div> + </div> + + <script> + function toggleFolder(folderName) { + const content = document.getElementById(`folder-${folderName}`); + const chevron = document.getElementById(`chevron-${folderName}`); + + if (content.classList.contains("hidden")) { + content.classList.remove("hidden"); + chevron.classList.add("rotated"); + } else { + content.classList.add("hidden"); + chevron.classList.remove("rotated"); + } + } + + const modal = document.getElementById("code-modal"); + const modalFilename = document.getElementById("modal-filename"); + const modalCodeContainer = document.getElementById( + "modal-code-container" + ); + + const copyBtn = document.getElementById("copy-code-btn"); + const copyIconDefault = document.getElementById("copy-icon-default"); + const copyIconSuccess = document.getElementById("copy-icon-success"); + + const shareBtn = document.getElementById("share-btn"); + const shareIconDefault = document.getElementById("share-icon-default"); + const shareIconSuccess = document.getElementById("share-icon-success"); + + let currentFileUrl = ""; + + // --- SEARCH IMPLEMENTATION --- + + // Global state for the search index + let fileSearchIndex = []; + let activeSearchTerm = ""; + let indexBuilt = false; // Flag for lazy indexing + + /** + * Builds the search index from all hidden code blocks on the page. + * This should be called only once. + */ + function buildSearchIndex() { + if (indexBuilt) return; + console.log("Building search index..."); + const codeBlocks = document.querySelectorAll('[id^="code-"]'); + codeBlocks.forEach((block) => { + const id = block.id; + let filename = id.split("-").slice(2).join("-").replace(/_/g, "."); + // Handle path structure + if ( + block.dataset.githubUrl && + block.dataset.githubUrl.includes("/main/") + ) { + filename = block.dataset.githubUrl + .split("/") + .pop() + .replace(/%20/g, " "); // Decode URL for filename + } else if (filename.includes(".")) { + filename = filename.split("/").pop(); + } + + const preElement = block.querySelector("pre"); + const codeElement = block.querySelector("code"); + + if (preElement && codeElement) { + fileSearchIndex.push({ + id: id, + // Use the path after /main/ + path: block.dataset.githubUrl.split("/main/")[1] || filename, + name: filename, + content: codeElement.textContent, + lines: codeElement.textContent.split("\n"), + language: codeElement.className.split("-").pop(), + }); + } + }); + indexBuilt = true; + console.log(`Search index built with ${fileSearchIndex.length} files.`); + // Re-run search if user was already typing + if (activeSearchTerm.length >= 2) { + handleSearch(); + } + } + + /** + * Clears the search input and restores the initial file list. + */ + function clearSearch() { + document.getElementById("search-input").value = ""; + activeSearchTerm = ""; + document.getElementById("clear-search-btn").classList.add("hidden"); + document.getElementById("initial-file-list").classList.remove("hidden"); + document + .getElementById("search-results-container") + .classList.add("hidden"); + + // Reset placeholders + document.getElementById("result-file-list").innerHTML = + '<p id="search-placeholder" class="text-sm text-gray-500">Start typing to see file matches...</p>'; + document.getElementById("result-code-matches").innerHTML = + '<p id="code-match-placeholder" class="text-sm text-gray-500">Select a file from the left to view matching code lines, or refine your search.</p>'; + document.getElementById("result-count").textContent = "0"; + } + + /** + * Handles the search input event, managing visibility and filtering. + */ + function handleSearch() { + const inputElement = document.getElementById("search-input"); + const query = inputElement.value.trim(); + activeSearchTerm = query; + const initialList = document.getElementById("initial-file-list"); + const resultsContainer = document.getElementById( + "search-results-container" + ); + const codeMatchesContainer = document.getElementById( + "result-code-matches" + ); + const clearBtn = document.getElementById("clear-search-btn"); + + // Toggle clear button visibility + if (query.length > 0) { + clearBtn.classList.remove("hidden"); + // Trigger lazy index build on first meaningful interaction + buildSearchIndex(); + } else { + clearBtn.classList.add("hidden"); + } + + // Clear code matches and placeholder when a new search starts + codeMatchesContainer.innerHTML = + '<p id="code-match-placeholder" class="text-sm text-gray-500">Select a file from the left to view matching code lines, or refine your search.</p>'; + + if (query.length < 2 || !indexBuilt) { + initialList.classList.remove("hidden"); + resultsContainer.classList.add("hidden"); + document.getElementById("result-file-list").innerHTML = + '<p id="search-placeholder" class="text-sm text-gray-500">Start typing to see file matches...</p>'; + document.getElementById("result-count").textContent = "0"; + return; + } + + initialList.classList.add("hidden"); + resultsContainer.classList.remove("hidden"); + + const lowerQuery = query.toLowerCase(); + + const results = fileSearchIndex.filter( + (file) => + file.name.toLowerCase().includes(lowerQuery) || + file.path.toLowerCase().includes(lowerQuery) || + file.content.toLowerCase().includes(lowerQuery) + ); + + displayFileResults(results); + } + + /** + * Displays the list of files that match the search query (WhatsApp contact list analogy). + */ + function displayFileResults(results) { + const fileListContainer = document.getElementById("result-file-list"); + const resultCount = document.getElementById("result-count"); + + resultCount.textContent = results.length; + fileListContainer.innerHTML = ""; + + if (results.length === 0) { + fileListContainer.innerHTML = + '<p class="text-sm text-gray-500">No files matched your search term in name or content.</p>'; + return; + } + + const lowerQuery = activeSearchTerm.toLowerCase(); + // Safe regex for highlighting matches + const regex = new RegExp( + `(${activeSearchTerm.replace( + /([.*+?^=!:${}()|\[\]\/\\])/g, + "\\$1" + )})`, + "gi" + ); + + results.forEach((file) => { + // Decode file name/path for display before highlighting + const decodedPath = decodeURIComponent(file.path); + const decodedName = decodeURIComponent(file.name); + + const displayName = decodedName.replace( + regex, + '<span class="bg-yellow-200 font-semibold rounded-sm">$1</span>' + ); + const displayPath = decodedPath.replace( + regex, + '<span class="bg-yellow-200 font-semibold rounded-sm">$1</span>' + ); + + const listItem = document.createElement("div"); + // Add 'active' class capability + listItem.className = + "search-file-item p-3 rounded-lg shadow-sm cursor-pointer hover:bg-blue-100 transition-colors duration-150 border border-gray-200"; + listItem.setAttribute("data-file-id", file.id); + listItem.innerHTML = `<p class="font-mono text-xs text-blue-600">${displayPath}</p><p class="text-sm font-medium text-gray-800">${displayName}</p>`; + + listItem.onclick = () => { + // Remove 'active' state from all others, add to current + document + .querySelectorAll(".search-file-item") + .forEach((el) => el.classList.remove("active")); + listItem.classList.add("active"); + displayCodeMatches(file); + }; + + fileListContainer.appendChild(listItem); + }); + } + + /** + * Displays the actual code lines that contain the search term for a selected file. + */ + function displayCodeMatches(file) { + const codeMatchesContainer = document.getElementById( + "result-code-matches" + ); + codeMatchesContainer.innerHTML = ""; + const query = activeSearchTerm.toLowerCase(); + const regex = new RegExp( + `(${activeSearchTerm.replace( + /([.*+?^=!:${}()|\[\]\/\\])/g, + "\\$1" + )})`, + "gi" + ); + + // Title/Header for the Code Matches container + const header = document.createElement("div"); + header.className = + "sticky top-0 bg-white p-2 border-b mb-4 -mt-4 -mx-4 z-10 rounded-t-xl"; + + const resultsList = document.createElement("div"); + resultsList.className = "space-y-4 pt-2"; + + let matchCount = 0; + + file.lines.forEach((line, index) => { + if (line.toLowerCase().includes(query)) { + matchCount++; + + const highlightedLine = line.replace( + regex, + '<span class="bg-yellow-300 rounded-sm font-semibold">$1</span>' + ); + + const matchItem = document.createElement("div"); + matchItem.className = "code-match-line"; + matchItem.innerHTML = ` + <div class="text-blue-500 mb-1">Line ${index + 1}:</div> + <div class="text-gray-700">${highlightedLine}</div> + `; + resultsList.appendChild(matchItem); + } + }); + + // Update header with file info and match count + header.innerHTML = ` + <h3 class="text-base font-semibold text-gray-800">${decodeURIComponent( + file.name + )}</h3> + <p class="text-xs text-gray-500">${decodeURIComponent( + file.path + )} &mdash; <span class="text-green-600 font-semibold">${matchCount} matches</span></p> + `; + codeMatchesContainer.appendChild(header); + + if (matchCount > 0) { + codeMatchesContainer.appendChild(resultsList); + } else { + // Show message if search term matches filename/path but not content (rare, but possible) + codeMatchesContainer.innerHTML += + '<p class="text-sm text-gray-500 mt-4">No specific content matches found for this file, but the name/path matched the keyword.</p>'; + } + + // *** View Full Code Button *** + const viewFullCodeButton = document.createElement("button"); + viewFullCodeButton.className = + "mt-6 w-full bg-blue-600 text-white font-semibold py-3 rounded-lg hover:bg-blue-700 transition-colors shadow-lg"; + viewFullCodeButton.textContent = `View Full Code for ${decodeURIComponent( + file.name + )}`; + viewFullCodeButton.onclick = () => { + showCode(file.id, decodeURIComponent(file.name)); // Reuses the existing showCode modal logic + }; + codeMatchesContainer.appendChild(viewFullCodeButton); + } + + // --- END SEARCH IMPLEMENTATION --- + + /** + * Shows a successful copy animation on a button. + */ + function animateSuccess(button, defaultIcon, successIcon) { + defaultIcon.classList.add("hidden"); + successIcon.classList.remove("hidden"); + + button.classList.add("btn-success-pulse"); + button.classList.remove("bg-gray-700", "hover:bg-gray-600"); + + setTimeout(() => { + successIcon.classList.add("hidden"); + defaultIcon.classList.remove("hidden"); + button.classList.remove("btn-success-pulse"); + button.classList.add("bg-gray-700", "hover:bg-gray-600"); + }, 2000); + } + + function showCode(codeBlockId, filename) { + const codeBlock = document.getElementById(codeBlockId); + if (codeBlock) { + modalFilename.textContent = filename; + + // Clone the content to avoid issues with highlight.js re-running + const codeContentClone = codeBlock + .querySelector("pre") + .cloneNode(true); + modalCodeContainer.innerHTML = ""; // Clear previous content + modalCodeContainer.appendChild(codeContentClone); + + currentFileUrl = codeBlock.dataset.githubUrl || ""; + + // The highlight.js class is already on the code element in the clone + hljs.highlightElement(modalCodeContainer.querySelector("code")); + + modal.classList.remove("hidden"); + document.body.style.overflow = "hidden"; + + // Focus the modal content for better accessibility (optional) + modalCodeContainer.querySelector("pre").focus(); + } + } + + function hideCode() { + modal.classList.add("hidden"); + document.body.style.overflow = "auto"; + } + + copyBtn.addEventListener("click", () => { + const codeToCopy = modalCodeContainer.querySelector("code").innerText; + navigator.clipboard.writeText(codeToCopy).then( + () => { + animateSuccess(copyBtn, copyIconDefault, copyIconSuccess); + }, + (err) => { + console.error("Failed to copy text: ", err); + } + ); + }); + + shareBtn.addEventListener("click", async () => { + if (!currentFileUrl) return; + + const shareData = { + title: modalFilename.textContent, + text: `Check out the code for ${modalFilename.textContent}`, + url: currentFileUrl, + }; + + if (navigator.share) { + try { + await navigator.share(shareData); + } catch (err) { + if (err.name !== "AbortError") { + console.error("Share failed:", err.message); + } + } + } else { + navigator.clipboard.writeText(currentFileUrl).then(() => { + animateSuccess(shareBtn, shareIconDefault, shareIconSuccess); + }); + } + }); + + document.addEventListener("keydown", (e) => { + const searchInput = document.getElementById("search-input"); + + // 1. ESCAPE key closes modal + if (e.key === "Escape" && !modal.classList.contains("hidden")) { + hideCode(); + return; + } + + // 2. '/' key focuses search bar + // Check if the key is '/', the modal is not open, and the current focus is not an input field + if ( + e.key === "/" && + modal.classList.contains("hidden") && + !/^(INPUT|TEXTAREA|SELECT)$/i.test(document.activeElement.tagName) + ) { + // Prevent the '/' character from being typed outside the input field + e.preventDefault(); + searchInput.focus(); + } + }); + + // Initial action: Lazy index building + // We don't call buildSearchIndex on load anymore. + // It's called on the first time the user types. + // This prioritizes page load speed. + </script> + </body> +</html>
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror