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:
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"ș%O4+˘/`o&H/"O<1]nG ̦_ߜILTö[F"uυe{g s8Yt-*뢸%ӥ`Wk%S4,JV#(Èc})N)2'W}NϘ֯A:oiz<{ܴk|[1|aʿږbR9yGzR[LЄTu M<-iqEG`?m0Uri_i)]}u)Y<?ˌ<g%l[dKZܧ;"(AEP(
-}3-~k@^kB"C\u=/]YMt>taa-83)cǧU= 2pgR}p;bnwoYY{~4V?2^u۵U<d:תU<tVv9H-hK+wVa}QO=|.T!)z0Z5tCl;.tUA0Mx.
-CӑTCkAVwȹ`?:FW0K;,1{3s;^2-ֺ)<KnfPsna^f{WkC俤kc@3ߔf9ȾV'(k;w7L:R9}Ƣ-r!oī)_O-@
-JU {XL&1@v7a-W=dh*}[3 6Z6l=o2?A*AEa/p$>
-z#տ@}߷}w <V!;P}c5#:PH}A0z*;iJ8?6>vVQT~@
-˥
-JD>DTI/5<@U^ix}"
-`n|a/kv|a57 ƄIh3 g+YT,'zgc$[ynJ;kabLL0q섥7`U*P:YVR]H@Ea}nd@YsA\]w<dyr/{>kó1Hvrv+Sq}GܱcCA uLli:g:{mVMDz=o鲿,?٢ic8*_ȹĮϭa@MQo#m&RնmKvYĤokӻ#:yپF`o?=f>'&nέ=UV^=-|YK[sL3|1RTRQ iv9YEpf|"+4*"eRo5DD2J^dxqPEW7L4Kҩ8?Sܲd5[V wW\d\LY1t"c"3+|m5YUQj_d( yՃ813yG\ހkE
-n6+iu꺡
-D4@/4~#2tC'K
-+~΄*CZ*fU/YaKkֲ"[@FYMiY\dyN]5q"'쉸hDJ<R1(ň/c*ZkhPYxQb,4HBQOo~,B`/p &M&%7i9 F'q.hYNSV6ˊ$c17c6wg)*ʜq|]W@Ae=-u>qT{'Iz:@rk33,<G-s٢BEVf4̒q6E!m`#fuE5ełp3{&AuU
-}]02+5c%k"a}7~Yx5A4b_m_q*ڝѴ uFR[㺦nHlMן3ޔ_=?\+yXM9亷<06An
-u?V]o#t]UQ7]?HlqtVu?5l"~x!NO)6rIúhtS+3z'Al8EQښ#K#WxqB҉e}8UpwpApk|-zý括yd\r59Mnߕ8:߱<o(fMkflѝ=ytJ:`c4,*ʒ9p w8ۖ_.dML3Na؝){
-SC)|V^t³zdika1ۛ?
--ůf˴-$*UURHF`IN?hapaM>jp0M'
-t}N
-GT3!pbD}Cˁ]ºBܫclϬ5W5Jph&L=2f8s4<ydpSi:^$%7]m9w_x;99nm ;I3P'إ=u=2]R^Q^drcn8E*oK~+|P>-,
-5ו>t6z:,[G;wgxdZ
-45Rx\xQL)kg#͗ͥ\on yWsg<JN2'cz9:q4˰n|)= Q|ȣ&DD_`bA4pNIB|˅rRbq;95cɓ$B1Cw,·<"C<(x<>nUCz]!nke);g:ϽDuix4쬟!HQbE
-Rr3 #'+;;Tхt U^_T_}o{\B' eHPEhڞ'eGʎX߸gaz+&cK%9\_3[D
-WNI fT]H,Kr$eSZE0vAϢ7 w0 ҫU-+rxZӌg?}cb`Eʐ^G5W_nNEmy֑Y-|1}(}"Yr,x>F -[z
-gINn3hг7Ɠ[-یQ7na6ݲʗդ(a`3 ]6M;_yF4
-aFަEpf|"+4*"eRoF1{<y,$EVwUtE| HT(Y(^3Gpdk~Ov28~wE8EuΤnз|AZ^@QmK|ڜAd.E|k+$ʨUs"KFIP̣<=>OX\#E/jpwYIs*
-ZHMO]' Y
-Me D,k0
-+~τ*õZ"%cn5kE- {gˬZ|[.<KrͰ|aCPDmw>~6J12UJHkhPYxQtCB7 aV"
-Kjs1
-&69on$8-*%<rYV$AQ$cq0i,R?7~u
-TX@54fԣWgHm\;8(9<
- M.L3;+ݛjR5A
-B'
-u2~CO'Aοymf% v"[dHlVY2f(-!lBZEڿ ֲb!Z=Ϊ@T>.| ˚ѱ5j%7jkEYJ#(k hp[ھ³T;iAEvցuMM~dDٚ0?sEf){w~̹W#Vsȕo=ynalܶ pf Su7'U\|y"(yZT
-S1;biHˤGn|!G|:%*=}d"]'I0tM3 K%1[`ۧXbDvˡ^wCoK풘`$]A$]=%C$\tIK&:cW=l
-Fߘغ7FH
-LKݛܵ7EǪr3d6d=Q{/&2 8/WչEplvPY uLB<n@29jj3?j?¶ܓQ;j)OcwjC@-:O$QKtLt?xiŸs8}aM@*n|,2A^2D7F!L̊5_3WbN,76m~][GĪ5_D~S2p,i:2].&Di8|AXKӊgO<-hZX6}^1õǭ(I39DⴿGJ]YMt(h{'Ly:-G
-.QiJ:lY?^>vN#Tx^4Xڹ[ i=怯cy0[[Ǟj9Q*2S4d{>Bg7`8z)䙞TCkAVwy`?:F^ZLW=EsVZ
-`t8RiX^$!=BǺ
-1.`4};O.]۰zԀ\v驊>J'`].s縯;)_MuފS*Cu~-gw'
-łX=w(c[rࢰ8fLA`={7
-CQjZhhwvð
-wBa0z:;iJH?>vHq\64l~RS/am/sc{Qn O9Kw̓ %0N|GQuhu!Um˷_Cѳ8č(;\3OR8Aq)cX-v[x.4qN>tKݲʗd![3M:w^!؞hԩJCi\Y2DiLș)R*fZ3
-pb$4tSsx4;#.]tN|¤0
-¯i41X4ۀ*^J1N@8D1H1M1ß.P$W÷WAB`/pbZΛ,\reLIp6ZTU>pA<rYV$Ad1ژߐ>9-y͚qQd42)-F,:R\.=A=Q-iKFfj
-j&k$^-DEӸk`MѴZ<06An
-uWalt'*
-[僇v6KN<1خv˅f)xsHntY~qN5Pgh7)M
-y<?R
->x1h:^0h4,*VVY29^*:ߚlf1V`g)-"+37Ed ?%ֈM{{X?
-$-r9~hac0l_)
-4Ga0TCt$/c)T
-r =nϤcyvfQR;oj!)<NP=1%h坽8[,xFxJ,Reg#.bȂг??r<Gt9C?tӥHu1+EgxΗQIE*5jF}QзK
- 54J%gwk9JgtvRM!M4]m8:qI:Ӆ`g6mJew8&A3 5(,5jFMiC4K#GF?bPz݈UW##G
--?A
-) 2Aヂz`ҫ26]4]t=TJx\uϵMtIE)M4]mJ?tav钦4]lKlqkcXTR;Kc
-)<r}X6=OSI&9Q.f %]MU\fTK";./VW@&?&Oo!~[x FlS(t
-B-y4#)mгy'#eFz^qeA3zM{tLxD4GE<*IʌqIe8mRlo᪺AA)3[k6<_7m)@h\0+eSXWAÑ5A
-
-r59ptfCd=!y?+C4($w):ej!"Kn<G!.Lkzܺ.{#Z-tr[X>]
-~i>!!շF<p("CHFC4}L.84K,֤'{Ejw(,,B1dOx4=aړŤ"z8.%7R>Ϙ4Ҝ@X#fY#feӛ2 8ݼmNZϒ ]-%^lAw~lӯ[%3\ 7y&ϊOnX=-kK
-YQY}VXU
-c."
-l<Q"+Ż*hH^EN,/YrAbk~O93#qvq YBaelSm/Ө>id.E|k۷<+*V,9YLҺ:{lV2?5
-:-ώS,-Kq5Z 656uEekҼ5i5y0&^hZ-j˿<06An
-uVnڕo{Ji=A--3ye\'@,1cAd!is
-_)<U;i3hJIF3uuQꅲK@3L1'lJ($Y.$m$41aEǼ.8uJtquӘ_B\-R[NI\xHQ_>:0J%L:?Wԉ=SYfU]Zmg8Un^Gļq${KY91;V}$C3voW1;2.Y6Prec8>:4{\ocCUnC\V9hcMFZc/8)D>X znr蛌9|Tśm]98ܾ--ۖ(w^hw] X84Tˆ|a p<ԅ]C5|u[6IYܻ"$Vt?L ?%$"̟}*>B`~-̼o!#>""X8gcXgX~--
--IHDR-"K[DʇdB)͛jiKzV^tO^QRCkfȌEy0Gf3 Zg}>3g>gK.kjj mܹrTTT
-fflrt?8Mg;۴'V g\J?9T*X*9gORn6ơXJJWWWcǎҥ:t-Z
-? 'қ7o^Gaa!nܸ;wm=2t=zٳ'w["pႹ]ӧ[n=u놐<-1DDDԀBTTT05ō7~MUUU{XODDD
-{.f^zXߠ{#((ݺuCn?СCvBDŋC矛:j5^yL>nnnpuuEv0Gq}b۶mHIIC!h"--&Ob6Y:*lCrrU2)>Ѕ
-4\[L3Ҷbƌ[cǎ?bʔ)سg
-?0`-e2Luaʔ)b1Lu։DxNT<glN"iV+u
-
-0ydh4h434Cqq1rssFN^-g]Q}}زe4
-
-
-L<qLeЇ>#<<%ѐ|VVSxb[`""")SXK,5Tג$*idv%jUUUVICfsjooo(,,Daa!.]$'iӦ!!!Xn<<<oooTVVbϞ=ׯ$"##ѵkW"11W\CPRR"37]u
-
-/
-D݊+p-V|7ذa<m۶!..-+qMDEETJQQQyN8p΅QvdddOkq.D%R2]pXfIM555\@R94+-))ԩS1`-̙aСV1-???7N.w`~--(fjvqqJҌTo;qu:uJKKKѣb
-ׯ_^GϞ=1cիVwjgm:/[!b}?w%ņ ;;oÅgf͚50sLDFF7ĴiP\\,I_PP4СC6/,ijjUb1#T)j1foR2>}:兤$e؝;w˖cǎѣq16%%%2={oFҥKѧO1aׯOB/ĝ;wİ:ƌ>}iii@bb"Ǝ///DFF68Ȑcׇ5kʕ+Xby;w֭[h0aO.ڬ:IT燄Ր.#_jqX.>Μ9#$-*Jg ,,ذaXEdz
-ڵ[T]{"js:-MZ&Er1i$1J#Urzik
-I-oZDkCӉUCeoo:)ÇXvJD0YQubQ3:_DJl[XvV'`($Nw/;~R%"rϑF,3a[vi--
-mg"눾N}C:GhX8|д١O_xzvOˏM(++QAVqDD2~byh4{0r]Mx1i=q) NJhQAP-œO /<?G7E8y*GC7ww,7Ŷ;ip6ѭ;ތN:aDDMv)fXޠ]S6[ߘ7gE%=*W-Z"=hHMށٳ;ӧDzo/A\<Xk0(=;4?B'-7\35ii7+fO_ZO:%
-
-h4Y-nظ-+VaDD{FnnnbQÇݕl=):LIx}EMbkܒrgw"F
-ٳyu5FRAR2gЧOo-_GɸRJe0 \.]@ӢȈ
-?gLm۾@*_Ӥ|LHIwpOM(%u/-HUk5ĈDDD-H7-r.àI#%""09KDD ^lDDD-0
-&S&R""4HyC"""19LDDD`"%""r-{BKʌ'
-b]d?Ӭ˖Jƥ8уD
--KѦu-+Va
-:w`XzeoLRצ~~y+>ڼ$йs'sbUٴa-2l/6UAU&%bi&WV^.+9bY| jLD5K"mbĢf/GQJ
-0m1sgwo?~
->3Žg$쁷w/ؿYvbT8iaX2
-wW.5*0MbUއMakqуb\tLO-={z}h4.-_};vER3|/
-D-OX(Wi\FXCΝpA./++ǫ""~Z,ul`dwݿXN4w@|gZ||"f,lJ|m:]c(x}iu$JƮD-kw*JPH Ւac3J:".vظgNΝ;S۴,)zoXlc<^ADDm_3R"""jJ%vgljaVTN9ѣivPTT$Qhvqqh뉈& j`0D!"""JJJp)oF;l@
-Z_{b<{⧟~BRUUUFyy9~CբGxvwō7`4qItnnnpuu+T;v0WUUAJ/
-555&UVfY,IiuvU;esPOqh+mmF,Gm*6Xq#ViZ(mSiQOjZ\]]Ѯ];oڵ+\\\+dGH--
--IHDR-;ܠV%_~TUU+WĉHMMEII""^.]z
-=BII N8۷3ա۷olj'PRR*?b<Y|ܽ{7oBs$JDDPII ~gܼy겲21DDDTKW^뉈W^H|֭[o!ѦWٳ'OC.]FII 믿b"z@-X-b,88iiibqUWWC-ѵkWٳ')JÇرcOZ]ƎÇ5UVaVipp0/^UVUvQWWWev-U8;;=T*)Z=攚ZTJqqq3-7Uԩk%bZ5V```(Fĕ+WVzøRnCKsuK/U-^GTTEYBBt:4
-&Mb&\:"ABBE2y.ЩBꈚts{51c`عs'
-
-
-5k ''?\~bT7dDWɓbL<WZxzT"=ʃR7//&MFFAhh<"KIIA~hЯ_?#''h4t-O?kΝ;jƍhԴgҤI>A>>> &$bj.\(jy!,,"N<aaa7oE,=x<<<"Y}uILJ& /vSըH:j2j%W[xzz^@AA
-
-
-p9yL6
-(//իxxzz;wD~M"<<;wFAAp%17n@aa!FUzΝHȗ-FkT\\,MZܗT<hUb
-qU]v
-r2hDD]&$==wuajnDJŋP[,wɄj6PTvJoܸSbtnܸ-qqqHLLDTTl777s߃hiKFkf~N4&&9SLL7|EQo51cXMT~djjyi>"n4!!K,Add$~ׯ#((z111عs'\]]+WZl-ejׯ#.."%g[<3T6-җ-nܸ!OÚ۹s'~'h4,^zC'}F~7oa5
-zRRR8=wd.Ǩ
-+WĥKl2s΅mۆM6A`ܸqp})<<V 66V,n1刨֭[g2BTQQ'OVIӷJnRh%
-
-'֮]+V'Xܬ:w,OQ=G*%D%O72.osIQ3ݙ'aDDD<^ZZB$0@oFDDTK<Eaa!qY7N!r8~5"R1Q)Q#qDJDDd'bd2{b1@z\eK[_Gj2>w4hy,G=hݜ<\WWWDGGDdECLD(ǘ>GB7774/ƣ>jQGD3,D_L%uDDDԀuAa)PRvoo=,{~}B,#"""S<+|D b)PYY u۶mr"""RM6%"")Q#L&j҆DFGbqVV҇eMbx2~&?Qj-=T/b˗_a>Q"j-^^ŰzI(zUj-=T={[M͉tZK01Io!~EXEDtߙL&V^mjSr[EFGii)B[6_&i߰ w$̷_'|-Gf/>2tZT*E9"C=p-πZg!;$:thCF߾}{SCE~r,efСѣؼet:E?OPL&^w$Y,+5wfϊKa@]-S0Vнܺ`w$
K8sl8,2ꑜӹg`4AR̙s>٢(ٯڬ2}$Ξ.\DB?iQXhĝ;epu}gLm
-@u(iqy /
-c߯4bĤ]8$ -wdy;ax;腽KofP8u*-aS0|,BB'PTt
-pp?Q^/$t,\)ˀa-B/N@H/CB'X~v}(#-<={?[mi3jm%KI?=MK?pχ75w*|V `Ĉ@ktg>N-دg֮IiS(--Ю];E7_nQoB/Ϟ8r$+?3}#!q'<={`WzGJlߑ;pCa{K,4t_NW>7X$Vb=Fώ/Y%RgFe"EEnz -:)gJC8r4%HJڅ
-|}2nܼN:"Xpu}ׯx5~8GrJܿ*
-gΜu:-~tرܵv?[oM&2j>NDD}GDDDT)*J,#"""lG
-DD QT*MDD(--7"uqqAaaXODDD(,,F FQ'""zAVCݦMܸqC!"""+nܸLiވT`~3$"""ѦM8;;CVѮ];c]~ODDD-ڶmJ_~iDUUܹ?~~~j֭:u$nq-\zFǎC۶mѮ];8;;[*++!%ӊ
-矨@ee%Ed-
-J`C_6Tgֲ֠5<)ڨtJltJ`C84Nv
-nSiQ6j8;;mڴggg\--
--IHDR-cTQJ)V,kxA QJ(u#}:*J
-XEh
-pBbEy>k9'dsr--<xK.al8ÔeC[˗/cl@AA^nݺ%x={lkcL]Yr)x1[駟p)AY>}uu-h}/Kg[}*//g2eYD"a/>EޏclFC1~
-*
-111̙3--jjjB!q͖
-B!D<JՒH'.BǏC2j(mmm-[oK/_4vBwnqE:tC!ϗHR)}]DEEG֭0BÇh4غu+vɆBCχ\._wyz5B$+++X[[8|ǎBm<y2F{ Axx8[EyI<-$*B]RoEBPń(gq)ٞżnss3bBH3iȑ?~<^y1rHvnڵHHH0LCBBkײUf677ef~[*f֭]"5DB<");;VK\]jCF֭-
-
-һNAAAl"-//g7=
-ظq#y)((@ll,##d2e
--#B$S..X-fj)v߈N>lqs1|ӧOcԩصkQ\\߂
-___9r7nĚ5k:dgL
-
-(2֭[SŘ:u*֭[)Dk4x`H<x{ۛ{nee%LYVV
-LAOFXXd2\]]QPP- ''>>>#"##q-Z˭l[v8Y/8qbK!!!^ŋYͶ`DDDԩSb͍-{$yR>?-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ʤIJnBlظؐӨk#7|~zcɒ%qwSLAVVPWW/ןccc
-???na
-%YYYx:tE\2U*l1!])P-?fCj%Ө(888
-ɂaد:;v,Fcǎaذads?k]8p-!bEZJJJBMM
-pywbit{"'ӑ!T{%-#BZ` !"OhZۗ-&{\egB?}!roj;K!s+[?qqql5!K,%SBS?\FEBBz-#NR!99'OY~G{B&&&%e!Ҏߖ}D !ҕ<GB!] %RB!H !3H_ΖB!D7n@ĖB!D'''%BAB ViUU[N! uwwg !"B~hhW1r<[{^B~OҦ& CдisnT^~6mNåKlSCڦV
-##4l"R>-7^Ӣf /@z/F||
-\]]RץgʠPxb|Ƞ-GF2l|3-*Z0pAؘy^u=nCS?M]/1g(sqI|cF#`^刉!H^f˞=zEzcezAo{hآ1{~ՖXJ8;;!Ou={ڡ
-@$Lx55-P[-ݧɟÅ-Cbr7V&k;&nWҊ5-|[;GEqŎt%*+ExxzC!c=RIr<` !
--k5GJ!#54K!qGJ!A
-e!"H !_!BوB1H !3H2B!#HmllrB!`ccCCBHG]Bܟ!BiR)H !sP"%B@B1%RB!@B!#%B@B z !b&eBIz5[F!{eBa.tB1X%-/-{#0zT-
-D)&TA02[eQGr"/P(<4<θ},!2щtR[53#--HW-'-l^s
-aC^{88sIv㧽sٔ@s=>v*wۇ[ 1ԄN(U=7&` abF!<<ju->IOxor
-O-'0d`TjŵYRc/@xx(T*xUk1'f4 hp@ľ}Ĵ}i\/ϨԵ8t`0vvݗ%Xl_3rںM@xx(~>^_v&T͢ϝY3Q*6scg">n."4B6̠1kf4<-7Nn
-2CkPxi}%.-OlL]Y!aY7sc8-6U[Ǐ鮗gZJߎ9646
-bad;b'HFG=$}NHAwC& "BMM5Tw~c,%t8|Ιr0-j*Zqڰ),/wd^>:ڃ=t(v+#]
-f/,}:3SCrG0+W,ӛk{jTo'Z]kWҿ--{?H$Xp_/r7K~BNehjz=?doW(;{9z`S\|?o!`붯ac#T*EfV}% Νpt-;wEE%8#DmgNn$LիL:IRXX(G{4;ҕ}eYG>'gO&lmmxQcc,z?[pvvEqpvv=j_M??7qwێŋ`ggJTVP#&Fn;HW-0HWLF
-%8s;g&jjTXlu;^?wct)(=s8}!`:b#=bE{'.ϯJVa{.ǥGm7WW,^w\mдb3={٥cYuH>S'&&v!JK>!Ȣʼn8VxKBLS||RkQzr;[E)!]NnlڜMqjLjyBGAHW'H$l!9V[[_?,=s
-/O\ !D<D?y$BHH5wouB1BѴ=ҍPu2?&Bd2H5_GRB!FjHRHLl!BsN8H i;SJBHWt
-RT6W}l<!B-VVVl߾]{XTv^ZT\܈;=Wl.`Y[65B}.7~j(W^9^GZ-T+pƷQvW"|x{tcȿuk|4
-gszu&%EױlRX!~LVE:C8Z-ְ5u+++t
-0v0--
--IHDR-zKsΙ9IsΜ$yyyp˯Ǐ^^GSI&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<>|'BH=>|<VWW-.B<yjH}tt4_>}:?֖-BKѣG>nݺSN{lBjҥ߿_駟y&IR{5kttؑ-FK
-UUU(--{!,YGg}]t JH;r.Ě5k葆jjj!??aԩS1m4XXXYׯ4
-nݺfB^ !
-cӍyL>ԗbL*?\.gL{l!z=l"Kl!$$KT 8p La)!nMP*l2!DS %֭[qz[d<___$''ɍVSSEtٓM&ЧO
-]o\ƏooovVi&DDDMج&11{K,tm$ RnZSRR֭[gL nݺfkg&5A-is-K$<{L^dzgZGz6dT*UAQQbcc6cliRSS-Kjj*i"`ڒAy{hnkr
-ܰ{n6Du@`ZTTA!et}]H;Ҭ=R<sT\\\clVR*HBL&QTTė>|8d2d2"##!
-)D-Z@vN}
-#皺fڜ?3R={66W\3p!<x-
-N\ƍݻw#44aOKg{
-
-ԡ7nDDD_ߍ7"99q -..^j
-555m.ܿ555H$Mꕖ`̙4hQRR-۷|dpss-"&&-
-ƍ{uK)..ƺuPYY/\p6ǛoeǏ
-,c k>ǵ̙3xzzuUd|ee%[15$<x)b //Ҿ}MJ`HHxxx1zhZ
-}RЫW/DEEa̘1s`{6˔)Sg-/_fMo<H"=Vj[GGG!!Mocǎlr !GAڜO>qärMNNԩSbB@<"P빥-Q-!RfD`{FJܸqlWB}iϨBkd;BHC=RB!GJ!4QTףW^l2!*` 5YBxnnna !/ipõAXXM1aeeEdvnnn@=yiZDGGҥK?}Կ|!mG}<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?'$t1fΚef^-k9H;2ʯ]|igUsr{lrΪڃ_t(++Q^rҐǏ_IHLVӧOVgKkkenEEEFp(H[yˤQQQBDVѣ0l;A9x䷳yK0m?Νte-ƎcP(-9lmm!ddd@z8/XL]Wx<
-'1z
-
--
-=$r9@t߯!b1laSgsԵ1y &-4T1~:Nhb-<lYJ$vv8t I7Vg!5<|(Ϊ9ס HpM's4T1jby/:Y.ƍ[˻PȡhQ^^8}&0w~(\n/Hg?O\L臀oi]~q6ܨFqv'-u%ܽ{iwG ɰ#5ߞ;>GkP*B^bL^pĬ6^d㑓s-V/{X4=qHXf%qt*_VZ<@!;;-ʦB!DVK!u)!B~CBi
-BH#zH` !"4Q%F!3tg!"B!4M6"B)!H@B!(B!M@Bi
-BHP %B)!Ҁ@d BP)!R^_o0@J!ԣ@!g?tB!$4B!$F!)!tBiwoo6igU7l2!-.$t1Fzg !&H{uŦ}L-%
-;wAnm6K79kFzGHbΪ̖
-:j=?.NW(ؖ96DoƗ{FY&mܼ
-#2kcᾃ'W;wH!E#H gn2nLѣ-lMNu8Y<u_(l6O- h2fۏ
-Ql6
-I|ފ%زi=7Danp7Dѱ7Χ_lΜ
-Qf9/vŌLi]Z23/YV"|MkŘ9k2?i7Uf9HHgh0:p0-|:ff^νڽ:j='2OvFC$$&~:j`ܰ?4c(8l c~`=e iϚ;HI='`(/dg`]Fe-Fĉ~
-}F_8;ĴP*-V\-fWvpc>P@MrpXRuJgĠA'Vc>}0qZ
-1?dJKˠVgm (--Sg-hu8u:U
-sx{j6,
-gα'
-+V?ׄdԶs-ˆCb3!]R'~r{AgOCEEAuvl3cOL !s-/Ysq6иX:]!}
-?u-/NWhԷo-lJLۛ05{5:P{-[O?:rkb;-<lYJ$ˁC}vqGPvvx .\PCy wCj9|d2,ǰHM=oB#5(`Tm$Ouh:<}ju***лkعkRMHH¹s!&M (yݺuEεs}23/Dep4OwrꇽS'R)H$\~߿-PVV.X!I[~->_kccC~{џn͛8я?ᲳHHLB^^>짦ßEỶ?Ѹwgf&Łl~1ߚ9-}O9Шpjuk: L-۪.\T떕c-5ߚW
-\17ȐR#pᆀbm{}džMGeg*r9<8Gfe
-P
-4D^{\sMc0-ˌትkVeePأkW+כ%H>ȘΡ䥶tY$Χ_!w=RBH
-}5,BH;D;w]{:j=fz <@H% FiFנ쌵kVD _>LpB֭[!^hl!BQZZ/ܽB!2C=O!zt:HRH;uZb!BL())AFF:uGGW]:f&B^6IIIx):wIغ0g `@8~z?By?AJJ
-߿nݺJ_]]gϞ+<<< +[nv!Ɠ'OChZ\x;wF.]`aa<byV}.UUUFMM
-LեF~X᧻)&s+=L@Ɠ4=Z\Sl]?(:A:Jabt~6rrܹ*^=O}"c?{x=0ա];p`;Cm,--
--IHDR-bj
-
-
-x|DG,,i%u:JWi'
-LƆ:%[ӒYRףG-4
-~vBwpssO?QFpqqq3gMMMBYY>۷o!Bx}Epp0?gd-3B!D3f3cq_WF.!B?3y899~0-!O[nƍqa\vBZt)d|>55-38@=`oo!O444;v@FF[;{knnfo߾k!z Rŋcݺu\6!Ofpl5ӧO\BiݻwGpp0&OB~8)?`ԗ"q}](J$)Ć!ݵ^`ٓ-" AAA$H%2;1d6L`)!3izl"a(.飏>ٳgۜ>#v.77lX\6neqf
-B$pwwDJ@L8/iĉdg{6oތ+VLXb6oY}
-YTdooO׆L&DJ*6$hq
-)D7l<ϟ-BCCE1B+ ";.Oq¶m믳ENAAEtB.c̙A.C.#>>^4Bzz(Itɒ%ggyua[e<nùڊiW1gNɓOϥ5k* _M6`ieL
-
-(2lقYfa̚5[laÄt
-5Q)Neo&NJ̜9Su
-=l<rFMM
-JKK
-\WWW!r
-넆O+((\.
-WWW_$m߾B{:|-"::ZԆ$%%aŊB{ÇcԨQpqqAxx8<-/^{-pe
-ܹFqBwrrʢ"-nݺ%;==]t3Z\رqqqذa-6^l_~Ywb:hI&L@yy(oѣGEm5jʿ
-0___VrLXd$(x7)b\G9'JdHH^
-gggƍ8sPcb͚58p nܸ 7n\"ZިQ={-(**BiiԩSȂgZfgg'FXZ?GGG#99>>>GHeeQO+:|d340!O<N.1/eo1ϴz444+FDDnnnHLL
-ڵK:?~<Ǝ'Obȑs0kh8x r9VXUuV>/r9kܽ{fdܸq8p ܄Da?nnnzϟGxx8r9^ulذᨩCqeaС8~8-wy"
-qtMM)il6/@Jj~[XttX!S8!SVtբz)iK8G.GQQ!Ì&!l6W`LTݼ==4#càRc,|z)iؽ'J̘cp46&~ Z!ʼntH(!6PCoaXEb[f(
-+c/lKތ":~9&OV^)!ĦlBX̎}[Tt啒ؽ'-s-_Egoh=Rl%yAȤ -Ķ; *rwVTfiͱvZp]t_eEE%xۧP`Z!6a#3bWp/yhXBѳףG6do/֯[e4
-[jR#ofVmm-jSǹ])**PC>rcC~
-Gm=|_(K!d2d26,-NWm4^-ƍvZ]:P'Y|ju1Ν;/Y9JQuSgˠVп\\@!de˨-Q=o?aM}4Tjn,=>]oF 6!A8:|F硺eePk8_\wDl!^o<{)p#ᶱ7ޓ
-Z~X4
-E?ߟ%,?z֯[a8|P~W@hk')̵G
-smo/N7f-gj̗B!Bȓ)!bJBH;.!b%وBH !+PBH !+P"%Bډ%BDB%RB!
-H !+p(;!"NlB!z6F!m%Q-`a\|=F_FTY#|qr%VZgkYٹHn93a:F{#Y`]o8U^FF+|6)e]r:+d"#s_?q괚
-[D¨NBm=:|TTE;+Wh;<Àcz.Eq1[j&"1c-:~9Rm--% ˗ ?-Ϲ0ju19ÿ/vC!2H;Bmm-B=P`P(!91c/f-EK2i)@;
-`Sa0r{P`ǐV{R=SukWFbUFSGܕluW&di֘:5M[B4-^32Mt-KbCrG5y'-{϶Pô)X;1yrEw/@e,+mMlh
-D=j-Rc3o?aᇒc܇v:Əb yJ;{2q1-o{2QVVjum9uZ-KACyhXjc'B_]]-Vs9&^KfN{^`n]h[~#}q}~hY8X1,J,[EBscꪀc/($w}wXM
-B?PzB!(B!Vd2#B2C߄B~O8Lf !'Emm4
-[N!6h4rpvvvjl9!BڠqnݺAVΝ;lB!p9sݺu{#8zToB!Ĵ<t
-8C=p
-۷ofB!۷ׯ_G! /hjjCBT駟FB!O_~7oބVӧѽ{wlΝFɴ>DCC,L,SHِIRJeGN,UttD.Sj=KH]zzzgH]6er'Lppp@n--
--IHDR-H ؈*-1[REϞ=*BH+,--#(IҗTB.AtĈl1!DÇJK֛\Vё-&0j(JKqV}3
-___lݞ^lԆ&ߟ-&`ooOtIޘ4i^}UˤI>[v-&S___DGGcڵlQoK,tn<D"%Revꞥ,$$$4K\MHH0_;t!-
-
-[Z-gggxxx8|0-{-D-{쁕"""<(GBBKΆx7l-nnnsΜ9effbܸqXr%;w@.cqMyxx
-w4#6uʔ)S@@;!Kl\/QXXq-?`l^D"~Ī=Z sW_EngҒ'lڛs QݍqӤLfggcԩl!CПQ3sKgH-!Қ6 ..eee˗ґGHg?F=B:B!V!e[N!}[SzozN]egB?}!tZ=GVw"L33BH7rõŋjB-[^zQ2%9%ꫯ...F߾}u!S*HLLٳgtQ㏟&R}B!۰aioH!H:Bȋ)!bJB)!NjzB!444@ܣGB!уΑB!EB1X,\J!H$wy~B_I_]}M)lxrظ)W^gҲWc1#t6<'!<"
-JU⾀dxzOd$}*U9J!F3xD:mjPa֪Kص;UDgkiّǰee-'H kx`ǴH\V-'HZxD$-g>6/,D[}ŰSeyr~0_fSۚ:yf!"7OOǰaCacӟ-1%]8;Sfk+R)#S08nܔ%%7s<oaX/c7-D}/>[R0Df@(*~{mNKm>4RUQ]
-ECu#9zL'L@TYW!eȱ(+STJþ`LgB1%ZfZkw'a0]qcPRr-1a&-pE={"#3^Ο/BQ-E
-Ξ˿ڵHM/lm(+SVV}\8 W7uN8 F=kʕGӠm헡"-}/V%ocxMi{'-kM,]66_Q8qQ#@
-EE-[`[$ՌҸJtbD-Bcakk{Fھb<T6=m[u#[}B4Җ^
-KPO[N!-sn@!<)˖B!V[Mʇl!B4ZKj'H !!#}2B!$؝)!^+O"B!%%g"7OmۿgI''njOIX4
-yGD{[LGKl~ܛFɱqS
-^V vul=!Ɇ@*gq_?`2<'?`2\
-luزurlUc~6}%Kc
-5Y65..oaF3E?s%mxzO5BH$]o165z-bC2ŗkw:Jc;rl݁lI3BgM
-Lf3}Oy0b+lUc~657n.cUF%8x-RƏi;:-w:ezqS
-N:|Tj:q-{n.7wll^h>G9୷|9ƃ
-mUK!G(*-h;n 3i?kNJeW/]ƽNǍ©
--=TMʍRPVDY}SȶTt?ګWOڝ&ghNpIrGP(
-vc:qf꼗c?mB:;s>Y0Æ
-N=-6?K--?RRrEEJmڏF`ذu~,?s!7Oﻩ3%]lݶi{*F9DN0
--Fхb
-?=->nB8i?ugJm+jԴ)^C57܄ل VͤEn/(.Duw(p8;w:3BQ.e\L7JS!GcpX[BQqov:R[[)ʔk9-E"nv@EE%u?ůFݻ/]BQ-?YM)8/YH$QUHȱDE~'OAEE%"aTys]]=ЧOo_u_}+c}ŲCYGknҥ+P(
-p<MɑHKǛ}{ߗjs[-sPVDxlٺoamcj
-c<*~92GO#w!wnk[Ќ?h7:51ї"Ռ(vJtbD-^Ǵ?[[6f 5k֨?ô;@B!ߑB!/JB"-#B-3DWYgWnmNqNq0 Vh'vB)hab_ѭ[7tݺu9`nnY3--
--IHDR-*!&̀6`2?ssf|^u.̙y>9~e_<3s&Rht[So_1L]0^-
-V⓿ѯ(φ#*~rϝtGHU'=E,N/[ӒX!l؆H$so-GGs;u8PF;GXBgy?8QUUիoo>s!3k,!_8B!PPP:߸q sB!njq7oC!3qMϝ;:E'B1ΝX&_O!3ZZZ mٲ_o+??8!z*GO?!</_G}{u&bˈƀ`gg;;
-ZYYYB@:%]p_gRZZ^z%8}5{,Bz>}o߾r9=jc!~'&EEEWBAAAWB0O>$BncattM@b:U& ҠAw!kt:mmmrN <C*B
-B@@$I\Άju:ńF%(BzNvu:<<<ńƌCH|Μ9cvO
-/f_lv|2d"+%R#M<3fO?mr1c&O}yfYd2
-
-5kyf~Ue]\[*dsC&(}OHII1JLMII_;tH-agg-k֬aۛBxzzW_}Ů HIIa:jˮ] HR-طОlرnD_pgggUVe˗/GDD'Ι3X|9'<x\\\E,su?2V2tgdd˻L,֭[DPNg\-!/p-jkk!~:0uT#Au a-kKJJ
-rrrݻw_5-{VJvZܹs_"99]C@@-Nyo҂~1!^u sS۷oCfU2\\\iӦaʔ)8q&NDׯð8
-k֬!]uVxzz⩧D"7nÌL:Ç닔L6
-...Գ-**bgtԖ4")) pppҥK1vX|̄D"App0~gK8FI1vX$''
-C}v|mmm8s$fVݍD"c5vHOOWb~}W
-b !{l{z&!
-}y7faBDEE!AFRBnX,!Bѣk*?s!#6E`Obs#t?1Y3َҽAܿ~9!B߿ϑB!D裏 !`nWٝХ/؎X,8t:%[^fF>b)s?\X_MիaooOɔhm۶q
-5kGB,VӧO7.Q
-Xy,YN"5uYB!k."BM- !ބ)!b/DJ!X<#%B]B!JBHWP"%B(B!)?rH{o+ʯrX|_Mt_q<_+z5F̋^m8x0_ݫ,GY{1/zݎL~y mٲE˯2j~1-cٷ_-
-U(9^ʉ}k}Fv]L
-Qo(r9L
-wGv1B~J"$4ܪ킕)B>?Zm3&N)>-Ɣ@TUUc-UUF_""*0qiMJ7afċ.'NpGUU5b1
-jj}o}6!%E9 lJu j<=b5unhok
-
- Nm
-Gΰ=c?ܶՕ5K-)mN03E~5G~ M#vqg{*%~h1q"wXP-";gmJ.fkt]܇h##WC.wEڻt(;Yx)TKX-"gįlC~Y"tfGF&nѸz
-R=vť˗٣nv̋^ ^SsKV,e/g~+GlKυL@eCBbۅ
-🄃OQ䢱5yll9mV(+Tj1nP|,VS&qL wI
- CmƧٟA.5vΛ#G'ʱrU"\]0b(k/Aօ>բ߄E.ҷegKO:b{!.#]u
-{7,,^*&UHW-rrU+Wic䋷7cgR2*̇Vg6RHtZпUݹARj~hlByzDo(+7Vkǖm6k|fYߝE.6Ծm;2r-Y5֮ۀ"`ɠVkQy:ÜO;QV}ˇY
-13j
-Fv]&dNJl]/Ғ!?Zaa!pv綊!둊6oެrWh4HJgV;w-Gz7oB&sFd?,_'4rg_MH&55[^^QZZnRBlx)+AGT Þ0B=s=ҭ[Z~BJHR9z.%Q)!bH !Ī_!r@B!AA=RB!GJ!tH !.DJ!XfB!]DBJBHP"%B)!H !NݐB1<I=RB!Ng6R"%B0HBHQ"%B)!H !.DJ!tALq<_c/ż<~g`D~EvddA!2In|1?%K9RykmFӈ̊׳^Gi
-
-G{[4rvdd""r. D<͉!B$ OcE%"bC--<tlgBb~xqVT<Ƹb$%oIfGF&vddA5xGF9Iqh1<<1+**%9Zì̊o/\Ua
-l2"R{<2-
-jxx/bcGF&VJDYY.<B)s۱w7O-wT^ɼCy-wvxs{f~FEc۷-lJ}PRyzNNC;#G Zm3;,M!ݍUsL+5LMECd-QOo/gEɐ0.-g/Ju KbDBjEER=;pr/PdEXXH3Fh##WC.wEڻ|B>ӦMKaz4υ-n_@XX4p/?Ԣ{TVBq7/E^~!ZH$BMxd 8:6زΉD"|Sze'+t
-E.w̝ʼn'K8:F4{>Ass3[y~ylykEKM<X@+=W&Ԫ~ij朓ܑopL*+O!/->s3YG&sƪ+.~|uZ&Y߃a&- Nvڷ_1%I]݇+ Ô@~[
-
-j]eEs*Sj
-F<
-r-$J!w%PROވy-r0,Z#bbH/#=\uu
-NWB*s'k'?B
-D"-$BH>;=R[4B-Z흿Gڷo_444 !bFCC$ }ZB!FXq~PYYׯc!bQQQ~J$;[B1b@]]rssq5~<!B-p-mN--]8K]8X+4
-m=FtNX.vvv۷/뇾}}?;b]H
---
--IHDR-
-JiOAUeJ*آtZ_Ҫue!Km RD$ c~f&!@T9{?33d[[[,j{.ݻ?z/_--/Nɓ'1zh<y-
-
-x"̉mŋ9>~?ckwf}oߎEJO=C-
--(((ܹsMlC-ONG}vL>5/"8mݾyRx{{pȨ=^J6h[WVVhJMMŜq`47--Nm>{$͛-Df\^4,[h"vvvٳ'z'''888\
-qU)DJM7oDuu5
-Q]]j_Byb22cƌL&ԩSq.u
-X҂k999y&B!쌉'ba;nBYY
-%QB!7oބB@>}P[߂VP]]~<!BLhmm"%B\WWBB!D"{_{P]]͏!BkP"%B:Fu8߽ąBNhlh]M68p /+!q
-\z;rrrC!)}͛7Lx^z=zijjBSSZ-vڅt~!1$ 6wK)_Xh^zQ%M=лwoHR,Y֭|KCBH75!""pppWBSLAHH9j_0!b1{=HR~IB>Էo_~!z^ǔ)Sлwo~!Č}"00PPTB/ASc2DP"%t_vz=ń
-FtK9N>mvO{䲳1e~1kʔ)wXkkikk+/&0p@J[?~<N^z2uT?GnƍXjd:eZ
-7nWu_B淥B{{{:7Dk")鶮]/b{>d$ф>|θp--oGLL,--
-23gDmm--J3g`Æ
-2ba2ϧ$ʳi&̚5_YfڿE?'?gjkd~Yٱӷ:{J̙3!H H̎Ȳ0dH$28s!H h0&88~~~^~~>$ v LLƞ;c꒒غ;w"&&H)H$k[# 88111>")) Vblx{{cرpqqAxx8~'Z#!!-k/;wD"J5sLĶOvgÇW_}@v$:eE*XN[t)8t֬YҥK93`-~~~l_{};w.&OիW#--
-زeT*x
-|Whll˻\Zv[tÇ_,jڨAB **MLBMM
-?<Frssq!СC?[|Qe0tNlCףokk+D"QFoƜ9sၪ*ܾ}-0`-rÇɓrkĠ~~~8{,-?">>7oD`` 111HJJWWWyܼy hlld&9[cȑܹooo-%3"e;:"r
-닫WĉvZ4W^E~~>}YcҤI|2c@հM[>}:RRRiii&c;e(J9smu
-
-xرc-YYYrrrL^X$SB)ף_L扔)~z=:L### 113
-߲ӕ*&N3ofa
-߿?$ VZAC:m˖-Ƌ/Dw4i
- ++cǎEBB^}U0-I-<<<T~;v,?B1"
-GU||<؈saڴiBlBHקm?"%ӑ!] !)!If^dz>/&X]eWB?}!vufnTMw"Z[8 !be˖ !VXr%)mڴI_r
-]\\UV駟BVR]wsB7B!KiB阫WjB!߿?%RB!3(B! VT2B!p%B͍v !?I?
-'BlICܣG~9!B]H+2$}_DJWdؽg/4~5!G*Ptr/~"z5̉_$L~dQ
-DCfV6۞b!ѧ~Fc_-LwRu=į3zTV^D/82<mFNPVYn߉E%juprrĄ 3dž-Z)34f(h:seEv]C8XzomQzZ?N9G6-}vS/;!D>C;^>5EH;e˓0-NC&sNa2t{!b#sj4xoBN7b{r
-orZ?iA*u"d(vRWJua^wQPX P<"hdlH>gt`h0TV^luJlNzY
-m-3+joXs t,+C{
-eeG/Nf/Ԅ 8p M+*ɑLY/kAr7<p;J>vRW(T<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<>{yySqxHlBn#,-%9WB.O?(<Y̙"D>TX=c(Z?Bbҥ+rkH5
-Z(.VA&>;Z/>٧ik{9<gMciݫϏ_nwJJNqw96&YJJNrz̬3vO"}v-uu'899b+~8[qc(D>?ql[ccwO'=MӸyonqCSܹqE::]}0fFMM-T0rK^wNHWd Dǟ&ߋXO# c߫EYY9BBؾ*&s_KU-^+>XW8p m?n,>^]؞-KRm)hd`ж?~q+b݅1((,2yڎ
-__ְݷVPHV1m>1棺Zk] ixF&Z{1%kVj_r&N \Vk^~'dprrQ$ܧiǿ&/UBB8w$Ui(11QtR~9!FS/<OmC۹ujZ;(~=N`ϮFӗtevvv-
-Ï.!tV%R''GTi`ZS
-#UO,W|w66m\Vb(lۺR+
-ٸ~̂\m[7b(|
-VS6 !*Ɏc#:fyey'?~*;tEʋ2ubN<)tEgS>Je){ޒyl̬lC^ːH0f
-{g[!qmȀHWd|aۓS8s×w"ao\dRVØѣ81
--VY&̬ll"--̏Bň|w6gy(kk[*uŇq+l1<R]6x%f-KU@@ְ*pu~&i45(++';mF~c(vsM-Ʒ%u-~m*
-
-8ڣjEbꜦ_|n2tȋJ?0sQEA_mfQlLдسkb @cCg95k>':WH.[By:HG@*u5y0qj45VM-JOܹqE)2j߅8z,^<0g$v^< rʙgCI)$~ W"$$M..pdfƅU8S83^oP5D8K?5L$,Fm
-(P^^=+Npqe)~e={#Yhll2qipv~7oB}]oÁQèEFxsNr{r
-ӧPRr
-H$x?vA8'^ȩ"~d NNVCI)ݻw*+/"-}?vً_^EHH.oBHNX`.?$j
-
-?]Ҷ
-sL&Ŋ!v/t7[^A:j}
--dɢx
-ĺVs-G!X$H7W^^E%prr#gcϮB!6 JHH!b~j_G!3ZGjooj~=!B̨D"Ύ)!b%FXq=pIܺuC!n߾b888#''G!rss-|skP>Qa =&
-ʇU
-נlA3\v1z
-ި([T]9}&Z^0>v.$sjg(\(p✐8[ X5jZGڣ6F%|){KJGD,d}-xI>&)#|<e)l"-%|)0I
-)cϸuOYlΗeSm/{bc&P gX:cl!î$Lt>%NIdbDӖ>I/+o6ϝ>6|n"!70=(jRZF ؔ<[0SXc2}eSJM$dnC JVI9(r0iUts
-w_ϠD]Yr[J`f1(=N_Fh`Lb<؆g[$PUcm 3V<z%XKg8f9]Rq~47CfG]jW͍RJJZEj ' 2Jͅ=^W194/ރ3
-m3F
-1.VnpD&[ZffnPizR]>X(?9TRvC&d|J[ZfO0&Mgsw6gn;/l[ hGsIg?(bgrE͏ܟ`QO4Q"a!Ù,ASbQ`'l.@%Q<4l/ۥG6zǪkApG
-kڅ5cGJk4%WaM8Th
-bq3X]$(3Gy:RZ;GVV<U'vOǻ*
-N9s.UDhugpt*[Yd+̮l(͠wd5!w TRADr
-n@8Q{>po־>X˵_䁕ƖdzL?E~Dl ^f+2xѲDD *Jp9rotгzَ[ _b+VTnst=9*F.2aP#}z9J%JW|9PuS;@z7y2zͥHbќ:ŖԻZS[%:v1ШNl.)EGv enB)2p$Ve94~cot#e9T#eE*f?Lնj
-^1P:`ÇgS.myvZҳsܞ-ZUM(\>R:KNg5
-?5Z7C^(2I~.{RBWUOV孈U_W5Jq'+|4FfT:ި
-J'AA;Ws^z] aXRݩFz{Uv^Wu?-N-&TXۻC$R&{@QȈN2e^|!T)Jq9Noh_"j(K+m<')n~xdӊBC)#lg-]Ǭ##^)~cpd'&
-.386?㒙v3j[SE9?c_DxdʗauTu
-=D QόYo.PB!(TgD!Fs,r[i_9gCTbB_<9xQHc$KL)8D[6+16QE#J6GϱP;$Pؔ(/eW0C]mb֑U.w$Ï:uxoW</Th~-F"bRX<095 tkeDK5]#my
-)ĥ-͢yVv7Q+oe,Pv0ܣO0SRsN)?CI;Te}BZܻ3\8#
-)I<8]3Ѧ+u1\^2'U3EƦ⿋E_)Y7uH%<-jor5wx
-0ӑ;j<W(tmz?w-l`hks&;`
-8u͘kWg
-Ѿ
-ɾ
-:WA*H<gAq~DpjD8Ćqh
-ǡ48?F8Sf-g:wwᇻK~p;zx\=
-ҲfYVY9R2r<" `td3qoDߟ2qY0eӻ<ʓlE0")sO|sұ@e&Ŕ7qU$Avh?ϥHb^0W-cdC\o+ \a}q1?7P0S?3P03&2hD-eЈ̠Ov3hDfЈ͠oLTGswWI&m|YHf4a9rYfX\fSpGѧHTz"r.;NWtJ\5j<"x%Q-Cxe 43OISODW{A4=bNF#efiL҇*i&y!R:%⣈?!r^JTw$`ִaS**k:Ä
-CŦ\\݀ثE켅GuO^dl5`Hւ YfjW/XQ_/(<)9<P`TL(0*
-OX`ӱ?-;E_W߸k1pJ4߸ڈ2vns-VGE+hV'ZAhc<pC
-!B1RpC
-̽
-QBhBP-!BhBP=Ns/BP!Z-T5^!Th**D*DAB
-!BhBP!JK-T*@Uj/Th**D*DAB
-!BhBP!JK-T*@U,!Th**D*DAB
-!BhBP!JK-T*hOs-G]-ʨmK<ݶQ[-A78jJC);ma28ۢe-F["e-[@mqvϗ6wNmn 1FW]s#tэ '
-f
-G5jTC/?ʛjG5X!jFS
-P~TîK5DR
-T쐝0TC(o!pp"`X!-`PTC6,(-s 2uȖ!.8[ْe-Y-٤FJŧO
-Ͱʏj\DPXqْj\J5.[j-eKMT㲥&j\J5.[j-eKMT㲥&qR=;d'?ոlj\-5Q˖eKMT%'ոlj\J5.[rS˖eKMT㲥&qْj\J5.[j-}&1'n,/Žgżd?N%y%_y^U>n,%RRR-Tb,GN\cd75˚=p$W`jkT~mLP/yf@;5z>|MLC2Zc,?'56,+ݗ
-tUwљ-fNo9?uoF%4Pw1DAׅ7c3'WMC-0&aCM1}LΆӳrJ:[YĩlK̷u˽9WU,<~=Mk>:Qlj\/3?g&>@
-Uf
-%t?>ge>6vd%.
-tӉܜ3S֬L63z/&R `Ƴw_SgV2w\͖HunF:N]V5YбV]>bhP;\ڞqŶ\Gw/|.e#PnsY-C*ܣKktC<by:dVC>S'DO5x}K20WE
-DF[ꔾO~}
-Jgխ>TRMk"$WlIv`Y=pբկ-2J5de-Eߗm4
--~'q-_'υT y[YdJ4W0!'d\G<74LF\OQGZٞ#Ks1tPm`D3@&2Z
-}ISI+R@a/gdfAEfOnmVv`QbP~,^^R@X%t+v5707ɣ;ٛYwp*r#+&r#5gNŅ{t8o,0pHхliBI?0U
-GQ|vws鷙l5'W]՟Y(4^^-p|u͊zkvnwb}RA.18O-){h|V*lP\Ek;:ғ6X u'
->leZ%c$jI~|-q`v-[T!egpN+lM oB܃ꦻU3x4X$;cwۚU4!ʆ6$2hI{{|Ӿea_oH
-
-av=V3;n|QPn;zxIfs6xi&,߀,%vBM#2➞mwu{5'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
-<</Type/Catalog/Pages 2 0 R/Lang(en) /StructTreeRoot 50 0 R/MarkInfo<</Marked true>>/Metadata 298 0 R/ViewerPreferences 299 0 R>>
-endobj
-2 0 obj
-<</Type/Pages/Count 5/Kids[ 3 0 R 35 0 R 37 0 R 41 0 R 45 0 R] >>
-endobj
-3 0 obj
-<</Type/Page/Parent 2 0 R/Resources<</Font<</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>>/ExtGState<</GS10 10 0 R/GS11 11 0 R>>/XObject<</Image33 33 0 R/Image34 34 0 R>>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/MediaBox[ 0 0 595.32 841.92] /Contents 4 0 R/Group<</Type/Group/S/Transparency/CS/DeviceRGB>>/Tabs/S/StructParents 0>>
-endobj
-4 0 obj
-<</Filter/FlateDecode/Length 3162>>
-stream
-x][oܸ~7N
-0"EwERC$Aln//3E~p(~߹fx_wwڿy?yW~n7<<pN|0aJ^6᷏7ar{}|K=8㙳û_C
->|O9}㏷7=Ʀ?o{e9w*~Qh\\+oû?<r{rq=!f]?tDʦHǜ^L~x}C[ol`~
-s#,PHZ<PYd4&
-&
-9
-Q#OGq 2-F~~nN.%WO gnpR(fn\B>4L>/,5u$zOSwT<5SS=e&MAqSeJ4f{>ßiG~¶L;&W1'SHB,D`+
-JXmk^ɻnr?[ď>i\F&#,[lwJ
->DWz+zHŴlj¡;
-K[BƅgIcr4iTV3(^96ߵW?ndBzzKO3r1ޕ}4Us]<he<v&6efF;wq[(ZSEVx^An"p,N.tr4Z
-Q%
-U*?Wztp &ENkMHdiڒaUiLDv-M)*)Xqf!-ICE?#<43CZu,:.8ɗTZfb8b&C;uFDH 晸'n
-I HSR
-gܵ;b\W
-h<w[ZҨKI-Xb$nQGw!F\4L\-%n̜G7JGv6g׀(V=[nGZф#8P!x@k$-L"5R؟*{Mtdwy5vϬóc7Paw@knH\ߏs$'pSƝY0Hp?-P5 V:X9Džr*KsxӂW%B4^CVӗF_OL Tlնijk!XY&>bp!Æ$9(&9˕Fj9
-9Z#g%iZ)PMQxr;g?[l2ǂcbq'bp*h
-Ir{KuMrIFN.)#'P!'P!'Pa&P.xJZ]Iv7^JBW&.I6C{Zv#&Ʋz"q,S -;ߡYg-'mZWGnz41C2-9Z#g%iS4b}&ܬ}w̦,ieԀkIgAnm1
-T0
-\Džu[H놤TcZIgQ5J(L_!7,$b
-`@%_+I'v?icxң^T)=ts"@Jm6-J7ҜnR)eRi!P$nҶˊZz*1bp8<J0dzT;6ut3W(coY0fZ?*I'W˫[h؍-&O74m5nڵihʹ+I[=0Tkq(zU=~o!G\0Bֈ[IW7)ׇ3EA.sK1IJE{F0Ǯiׁ(2+LLbpT?5hH<<&9L]a֢#'P!'P!'Pa&P-v&nbpq-(ӛ_ìu.0(h˴䆹gأ`w9:P\ltDm@bfӻhTH`8>m!|?*5<s83=1c2JYԐmuUic6B۪xb:7jMY:ZpvX';Nܩy&4
-OOц9o̜i?/o}kxeHu]?oC73V?yG6d_*-endstream
-endobj
-5 0 obj
-<</Type/Font/Subtype/Type0/BaseFont/BCDEEE+TimesNewRomanPS-BoldMT/Encoding/Identity-H/DescendantFonts 6 0 R/ToUnicode 283 0 R>>
-endobj
-6 0 obj
-[ 7 0 R]
-endobj
-7 0 obj
-<</BaseFont/BCDEEE+TimesNewRomanPS-BoldMT/Subtype/CIDFontType2/Type/Font/CIDToGIDMap/Identity/DW 1000/CIDSystemInfo 8 0 R/FontDescriptor 9 0 R/W 285 0 R>>
-endobj
-8 0 obj
-<</Ordering(Identity) /Registry(Adobe) /Supplement 0>>
-endobj
-9 0 obj
-<</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>>
-endobj
-10 0 obj
-<</Type/ExtGState/BM/Normal/ca 1>>
-endobj
-11 0 obj
-<</Type/ExtGState/BM/Normal/CA 1>>
-endobj
-12 0 obj
-<</Type/Font/Subtype/TrueType/Name/F2/BaseFont/BCDFEE+TimesNewRomanPS-BoldMT/Encoding/WinAnsiEncoding/FontDescriptor 13 0 R/FirstChar 32/LastChar 32/Widths 286 0 R>>
-endobj
-13 0 obj
-<</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>>
-endobj
-14 0 obj
-<</Type/Font/Subtype/Type0/BaseFont/BCDGEE+TimesNewRomanPSMT/Encoding/Identity-H/DescendantFonts 15 0 R/ToUnicode 287 0 R>>
-endobj
-15 0 obj
-[ 16 0 R]
-endobj
-16 0 obj
-<</BaseFont/BCDGEE+TimesNewRomanPSMT/Subtype/CIDFontType2/Type/Font/CIDToGIDMap/Identity/DW 1000/CIDSystemInfo 17 0 R/FontDescriptor 18 0 R/W 289 0 R>>
-endobj
-17 0 obj
-<</Ordering(Identity) /Registry(Adobe) /Supplement 0>>
-endobj
-18 0 obj
-<</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>>
-endobj
-19 0 obj
-<</Type/Font/Subtype/TrueType/Name/F4/BaseFont/BCDHEE+TimesNewRomanPSMT/Encoding/WinAnsiEncoding/FontDescriptor 20 0 R/FirstChar 32/LastChar 32/Widths 290 0 R>>
-endobj
-20 0 obj
-<</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>>
-endobj
-21 0 obj
-<</Type/Font/Subtype/Type0/BaseFont/BCDIEE+CascadiaCode-Regular/Encoding/Identity-H/DescendantFonts 22 0 R/ToUnicode 291 0 R>>
-endobj
-22 0 obj
-[ 23 0 R]
-endobj
-23 0 obj
-<</BaseFont/BCDIEE+CascadiaCode-Regular/Subtype/CIDFontType2/Type/Font/CIDToGIDMap/Identity/DW 1000/CIDSystemInfo 24 0 R/FontDescriptor 25 0 R/W 293 0 R>>
-endobj
-24 0 obj
-<</Ordering(Identity) /Registry(Adobe) /Supplement 0>>
-endobj
-25 0 obj
-<</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>>
-endobj
-26 0 obj
-<</Type/Font/Subtype/TrueType/Name/F6/BaseFont/BCDJEE+CascadiaCode-Regular/Encoding/WinAnsiEncoding/FontDescriptor 27 0 R/FirstChar 32/LastChar 32/Widths 294 0 R>>
-endobj
-27 0 obj
-<</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>>
-endobj
-28 0 obj
-<</Type/Font/Subtype/Type0/BaseFont/BCDKEE+CascadiaCode-Italic/Encoding/Identity-H/DescendantFonts 29 0 R/ToUnicode 295 0 R>>
-endobj
-29 0 obj
-[ 30 0 R]
-endobj
-30 0 obj
-<</BaseFont/BCDKEE+CascadiaCode-Italic/Subtype/CIDFontType2/Type/Font/CIDToGIDMap/Identity/DW 1000/CIDSystemInfo 31 0 R/FontDescriptor 32 0 R/W 297 0 R>>
-endobj
-31 0 obj
-<</Ordering(Identity) /Registry(Adobe) /Supplement 0>>
-endobj
-32 0 obj
-<</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>>
-endobj
-33 0 obj
-<</Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 4495>>
-stream
-xۋU/_! 1DD#A|A`f7EBp$3\̅dr/C%0Ht._8vU:]U4TSu>}T̹s曯:}'~{rr_? yy5Grp88_NG<Ϲrv<}<^:E !O("N!U̙3,d{Qɓ'rooU,YX!D RRZ!Xh|BtP+BT.$BNl/_r@Gr?BgڵP{キjժcBr|XlcǎBt]CȚ+V|wO>}^:~}vBT
-^̿wʕ~ H?Ӆ6o\̩.DEr>_磏>_3_-ZT /DϞ_^vqy!ʅ%-Ge`ٝRt>][lDm`hyBd?|hh(^zyYWǺ.[x뭷py˺aK.EpYrEne_
-*2+W_>Dd5W&qbւ~wine]~x:Ud$?X'pB{$nܸQ@-6 e~P<ʭ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>BYv
-K/=MlMten-\nZCTͺg+厍%f[fglkra8bR;$5iVY729Ӻ6Ph*lu2gy[A낞""Ĭ<5IԦ(%J.a0|TɖcڬXs26;QK.\ŢvFk+Ug*.l3֤+ȑDoS
-QM
-ZrZU]tdOa~R7wX~uQՋ.XN+:ǫ0fknZ<ӺАuE)n5
-Q
-
-@{Ij_)Ҿ9^1uE7'"1kGbxe@E&ݻw'f! nݶOYW,YWƺrwڕ%늂uE7+"1K#n ͺ-z衇{BLu.\ϋhg}.DĭQ.|\|]z^(.`+ݹs%K[N-!F#ʎB!YW!DB"rˎB!YW!
-CB"uH#ʎB!YW!dhh̚ޞG(h-;<+Pu]%4V9Ӻ`NHhO>4AHnŋ6i<=)e)Dh]8}r%c5lf~ꪈ<T$B6 .U,^VBt-]ծX,eOx|<BHef.`/nC"DwG
-BP`{TGܺ.-H.BB"P=+`Y&aZ6LGυI#`4HpEiɐ0ߺ#.)uY9
-k6D"<]FYW<lakc܄Zsn0Ǻn-oL<3-gB<SBLA
-M[wl|u1DSs2Io]Oi[r*.lF1
-1Q>-madV'Bik3(Րu9i
-F(
-͈@&>.<octĭ(:v»vZ])sYq1.
-Fjng6ykSF!H֭[qFx6oZSN9d}&XC#ĺ2G0x
-Y<֥su;\C5XQfdE "3+9d]!(44&!$Zw xuHd]!(Dn۶MBvf]PJ<BȺBQ$iݺuk!D#
-!DȺBQ$QF8BȺBQ$B+E"
-!DȺBQ$ݲeK)!Dg*e]!h]B"QvB-ȺBQ$B+E"
-!DȺ>dzl|Q4\5=--;
-!Ku^53s&|<ѺY/^¦+W3߀-[!MZH]#S>.g2}I&N2^틧M ubdaFEB 68+!e]!B
-x.!%ܪPMx^(1:!GldYWX}`]MquYX~genyf3uW\AcΦ8ioPff?WFk`襸lj48'xۘ<#ŦbZ /kݴ6n[Ei
-!*HNڴ bY816ëgG
-Q]Y"6pݴPrx6"^u݆-l< g.vL?B(Z#Mæ,G6=!Do],QnnG*5Ѻ6dmh)3B-y2wӎGM
-05kn8NUu \!g
-"NܺP]B6mǮ3!F4NP2!&d;vFVa)e!
-t>% nڬm J@
-mȺ=΄;lu92P"0^YrCe!ʺbVZ/ձ,3/ɊB&Kdڌ9BĹG6*rZ>fA˜'ӎrCusf
-) @!nuo(^ۢړf#EF9yk$_{[9uK2B p/eҬ~/\3֞H12-=GB@[n"!D"B+En۶ʺBȶBnD!:>s".9 ۑW^yĉe"ɓ'kBt2,dNLLNNNBt2o?p{w~we%իW!Xhr<o߾-[LOO|e)s:TahvbbСCƈw|||Ϟ=7oiӋ/?1{_Yz/^b];7k,9w<9|y=%#Qf7bz?^2WJ
-HSHj`1Ѕl''
-endstream
-endobj
-34 0 obj
-<</Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 4533>>
-stream
-xU/_C4~0xHAT5L\nvEg3̭g&d23N Q
-CDADc! MXs8SSUU5Ϗf>UuS'Nz?;<xptttCSq2苣7=CNfGꞓiF5GPP(D
-BP$4ٞ8qooSN9rd͚5O>߿X!D RRZ!Xhr>{ҥE)
-B- 踄f![(>C,W!
-4;11<yr͚5E#dNMM=E"d;vLw,!D@Pn#D!Z#G<Ȇ$k\/t!d=裍BÇ?b{ᄏʕ+^"3H?lْOW$:t蹶u>~a*_urrrѢEtx!
-ϭXXEMy!/F+Vi`уR4?]koowtF$>`"x5t@Q
-oV(.\=Ee]QP}Bu].]*z,Vܹsryv~YLOO/,3+Wlڴ)XB,JWxu,XP@-t8ni]~`9
-(H`ן~'cccXQI+ܸq#1+-
-*wa5-c_-VK҆ExR庋-J9ߒr3溡RLwZnyxJNu)&P9=-&I=VeJ@á[gLk$eǴVy2N/$5izY749ֺfV<Ժ0]y ^>"Z,H!@V;uX'fRi8ƙO3`d:,ELLzT#t+Zњ}3]]8l#gICBokG<%]kБ׳J90/<Ŏ~\
-ZS2<[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"'`ݍڊB!ZXmUQ!D-=EG!]tB*lݺ(U(:
-!hd]!ȓJRtkܷ(\?B!D}pԂQ['ڙ3gl*J!nϾ`R$.f?`ؚ6LfvU9(Il6˺B4MQD\Kx"
-hb9E8'=<q}cOZq`a6&+wrW!#<|0Bw=d.}e^Ⳁc<-Eώ
-JPa֚"
-hZמ^0ӧ\((,+lȭON( nUjKMQ;m]<qO
-
-Q b`xP5{D>d]!
-X!x5$c\d$L
-!ļLf=`"e0pۺ<">K|ڋ26Luh4}3A^M:!`VK7p^F
-Xޅr*YWF:VHm=#QEΉrat2ڗۺ0Hn]d)^
-+D+u_7uڗ?t2ڗ#BwQkfVQWM26f(BϺ_tܯ.</wmV rsڃŒ"j_p㨐sXƼwO! Ob]LY֫iX0rM̭[~K>惡[0WPΤn=Qհ{jxCpgm$j6.]sTαw9{hbny
-=مȺB'BIu{zzd]!hB䉬+yj;vمDYB47BIuo^D8BȺB'BIu{B49B䉬+y"
-!DȺB'BI/@۶m+$!hnBRB첮B6BVAB<u"Od]!YW!Dņzi%-+:
-!fk][ߣq`hWw9s6&X6xuÆo[~ӧ?My
-,({ባwixGI1и κKnX/%!TA(mCC1B|+ߒ@mt<)Anl]i֞F795pYW4%Y.0G
-^3V"<?>9en4/9IJfd]Q^,XS:ZQ ʱy&?&R2>h&jCKA3y|^n(n'(!s$I2;X:ۺQv[EEh
-!ѺfځSܐWJQpCᚲ뚬`XE8汘0<c+t"{&$!DaP((Io2;i
-wxPZ0/:ZCdm{QƑJ5|Ht3ܣ]B1֚ĶY{<Z6-@C]O8>A`mR&nTNalk5/QVPrBGR2s#nw)G9OxྫiH.:s{3 <f6.Z/yv_ug鬛O*&.&儳5}?ʺd]V$BYW4ZtZ̚`$Ƴc{4qGIQѺ6KrvnZ<؆ #Q_slݺC8d]{alk6s,z&*#GƗ1=L";FȽH%Vy7G/kuni70DȜXuj(ݻa$y6-S-!D(;<B!Z(,:!h~ [(R=->uTѱ!D'@###]+:!hfY:zh !D3s1$ۻwo?B4W^`Yݿ={m6==}̙~0bnB*ZTٱ<xo=44ݽe˖7x?Ҏտlv8ddCɫNX3gxYCζI@pan˿o6>UBP(D
-BP+Dreob
-endstream
-endobj
-35 0 obj
-<</Type/Page/Parent 2 0 R/Resources<</Font<</F1 5 0 R/F2 12 0 R/F3 14 0 R/F4 19 0 R/F5 21 0 R/F6 26 0 R>>/ExtGState<</GS10 10 0 R/GS11 11 0 R>>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/MediaBox[ 0 0 595.32 841.92] /Contents 36 0 R/Group<</Type/Group/S/Transparency/CS/DeviceRGB>>/Tabs/S/StructParents 4>>
-endobj
-36 0 obj
-<</Filter/FlateDecode/Length 2614>>
-stream
-x\Ko61 `ŷ-
-7Q]Dڰ?"'PM#I}몹7$V.oQ;uJt|;9zxHGY"=
-;~\H9"_:+4Y=)E*أoAvGppn9 }.yנ6u
-7X %>|a\З/<G}'~Nqj})@pwaAFR5rAN{ʉ"mA .ɱ'9b|V22f4Wېj=ҽ
-}QF܅
-
-3Ш)* L&ylLQ'-g@cxn1ZآF/ƼJa.?V:Q`&}>Hyn$Bq〯`i<ʠ4b2`MqmpDtqkPŒjQF-[k2Z44i5w9MɤpM}MqzHSWpG^$k&\-[춞פ1آ6BeIapWHe&@_^j,TD"8'!r\ejJQB`R.6۰=F9-[hs^\|>ӑ";FtپRegɌ(]0cCj9"4yzb&jDueN
-馠Jy睉oEcfuDfs5Aз&9u#
-320cQQex!-
-B*a>c C*ՇT8(b̼o=3t@7"t
-C آ^\}sL|u?#,<8T7GVOz ¾;IT?U+&kRubr[>ڷx0kvGɿ|<9Fo0p&kdM
-2)u뱹?9O8o"bܾzWh7#f*r{%]G${2ү|6o
-|{XJ}na 2=k\MMm<r>}]{ܥrŀ}[P"}9tm*OlhQ3V!{}sTɨ[EY(joI1'W e_#QI&aW"5)`}@177r-F
-
-3Q,M}l{*dM}M<)wiI.B+E\T/!t0 ɾ &`ZBPH>$d՚\WCM[CFa}zp՝~ՖKg$nߖcsڄg7ZOPy
-8ڗ
-XBϕ*NP*u>S+4D}|!d"4$r-h6W)JR,@UDxó#=_0_שGX/UNf</57ў(u٘pΊ57tCX,Ϡ0`--`zWXO6DzʤObƯAj[
-endstream
-endobj
-37 0 obj
-<</Type/Page/Parent 2 0 R/Resources<</Font<</F5 21 0 R/F6 26 0 R/F1 5 0 R/F4 19 0 R/F2 12 0 R>>/ExtGState<</GS10 10 0 R/GS11 11 0 R>>/XObject<</Image39 39 0 R/Image40 40 0 R>>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/MediaBox[ 0 0 595.32 841.92] /Contents 38 0 R/Group<</Type/Group/S/Transparency/CS/DeviceRGB>>/Tabs/S/StructParents 1>>
-endobj
-38 0 obj
-<</Filter/FlateDecode/Length 855>>
-stream
-xWj1}_$`YCl!!ĴMvew%G4sfpsz
-tq^zy~:x:_yF ?SDp!Ͼ:Ƌ<84,S``8\єh'43
-V唅UI!aqwNC]"mϕ1K\ĵ`XB6_G%^gR)/G8Y=MY36&oE,\?Ǭ\zʹpiU[r\L-^KV{]VDx)J9u
-ԱhZyhڝq[S䄌.Fm7s[D2ԢR>-"Bm")^wB
-wbl>q9qǡJn~0ʈا awPb;|ZnٙWݻA뾏vǃvDthDU#K[-Ta2È(+|8b`_Uj5 VaX?,"zjI?έ
-EIEBhA>,,X(ֿ*a$RDڶJ_ojY. ow KA~5X4QF6M
-VE汌
-endstream
-endobj
-39 0 obj
-<</Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 5117>>
-stream
-xU|1ɼ-(lv0 #e\e\H"+DCn.1CLL1J~˱NUwuW~TSuWS;w?裏>SN8q^{>Or 3\6%l;Ş,m5#dhYxFu( !O("N!U̙3,d{ܹ{w9y믿Z}衇f͚uB:TVlW^y套^ڽ{wWWĉS!
-f![(>-6CJtp@UkYxG{6
-5h&BLD.]h)-Nb"@XWǴ,Ne7MD,e"dKWk_FvHK'p8J5W͙DS.pj:0tv8@F{&-掁y)|7姷.vdi]dqރs'xξSp<d0r:pMk3Z7Y-ܣh;u7oլ~Co}62/#YWt6mbݒ[l/H+:M5"FuE{nK+
-ahhH%Ac] Ո̒uEȺuEIuE'gqM:^(:[o5. DYwرm'aE9yGrBu.FhtRѽPtϟpW
-G;q+VrE!@˖-C#dkHcIEw5!`EkB!:>YW!rCB<u/
-!DNOlXtB)lQtB)ȺB'BIooowwwQ!D-mlKMmJQ(ByVM[Kav[ﴒD۾cσ fngVkvs.#ı.-D/Ĉbpp0u(YMCI"X8F^`>i)V*HggϴҁmMvYdva.{#ᯍCf+Hk|lŋ!QpE麟 XPĆd{Hi]wzOkOt7Jz}H
-GH nU)ԶVf}E#6"[#mQb`RQucpW@HޱuH40$LنqW0}l?`r1Mqxo]
-ֵݬ5p`غ()wAl6&0
-+D"5<+g
-|0rBVkl68弮?8<fwWT"a<0RmO
-X8bIB{1o]Oq.uZcHwWT"3%-s6Ck27ySϾx/+GBڵkaBg+o֭ȗ]" ןF=V7r_p~<BD,
-RBVo~XEXYvy.&nQ\Hu+B48gB4FuWͅDZWKB!Z+y"
-!DDZwu#Mu+/$!ho
-G!ڛ8B9B䉬+yiݞE#m+y"
-!DȺB'B䉬+y|
-6B7RBe]!(BN֝tvQ!DFQ!D
-!Dh^W!]fyQ<v|x=EG!Z%&6(Dے8x.lhӧϤ+C_m@g]X3GWv!%NM[4OoD;j } "ԌF-hgCPTj]<
-tnmY,Z[!=NuWjgXKa%+J;5ż.Rߒ`_u#Vo}>RF]-͓Xpce/l 2xIsq9`v]i6<=*tA뺭=/H)!ѺvbWyB0@(;8宀aϨ!jEg3h)k`+WVxq`@6b4.xIW\6-,cLpM@+s.,sR"U
-
-c\Ag.Vk8y"uj#WlVoq!KvGWD6ܬQSm)V#ٌ´kCpCg'Z78 #MqXքP!6jn~'EI(ܺmuQ;~s?9H\AK3v;Li]5܀u{NJ;HZc˺,V$YWֵ2y3J(͌h `xѺ.4kpmܲzƬ sR<8(z}=zg4QVu~KMF%Z(<h,W/)fBIz_L)#9C;t~=ڽ2#ae܅3(
-%ӆ_qp x_a<)}USM5FXGlM=
-/mIu6-36xwGthhVDDFFN?@`B=w"Ů^s,Κ[EXfUztjd(Ճ3Og_X\A%^PXf]h-Ɩ6מsTIQxjNkբUVtB4YWNkyW~Ⱥ<ش9'8hަ+љέB zkBt
-Pc|с!D_nܸe3oB?gΜٴiӖ-[N8Qt,B[P;._G!D;se/~37>\tDB9r={\r+_m/B.]:|Ν;ڵk탃6l>}_|QtB1HSHjfwo߾Q~;y=&7vww[nڵO<fMW/gN`υՋT*sRWȝ3yƒ>0c^eɕ9XOW̮T͘&ÿ#}s'ͮLZV$ΪTfaU.&_X~?VIh%˽)˲tĒCĎG%_te?$/J
-HSHu۶m@wϞ==]
-endstream
-endobj
-40 0 obj
-<</Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 5274>>
-stream
-xۏ՞_3 Ў>GE0!@<#!8@覡QAD/ЇIxN:"!<DxQ63_{XYeUTvjתZUk}jժ---~Ǐ;[ڡC/^Z0E{{oI`hsxxj`_6؛kעX8ϙ5kࡇ;*NpI'㎘aL:::P8,)WVNu,IL惃j`T\hQ;
-!cCm -0g<x"Nz?f!'N;}2*ܹsoIB!2@.]C,~G
-NZtBр@,d3ƒBFl!nahhH\!+{w7B4>ѣGosB4>syWBiӊD!֝5kֶm|'N|!DP=Μ95\100kݛnܹs??\"3H3g6nܘOU$Zw駟n192q|*o>u.^Xt̯nݺ}Qwnnp;Sy
-K___uQϟh6mڔ8+
-mmm
-M0a;St[«*guE!Æ&xgϞ--fӨryV~Y_H3suttc!gϞ(7(/?>]5N[Z`{7g$w}owMJb~-D¥Krh@KW!Zsc3*ߎ&Z7Tuj:EcѺ6Yʺ,fW$Ϻ/RhRuqXj.O>S"!###W_
--u⋪֗u}'Q7H3YwfW.x#4)uƂ/#s1croYWd᭻zФ$MҔׅry,-[|g:\͛ǨYToVJflC٬[(wIntuuAgv :2.*?/2YT϶lb/W,LRYOӠ]v&%˗9d?eKbӧOn3W<r2KдRcz&
-!<h.0#wazk\bwP!]`*ty`\[yW؇P106_!ylL.j$Cܛu?s#^oA===I gj|W0yu!a_zp`'%ѳKYMx_/a+ۺ-TáQꈮCבaF24B#@
-ͼ#|BGya`6FSIR9cUE٬;x\QC={&%GLtwXߧIq.HkeXڣ
-f:^ +c`leo &{Hx&eXo&.oNF ;}8.2C
-F\Frrp;G%º숚03Z-F,cSiOn]3ouĝR&<=8p暂C!K-s9i
-rrF>>!Bbr"GQ+wD3-aGh+rF}]@/v.MuEȺa:Cd]3h~n[wpĉ瞢[h.n9ם0aBIXQN}ќ9uEn8shl ݝ;w;x )WގJㄈcGMM!(wǎEG!BfAB<u"OܵkB4[n-:
-!hz{{e]!
-YW!]bEQ!D-EJBDк)ruPr3_!RLre'"4=aG"E.`SW\:08
- 5e) baK#^_!;&nEkGB&Yn퓎|BHHBDкoO,(ʕQVzQs[
--rP&<p+*Bwۺ?䕂A2Cd=f)(
-=PSs,FY0xG"ֵ'әa0-d6kL?6R%
-{D;$aD8du((uMvRƂni{_5& !ؼy8Vp054a耀Y-hpq];BwQ82b]{5/Xj_\bD% !uuں{FR3^Y:Dm]GQ$.ĕºrʍQ]oaKU5Zk$j_aDᶮ""[tW.@8a,cmwHͨog[9u[oI:L,7=\,/,0*79ˇeΚ=$e-!D=.#+ye%ZBa
-!D=nOO+ Ժ=
-G!(BtZ7?!H+y"
-!DȺB'QuJ!u"Od]!ȓߦɺBQu#MuY#F"OQBYW!Ĩomdo@Qk'qZQzq÷0ֺ~Afw:yTM캧Oq?g^,1o9&Бwh*Ǟ0;%rgXĵA9tUZC@
-<Sm5`)@DmYBΚ=$={:kȟ_~^((Z=|\Ւ|3Qt $診Ƹ.|1~yk8UHW
-B9ذ/)[7rd(6uGpuQapчXϗyY΄_Yf{xLq$ŖCTl8Yp2wG }JА o/
-
-pI
-tyIBAysaL5./GAUUly+bKn)yrs0.
-QruYa8
-l&_5f h9o*AQ8UB5Lh2*WbČgLgN9G64a`/hy
-}\QrT%Ae>Y YΗۺQa,LK1%l쑍'uMdLfk3I21f扽`9||xr`6^frlɒao~yH:rq\8*Wu+aݨEh')'uW[D:`W:Yp4Z:*G%%!h]{~QqcB0 OIQPP
-i}G|rt"**bLrTT
-nvcKqXw8fPu쯼LQr'boIIĮOrgJOKbx{N~Vfsrr
-V8RY7x*vUefeۓK]k?ie=(ɈcBa}V;`7U(h{ڂ,(|[JO:
-q\QaP2TbW#Z=«dT.2,Z70j*v,V\<aŮ}]yU<VniJD)
-6aC/9}ïɠgz\}*zºUXG|UtVW`4ˊ(]۴*m{2D1|~(Iw14i}w&yfbv|/D+(t`gS_O^2a=[Pr]P*j!E{b2:_Q;yi,s 5G(
-nV
-Qf(M+5YW4'fo(w֭5V%njΚ=GEG!7D!o#N<^t,B:ujǎ-eE"sξ3/:!hd.\m6(?=uy !D#/;00088/T_]t\Bh?=ܾ}ܡ_V=32=s\a
-!ĵ7|sɑu{?p{Y-cWo|z{{?{u3<?W.|zϋ{:}\p.~ւ'L}%k,w,`5`ҩN]ʂ5dֹShZpfjVj{k[u5gk)WySNY}i7ʔ?-jk_D=ychƊk]2V'cqt8Yį*o'\~ƍ!Uu@h
-endstream
-endobj
-41 0 obj
-<</Type/Page/Parent 2 0 R/Resources<</Font<</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>>/ExtGState<</GS10 10 0 R/GS11 11 0 R>>/XObject<</Image43 43 0 R/Image44 44 0 R>>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/MediaBox[ 0 0 595.32 841.92] /Contents 42 0 R/Group<</Type/Group/S/Transparency/CS/DeviceRGB>>/Tabs/S/StructParents 2>>
-endobj
-42 0 obj
-<</Filter/FlateDecode/Length 3198>>
-stream
-x][ܶ~_`-A6Z nM(4mx$J|wn$5/}ϟo>|~o4ְjTDJFF>/
-=kJ6N(Q=}ӿçůD=J?y#S Cڃ|
-GWe@Aqwwj΄sͽL76$I2]^<
-~wo=
-&Q
-Kg?<D&<]'IMT#6swToZ\{ͧ7Q<|qw`^^=djaI!:֟=ۛ(<xnaLDj3^%U"mhccZUiv)AMd|t/H9Apj1
-DFT_+I9ft@"8GËls9Om4>h~rIJ'}yqcDɯpE
-p_f/OQۉ:aЊp[)DTbd/}Pc<fOg"m2RҹB1y`4Xxot8G^%ga.k?`lWYw#Iby..vwcO]9L~l<ؕ_z=2sGLQ_zus,J0(`| s\9WfXWr/L3ǛŝϑI9g3"0Mb
-)k ƪ;M3;NwlLU6%Sa5fEC/DS(b2;)21?|%|T@rT+IM"RJ
-QlMjYQ#%2xC0csզ;CKcAYDfI]0]Qakp^&P#Ef#Cfcoa-⌻6%gq0@UTW8H]a_d)UbshQN>=0#<m6VaW0Y;}~JwHvO}<49dA_]c#nQMFNBOcFZv
-~FQYΕzC]Я$Һ](* Ua.ʙG锰azn1#jܔXVPY+=
-V1jH>gr;X+~6fqW)V}l:Lk;RϫZgjjqyRV$SZ9j!I[R;S,%">damZq.l BOǽqȅq/zacF C?rU#APHF41PV26d-lOdK$wyM9\}Bfj+-6lEJJ) Va%[ikV*،2"VA%[ZJBe+>.[a9J gP1A@Uf<ZEVٸ(Bs:j)!R6f1\ϩREMUT 4&N%=Ko2ɳUz>_]nRAlU*aKvZl6'P>Ȗ*$BT^Vي&jR*[a%BrkԘl-Va/X]HI"`]&qMVۅUX`enXPي+V|X@+=P"@uZZu0 L'do%`vYx;_@X-MSЍPYen
-s }RJjTwKIqVamdaXnVيJ*MR*[a%ֵ'䓣m;!Ş˻
-lkO/]Q-[7p];y[(0_Qី$w\:|,NneUO&>f]V,VP=>)JV+@P]*saG)fKOwpSDIbJI VrMam$1ka{'f94O>m8maFjkBiBR1Jֆ1C<nWX-pWB.%Vbu{X^iX==_W.}Yz|':P9_RFpx}9!զr*L<Y/?eͨpWÄ`gR{xR<V{X"knVيJTak) [JlŇfw;Pٝ6fw
-a]'%wS1i/-(P$a5YisX,`hI
-$TUnw
-_Prna%Vr+ojW!d\˽.ܟ kYIt-`EVt-`EVp-=P Up-=`
-`
-=P &PUa{WYvk9K@q-']`p+.b8*.g5aϭLuw,ז>Za%0vV}\)blvZIBe+>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-TQ0N|+cO+:ŗ
-iPM|4.y~@@0iw4Q.$-D_ʏɶ
-endstream
-endobj
-43 0 obj
-<</Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 4896>>
-stream
-xպ?`r>\L<4$c6mv<f#1lG8s830#Q%4(*_LL=Fi oUΤ.֯ZUsر?ѣGyw8+LNNرcbbb={pzOzjrFFFg8z@wlSrvjKvҌz2PÛ7om\K/MMMk7Lo&#s=,#"rݻw>|O>O?s(W[w-B4zkGGǁ>cwƌW_}ܹsK!/=̜舄A;99yуXpYrC&&&뮢cBgҥ?~ѱ!D`}mٲ@Uؽ{͛dɒ_رc_
-B;}hڵkӦMuӧO㏿KIDN<~|Nu!;wy뭷~碻hN~駩ٳgsQ8~붷;w)~-s^buq,Sٳ-Ho暗)D,۷o]UxsguE!x;k֬E/uE!Q7SNEp ryn2==(HN>OVL,JWml̙EwDB;wkMwCmX`or>fbQ}@3FcQI+9YKwCmX<jٺs*Q`ll,GXuj;EsѺvYai(qL]s֍FpuQ<+`THtQwܙ/Z_
--7Ⱥ"m{.utP.x
-i-<sUWcTXQf͚5EYo\fQnp3Ei4vasEobiooN9v :ĉSSS_.-2zBS&rK
-fݏ>˝&2Q%
-eݚMr~s,u/\aL".[BPH.^"d99XH)i0S-_t|-SMA\U6L3*wa *
-L֡rI{+c+&utgalh[y6K!Zgvrrҿyl_x1urW^(uyO|Va`{t!a|]zpLG!%^3,9&k]zJ/9*(;[.Xg2-P
-
-q+LsK͘J.0Mh]X(uD!uvHf0ɮ9HrM3zVcYeq6ĺ# $1VKҒ9V\FKrE
-r~1uϗ&.oE1tާƚ\)ZY729ֺBCr`֭xQy,xк`^T (˸nyR7uyqjC%lWp]dC
-&.ܺ\8Q.Q{\;
-,+-^iC\rP>8
-7P,=јG<%]X
-S4ܺؑou;-<GbypֆsYe0r8pMk3Z7Y-h*[#BuE\WeBɺ"gd]
-˺AuE+-!DNȺB'B ]tB*t):
-!hBVaÆ
-}}}EG!B_BVAB<(:zlyƏPQ[.x
-n-CXjlj|5H_}u鵋 oṉh%wCk{H
-qкw-a$kf'j_
-4!KBhIr)310
-W4 dY7
-ɽnZ!l`ctWMh̔|نĮX>,`A6 Ͽ/_?kVr[||lŋ!QّP
-bkUMkCFnFՒк
-r{ .r)/ZVOK`0*j[ŴʖWT0b[#@u1=>~R0HB[pZ][L3 X!DlN
-w,"0-dF]C `ykRpEiXi0To]ֈ@
-5d؝Joo=Y?PJjFÈS`뺻pWyCW~0+Dj`ݹgEe]䜘,+K'} #օRXrsWyC10y~hV~/YzV^tjLt2ڗ'BQk)"XnJreƆjkb"I8_&0ֽVuSέ(:Sb/c0*?9˛e{}?ĺcFnm}Ee@M=0.TZg+w-;An>3QgxCWS oBn~|9@5TOy2r4!RpL`fuBCB<BԃP !Du"Od]!ȓPnܸQBze]PH<BȺB'Q*"!hrd]!YW!$Ժ]eG!YW!DB<u"O;B47]P!!Ds|.Zuʋ#MfhݕB ~(Uu"O`ݥmEG!iBsպ&9>N#}hzdt(j7!^?pl*T(H
-hϺ<!n:~|թ.Z'1ǖ%woy#Kf
-Ԏ@W|(
-kroR/>ΰyFuŕEWWWNlޘƫ~T!Xb[v@-a
-0p``ux.lp~UBa;DTdl.!ԛ3%4@I:^5?T6pM@&<X3^vY<h5Xc'[Z`9·}G3>ђU(˕Q NM<#A;焆 h[9A5[FTlm%4H}-lnn(!DF-"]eC.H7Zb(
-L= N{#㬦d\
-Dh$X0yvkCSD?@zPNjG,Uc]L3NJnِlx[_d4R"s@Y$&{kBRE;)_
-eո!l^5=VV=:Fxę&.k wN<th"٭ko]GiGd]&7)]a`/GҺP]BI2g+kwCnNg)
-CG<bhX5uձS7upB_[^§\w@2UnPL6V=V21[ƫlT}YY7@uS/ϰ%ԺvnTe]k+n(!D]k3xv4HQ,WpѺ.I`,+r^j<ꑶTIq-&&
-xig&nf;^M{7blw[YNZi|EmX{kw6S;\
-nTK[f|8^n-!D(B
-Pnwww}Wt B@PgeV!@Ç.:!h~y(wttٳE#4BcccCCC{-:"!hfۇDw||_ܺuk__7B4gΜ`Yݾ}mFFF;;;?B\@)
-@ccc;v@;::e˖ׯ]g}r5^zyıq<VOl+BC?2l{~
-o-endstream
-endobj
-44 0 obj
-<</Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 4769>>
-stream
-xۏELbKb`1'7kxe](ganABH$Q21jĄ1ᗲ/}39u>]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
-
-&(6 |dd(zg}yYWTǺs}뭷nW8|0\_MΜ9Su[ɓ'Qʬnm_H*3sέ]6+/OqlҜ9snx_C֭-]w]H*3~7vevbXիI$
-.]TB
--Y裏TS8{sVк|M[˺!A+ʌn֝Mŕ~>6)u3>k֬{S\B7t+l>źYRP.x2Oݼ˗[xfٸ<
-?֭[WUojfEe\):NݬmjNohځؓ'O9r/UM(^^er+U3~駛7ov-VLIiP5kb2Zʕ+FKre.."K,a_B[4m$-4̒
-[AWSh0[m\rce c9+al([<m[$vo澝MxCroѺve>0=
-^({GRb%Z[m%2A+qfŕ-F#]GjTF#+M,WkweH܋Xi8{ź3vbje'c
-m$KƝˍ\kYw5J@ñI٭{93ŵnVⰞ}J !al
-"ucɩug3,L/x݈>+"Z,1l۶
-ؤ"-I,Ԧ((JFp]dS
-&.C3?u9qң`]vDq-7gYj"N`IpvoVD٨u,۩oIǮLkv
-F
-,my)z7g.d7ֺHA)CτÙX/.\]2L3fwprA>!J(bz~#yD);uc:7%V[A0vTd]nM-6k8)2"^`, 6iYW4u?}d]Q ^`4 6I%#^`dddI(YWnl_wywygխP7|sM@Iܹs<c%sv!'j]rQ1:|խPNBwWf$`mݶzj)WTĻrJTBƿ40[uSB^ݺukQ!D044$
-!DiȺBQ&B ;88XuB+@UG!¦MB!zYW!Jc8(WrGGGB!zMQtG\xˢQ%u^Z-cSs~6>ѹ`>VVQt;&v?#!IOYKEmĚd..\j;fٲ8IǪ<$BOYo!^lh!
-CbѺ9ruPe6}y`o A>0&Edwo<b;b\D'F\$._{G#/Sf+{k.X/·"D#wA!Qu%P˄3ulIpѺ6TLp%ZW+Pgc%E#4b3[yDy` ,"]Xg"պǿOFYgI&aZvLC~~kV枕"e0ߺ<#pׄ2t
-qo]^I
-!
-3Q͆FM;!`
-8F# OEݸǺxАg1;ɺsbX,L差'$[va]ݸJuMzlL\
-u+uh-7Iұ<Ho]"[W[
-Tf Rmq9 ]>^u壞ν(:oGeEұ<&Ǔ!xyޥ=Nx2--u[\l=Պ{{x4?a~rr[B'}r,Sv@J@heuB#Ѻ+7UB4$.{R_BkJBf#
-!DȺBQ&ݲe+ ɺxȺBQ&Iݼys!DÑuLd]!(Xn"!h8B+e"
-!DȺBQ&BIr*G!MuWɺBb3;{'+G!z+VUB
-B 0!DITB
-P_u$zY7wM]u3C?EXb]+q"UG!f63f{m>}l7i#Z73ܰxɽH߾MX=gYrF>B2XD^<X$K'v/ʺ8MCKA]4ҽxrQR۰gٶ%Rau
-Kq۳tD\9w]VoUv;r}]\2&t*(ٺw[Wlxg]^yY
-d]QXm
-fc[S\( _;rԒ\7["QdxI NĒE㞂(d8:.
-\%rCG=a%&"g8XJ-ɐ)(p`$[X'>ٔUlM=J_4ֵ?Mjo75j;)2[:]C1KI-(K
--8"F_+DAȺ,+9y~V,)Oēaxs7*^kv]ܤDD(n]{:*d|}DRi?
-:f#u[<L0v!ꉶuqRk-nƹJ[rrYr}!jV5tcl乭4Й[v.t&Q6bp+|Moa6^Pbk-2[8wAֵ:[3n=57x-7->-rFs1v.MʰumTйegF(-hCG
-
-kx5h]oE+ȺBQ&B e˖g+
-!D,[B!z(wpp:!h>-;::zD7[!d;66m۶ǏWB4{ʝpB!Df![(w]:"!h2BGw/Ν;!o긄i?f![(wϞ=/;FFFB
-D
-BP(4k{۷=މ^xa|||ppƍ6lxꩧg֧o/+zYiD*//b<"`e{KjCfo~/J
-HSHj`хlm>
-endstream
-endobj
-45 0 obj
-<</Type/Page/Parent 2 0 R/Resources<</Font<</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>>/ExtGState<</GS10 10 0 R/GS11 11 0 R>>/XObject<</Image47 47 0 R/Image48 48 0 R>>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/MediaBox[ 0 0 595.32 841.92] /Contents 46 0 R/Group<</Type/Group/S/Transparency/CS/DeviceRGB>>/Tabs/S/StructParents 3>>
-endobj
-46 0 obj
-<</Filter/FlateDecode/Length 2588>>
-stream
-x\[~ЏÁs8dC;acl:f!?Ut}d5ggNTT*{_oN/>~wp:?k
-蠜"V2ۛ0|9?ݧ,J6N(Q=
-soo~yPRG᳇N=Ewɇp*-s{oCQkh/;IQ*ջsxI?
-I{JDź4/c}*Nޖ;n%@
-͘/ca"GxqM(mw6Ӊ&lMS"(#T\u-Kb$-7p'[
-
-
-rpoQAk?6Ω8rJ8-Gp2(9(>pݗ?R#.P3[nDfKŤAj!'Ъϳ$fIK4%BQeǍ!Hjsf~b6pMgBU=q-/@uڸ 5DڰsjjM3WMEXXNdRЦPSm:.ĊѦ"2mDWdi[]6h1a -cٕFI\2čiSXDžVXo[U mcQQS[H"fCعHa~XfE(qkם搞
-NTSm:&Gq\/_N}h19*%z!`M:miAjMm
-5ѦcrT*C6k/xϕC NQm
-5ѦcVTbzB:aPj3[ǬEV+F:f%D\1_wʝR9Jvc*ed*jLdȮgZ<!i0E'
-p09щt{dgm656vgSjJocf$דd,t8vŘBZ,!:
-uD|%Z&z'rrZBV;tkP%?6^<d:yE9
-BܶyZf)1gS7,$5YcIHڙ361#',2J8gRR%:&rgD9%63uLFњtW); .B<&9e|m(|Dv748W$SL8CiW'XY|zӰA:;Єo$xh1ií!.#'-F3([q%@[
-~BRdD7e(w+㓙IM[f0K8=pq9f!{.+xfEOj21{Ǖ zyM|eNs^AWXL1%'A=CIM]Rfls
->$z^HN[pRaZ"jGg>_6Ъ, L:}(ajwMdǫ(ߙ-{tFnM52|6Khc\b#8
-.-^m%Q|^-endstream
-endobj
-47 0 obj
-<</Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 5212>>
-stream
-xUHhO<Q4Ig|A8sLM7&v-
-=!"%-~15h!c<X.֮ڻjw痝mVZzkU}ÿ/֯}ڋGҥ=]Nv>p|;YK|]<:q,%7n6;6]=6k;zhƵ7dcXDPag
-t1dT+(NĪ|m5#hExMrLg};qċ/sssgϞ?#|cn͛7w}z
-!HSH>s4K=}-^WVBԍ+Wڵ륗^z ^|C(:.!3,d~#B:@Oys!DlSN{U"r{{{E!d9r@[r}\n/;|"DЄpwᄏ-\N禛nڵkŋ>0hH_KiBt
-Pn__{W^yᆱzߞ<yr4x!*=xc+WT5Eo^ZZܩڵk6N)˗W^hHoSL܉*WEsΒd]Q C-[/WEp 42+*M/\Pu_¹sln2;;)H.^ux9
-QoO>du,YRuG]ĕ+W.]CX`;3^BT W_EěX;99Xcݟ9D0O?.+-_>U__11-"
-:̺V,-ӬX'[-p)xë͚XUcQna}wDaDtu[4퉐*O^v0US6;w)"f'OD_^(AF~"L( n
-XaW yb(4<T.v932Ӕ0gX7!i
-n$r:y"+iֺh@~̸u?c#^Lrrcs]>Sz*U7l^]uaBU<xGϔ2Ex_/a)ۺ-(͂ॡrxܒ_Iۊ庉RLw=9:THFtʹ]h\yl0/O~O"T[dy!x6>Gdõ4뮘+Z;0>Xoݫ!a0)Iw}i86R7$99#dA&&gZU0ӋbLsuc]{IYvuWЕaAB
-0$֛>ͩ"(asar52UĺX9A źLD9W\{6aGh9cN8)DD:ӺBXw@۪`ʴ(|h<_-Od]
-$V- zn[MYWTBJuE(-;>>n{衇\Q -[mD,CjB-@UG!hHQ!D
-!D
-!Di4BnaDBu4d]!(FHQ!Dhluʱ§@Z-P 2Uu ͱfYד Jض#c3>5 B?mI0>ú8_88'Rb|U]¾m]T79e+̂X_bg.s,A;N;so#tɲxwh9\!
-;P`NwonLe2Hk{h0`l;p`N܌XɊl$iafwxKqf/baI.a_c;^8ZåO~Pc_af_㸷;Ƕ6.>+;P`_61p9?֜8{2`O陥%Nt46G݁G>3DoֵKKr!4-nt͂ih6v&ƖcSy9vߤi0_ȶ#x76kVF~G{#H/3p6;0OFvp0gcDxt$߈?_+rK=Ggk&ݱshԎF"n&^|ʽUu0 H
-H['~ >HN3R9# #M#~<}^Uu PcM;'B1|,m[n:HM,Y:Ne;kv:u܍c9ZnoI'D0hu3o)luz0lfl3Kۖ#BwaH#_nh ;0t8N;ۨ/2tvxڃ#uG{0M0x4Ƥ|UjHӺuZu`K[>f9onoڶm̧iIY`P1Nσai0l(ҟ T袙>Ri;#Lkl}CO|o@Aǵkq,̜q-K/ӃxdpoaXۺ|ʕx*=rک#Gc#ܘis<6uM35}Coe^h!rFUՏk!L늅a:KS <@ᅮc+m.:/n3g&KHPU(\r7DIPH%Qܮ6ƏEd]!(YW!$Ѻ{uYTBYW!$ͺU#5GB2uL;RE8BQsd]!(YW!DB2uLd]!(ݽ{w%!DI*e]!h2+e;([uLd]!(YW!DB2)ߺڴ7ܢWO?"$|~e#/B'Ӻ430U-vuxf{6];6s;к~za_v`~"u`.1
-C;|_D6ȟ5.`r˧Ӭҷ/C
-ѢqڀB|ˎL5̺\PriHjSi`"W!D>|z<2g2BuY,v8-0`Y*Xð<bs
-#1{wA c]˱!ܼqJ8xp?yF:m !ӺdЌu1
-qK;,Bd=|e
-b( 'kaanM
-r%F@MNM$Cdln1M÷G8>V+ȍuP0uXN%]ؙcZ[݁HEd['WGN`-mb[7>IPy0ax&6{qHJ ̫[)Z[ބ=Ä9#{/uiN32#C
-9
-1o
-Q2KVL.:xrffuu
-4?mbq"OFvly'PQ
-j&fƺFwSֵo)MaHܻLCf;h\0706^AS#8?TbH%ӔuǨy/8,y|kf gU|e<"iO`vXBF BFq4>·^KI[}J9G|X!ʧ)23OQNZu͛W9؛Ü\gc|˦o"owi3Yx>|,69Gc=4!EZeDޘBt!nip~'BdvY볖 X@{::`OHQ!D-
-}U"rM!h;ؙ3gE!믿NMM
-_|p@-{ǏWBԙSO=u}Ayq !DݸtBP#G:499ݻw}U):TF>|駟~gNMM8p`ttthhh];vxz=۳Vlvs?YNQ'dP;*Ɩbl^"<eP=$#Qf7tbzd/J
-HSHj`BP-endstream
-endobj
-48 0 obj
-<</Type/XObject/Subtype/Image/Width 466/Height 115/ColorSpace/DeviceRGB/BitsPerComponent 8/Interpolate false/Filter/FlateDecode/Length 5422>>
-stream
-xUEH&YhK\12kdqB2.Cuxh7miy٨QQP| dlLL{rwOR:uϹ˽''7VթV|NSN}G|ɓ'yW^y_<zC6o80=v+{se9001wܧC
-
-=UfٲeD!ټy-ʬZ
-YE2DKӜu]{CZ[n< BFpd4<#1ͅ;Zz!+;p{6)6+drJ|clۃ($ضmn+.[{c#h<
- $e>|<a88ҾHlYvd#O;nڲ??ܿQa#$|ۑ@"=r
-QӦMc_HhѢnmB@H!UH+g K/wYBh@Z!ӧO?}d?v-BR]Bȴ=Ȓzޯ\!)f:_N8rʢBgV/?hѢmB>|v,!Dz]8phCYXĄOʅ˧NL8q⩧kÅ7oٷo;7y
, toܹst!$֝_1?>k֬|:>;ttt\|)yӦMy!%.4A)K.͛7QkqUSDg"wYps^gBp̙3_{Ǣh^xt<;TW0ldM7tǢhΞ=.g-
k
-#QS3f=Eqo1]7NTn{p"*OK|M@x#]룺k# /Ø
--فAfM2F5ꖦ":Sݏ?>LcRݪM궴DFyիWeeQݳgE:͟?1O`h#
-_RR(|bTEqC!D,Ua5-,uA4Ƨ%s^
-\zSS+U&^)wGu%ᜆST FJ&`x̨DյWvW7kQ_e:T]Z&EBD0::Qu#uKN],P(f䚧Yj0bK4ZYTs14QQ]:LlQYȵkg?WW0⌔p@ ̶'S+Duɨ]imWF5_`qVtloӘ S.N̻"V]㊇2b[Z.eͼMkU7Y-T߾fI(o[[:!{o7fT&Th+YظqTW!rLV!D B<^h+Yhkk۱cGV!D+B܀vvvmB4pt!E[!͂T9rXGW/
-˦[M|m"===
-hkunV$%Kr
-/@u',z`pۋDSƑc?p&ƛHvZyYׅx^M(" [xX5E%ǑO"
-͛*<y+e_.T]t<@O̙}'evʺ.T#+\YcoTu{+XІHꇇd\jGcgVt-VT)rzRuчqaDbUaƑ}#$HAU1TݼWiz{,on&;"
-,+{i08j!B>a,mF$ڳ]̛!5xHMx+Cq}Vn
-
-y#fUGuoVhu6Á-tu*nA6.IT]{y!'K7JSˀĄ85t^U*&sl&6wYqpx-#3L5x7^_uoe928E_0gr4G:}y48:v@'I\_e \u-Uۤt
-AS-uTnOAP$$F)<k2&XRh^9:R^*#R).]GԪ748'yŕV]HuS_6U[Y5;vfsŨno}Ŏ氰TMl^"WhYtQ/eS]=*fqe9,t(%
-CwCpR붰+\cxaf8⚗.XP&|08\#%P
-g_=\)T݁nYN?9N`OW~pN/no\YpVķi6TjQ/Yơgai3
-
-w6~]'W-pKeߖM#\ma\gsX3*}Ӽ]\z5>8lΤ.[:\ D'3lꖜ;R4Tj-MV[q21F»ܘZĹ%g&α@>A\gg8Ts,yS\ߦZ&zaKE uQ!S}EF26V;>1us5㬿qU=B4x(嬹Y
-Q#rC_ AB'q^=BDmܿBH.S=BHu"OTw#MرC+@+y===R]!R]!BTW!D+y"B<>P'|{oR]!]+y-Bܐ
-!DHu"OB'R]!ȓUmͳD7o9dr7TtIT]ޱ ~@RXW'a̼:zQ#GUty矟ߴy+jdnyĠ*Ds_" o_Lu!P0&ԛB`lcSCxKkVmMB䀏r SLuayT]"lqѮ,/0Om͍wTVuHY*0gJS@zѶ#L(H
-ayXA
-3Dqv=pQ¨.jpɻjLvA2e|PodB,;@"<U"YDuq!-2CvQ/@!̠U!\d,n
-3I'Q<EE솢GQcC`m]k>,1E!rSuKe.3O
-7;
-c{zTg"Pʬ{n@l
-4*H(a<O\XFlW>tۏ<I௺kͮvvbXR*ZaO)<0B̂]t`I;!f
-,B<e^&+jF.x
-e&1WDøyuفfvƿi+*wԬKdyg0pQqqj{]Sl
-WPPݸ%B^b5+Z%c\CE+Hi4?*jyAHu9'5GLB5/7q0/4^$mZd|
-Fu)(Q۲[4ĸfׇ]boXMdb^ϱKSXمyR҅3k\&qV]uj]RG~V}瘽4j3{s\kjaR[[n;]<
-\@|l ![eЛhfɑ֚7ޜ_UeQ[6M`ǎR]!
-W_}U!B|===|IѶ!Ds̙I_!jo=44xb!D#s%xcccý<L !D#sѝٵkWwwcǾˢBFŋٳ;00sNhӧA!2!BT!ؽ{۷wlooߺu-[v-dIs_xI&,l[1kh[?߷dM}$mX}ݒYxu=$q Q0tb%:ITB<!R)D
-;11qСk,
-endstream
-endobj
-49 0 obj
-<</Author(Amit Dutta) /Creator(-endobj
-57 0 obj
-<</Type/ObjStm/N 216/First 1899/Filter/FlateDecode/Length 2566>>
-stream
-xn;L~ aXBB$!sűǖDYxT#g.%-T$dAKSER RkRT[R^=e)AԨdfKj$::ZOitI.]YzaQZ*>RIiW$i$9ӎ(a(R8]-zҎzKv\Π
-``Z, 8˰`A;1ZXWPTcsf,Ռ;;6KN+ŸzٱFHRt18nA݇taqbYd3RT'Ud]*
-DÈ-W֞\^lb9lXRc,CY->-4;dPo.b{OBKն6r*7<n2T1AAFQlϥ*;BmCSP
-#Nc/(\;KYj!^!3oJS3:Uڕn1dK7iWF1lk7_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+ۜ",H $DPG@D@D@D@"4BF!B#Dh"=D_Λ`ˏm@i["dByχ|J|Z|FdBY_9E`
-A"<HezD@D@D@D!B#Dh"4BF!"G"r-=e{>/gkpxj}mmϕXɳiu:d6ӯl{2cυ`5}ec%k3UTSO>UTSeL1UTSeL1UTSeL1U!يVoۋۉDžDžׁ׃eˮ]/^vzeˮW\^qzT{"d䊣+ή=2[4ۃ u=Zlqg[nq[pqšXdqQ~fqyZhqřZjqŹs
-5k8p\ùs
-zz9s9`l]?8p|
-7o8Г|
-7o8p|
-7o8p|
-7o8p|
-7o8p|
-7oxycfr8wO_ߤFiXϡ<en}hT\'j]#{7Oiqf.<po?gg}o}8>&yrpz症W.]^W٥٫'rYvl/^nַѻSQL'*`O>r{_>o?zvY:ߟdqΗӹѭ˭1>{|=sfgyy!?CΡz>|+cum'њ
-endstream
-endobj
-110 0 obj
-<</O/Layout/Placement/Block/BBox 111 0 R>>
-endobj
-111 0 obj
-[ 73.5 150.39 324.73 212.39]
-endobj
-114 0 obj
-<</O/Layout/Placement/Block/BBox 115 0 R>>
-endobj
-115 0 obj
-[ 73.5 83.456 324.65 145.4]
-endobj
-178 0 obj
-<</O/Layout/Placement/Block/BBox 179 0 R>>
-endobj
-179 0 obj
-[ 73.5 533.84 326.15 596.14]
-endobj
-181 0 obj
-<</O/Layout/Placement/Block/BBox 182 0 R>>
-endobj
-182 0 obj
-[ 72 602.09 323.24 664.09]
-endobj
-224 0 obj
-<</O/Layout/Placement/Block/BBox 225 0 R>>
-endobj
-225 0 obj
-[ 73.5 145.23 326.15 207.58]
-endobj
-228 0 obj
-<</O/Layout/Placement/Block/BBox 229 0 R>>
-endobj
-229 0 obj
-[ 73.5 74.094 327.6 136.79]
-endobj
-277 0 obj
-<</O/Layout/Placement/Block/BBox 278 0 R>>
-endobj
-278 0 obj
-[ 72 151.48 318.55 212.28]
-endobj
-281 0 obj
-<</O/Layout/Placement/Block/BBox 282 0 R>>
-endobj
-282 0 obj
-[ 72 84.443 318.25 145.19]
-endobj
-283 0 obj
-<</Filter/FlateDecode/Length 333>>
-stream
-xRn CdvJ4i$P~
-".3hSl%-MKJ軃kK%)_VE\PMGfjx@ћ`צtyyZPX@^*Z#OK;4`8;8Jeĭg;rJܜOߕhЄPSQg'#^c1N|/}`q(nC9דnPiH.B.a4hѓU #L>,ߢIKQz'co[i(|XҫN㓍:qV__*89Twzd9
-endstream
-endobj
-284 0 obj
-<</Filter/FlateDecode/Length 25607/Length1 68972>>
-stream
-x} xTE{{IowI': fe
-aİIXG2h1o\Fu
-b"Q|:
-3h}*~n͇~yͩSUԩSN-! -XI[bnYluN_Rwn\m-薡^T k9`XWCH
-/E.c N*0eۡZHiE2$עZ==[e|a`-):>H(OH!NSJR4ONa)*)IW]-P|юi]D1 $Um/4OExmXLv.+>ߡ1=K"D {C{oQ>5@O ګC oF @"D @"D @"D!g @7C(
- Ŀ!~}[s5`m02{X\%G_} ;r?jj(<I 0a~n$\./I)tF+e!Vm{IJ 7?9Z"hGFECR1G#D `:-g9{,sd (PUz
-|hb4]o/:
-ov90F-`Ű?-=L&j=P$B+oi3vx߆Q?yT~͌{a`W;pu?pʕӧeGQ:|XIqgHa<wlWV3a$'%&X-d6DuZ(0J Y]>rhcU2~O_))d$尤|QHQ0*?^_vdov6}jޫԼ6$UgjUnCTj^T~tG0k?Mʈ 5#)h?Y]OrVs,e~rCMuј'UsݪT5U~ڍ}>
-n# l;zsnˬ?ki}Xo?aͩKETnj|97u$ηbgf˹66lKj}ĺvnjlMإ*<y^[`띕ζ>N?LYP=\ctS-թݱ9euOlO-Y623.Ԝ*suS.zp0 9vcΓyáspCh$?gd__Fz/fIN{9p}veM@&K:<b!BvssyhpN2\*@9%;tԣo[G>dpS܍~qsωK]q~Yi'=/̯<^mݴ+Ja?ЁMa*rEa^hYQzn@èTk/Ɔ(lTrـ+#(_a^t'C63
-^-@N{m%K=,ew.h 862Be:[&NٰG=i
-%W؝=vtZky%/yBu|C
-jZ .:)ܑKHSzN@suair$55\"k̇h&ѭ6!X!Fa>GfhS%&=9vBЁHi9b3"SS`Un,H
-a Lϣx(
-
-֞DtpEY$W\YUR_\Ƅk{k*e#lX#ʈ; jz v!#މ$U)Ic jjtLB&hAXdۃJXOj)qV3ȣ2T~<laQST(Ù|ω(4"@ x=Q[9e`&ײ=R,{1Bb_A="?^D
-K9XHQ|?wvD<ʟ;b",#r=1\G٢;3=R"`c!MG*R<
-U;1KQ[=րRT?)p?Rrr=QIVYΖf>})Rg?-X:R 6~v zFOWE40H`w
-*~: yCۨz/U/Nz&Oo=#=W=p;Ssqj>G+>?և>)`ǡ
-]0/
-zpa?dk>u=zlbQ^I?W}PzSx+htMkgl
-/`ݬ6D[<qaq w"A<(44hFd(^c2{L8TdǪe6f%%@>_g4Jm>V3MT
-
-')&j%&I*p\UDY%ժ[љjd= uE0a85p鑬sG|i!b=ĬpB3հ!Px'ēZCX_=0B-NWN:O:Qt<db5DMȦLǙW2f4#C2rr0>a|*xWqVqrqBWv044UNۍڍe7>l76ڍ#(Ng<?UӒ犍bcZq/Eߐk3QJ#RrlW u(,$I❂$Y.CxU詙tFM[iن0)!R[\'o4$_+HPZy7h+Ei}Փ?CWK>}i@s.(#YXp
-ƑJn'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"[wQ7erbZb2ngٶOݶ(zN)ۭ䢄bu`Aj[ gǛnFm;[U
-ta3Ŷ#'@ :v_SW@ErW66Vb(f[fkϹζ w`;ֆk֒{WZ|]k%Z+Sc[jdsZ0҃M>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"U,u\E=.vyTK0a/8;@%~+lm\4e#̫hDzFDsCo_Ֆmw߰jKo6N[W9UopVۻG7\٣P3AWG8[{&nn
-WQ+*쥜=5QU77t렲jVPC_2^j/SHG⺔`p7~#"gWWp.i2XF:R, -JXX3#X}|ya
-wG[JbrvV^;,U
-^oMq9n>qe?^4E~=e-Iߋ7#'zˎ,c#ޓ({YolF^zVnV777,W+T զnT})<\6 .WtGעr-lSݐzBpN7,/{ýp-Pz-zfd&6
-XðN[I |Paђ6vpˡ# è3jC$Ԇ!E-=s`=Ս:cNx^)j%`yh":pC
-t~{ 88"9Ne7Q_2tz\8Bu!."kt2f9A-: Gqjc=B7І=pDOI,"2Gv%4
-l6)Z&-Ͱ |
-}$[`rRO0f{YWxZxI8/ZėoOB} EI!i4I+YK=QM^%G'4&;tWzai,UmѶO!w(z0vOTrZ8.~>0N)8s
-`4%EIIni ? .yKNh4',~Fϳ(dFS;ZxFsJ;tA| Tȋ5WsqR|*h
-zA>B^|3q!H(ΧHtm/ęhy8&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؉>|}ncr0n.<_ÿ=Nvcܭ#dP_I5tf29*Wd;ؿL$RLlBPH7pK0j?\2q=f
-'qW3Aݹ'p vb$.O5^|Sl;a/,8!+?lCܟRI1jZqЇPl23C'p/CB^'H+x.\oXr;B/+$x0UbK|A|M3nU-;3|^'OZ1ϰE*]>3l;p==gpHÕ|C=u0g}9<ͤkB:䢟&&2>{/h;!!ծ<2_A]_=z|'n(œ OJ\a;Ɔ ҠT|PN
-~ jR82 JcPӸՋƓ! 3h[xB
-degv<SqSE_]PmAI:xIq"DŨQyL:,K&$Uv{^}@Cw~%ӻ 'MO d˸CWt;.$[1Dq.I9ٖLѶh 1hҎNtMMSMRwA[(̫ ʽ)$յ㪉ӕ*)Z䉏j5S3בEyY6{JR3#{=ӽ5p7UO@
-GQ,P5RҊD FSVc7QSbcIJyI¶.!)/WoX||:%ï,4
-i1vb"Kl,SL Jf\[]ph(pg_l?AP/l6=gÄqH^1f-|iY/KD&fɽ<0$|oH!4&c q.H@6U8/n2Q\8b斝Wǂy%oJdO$Qm1T,j{'ZaJZUIܪX $:X36jjeŔEٮxn]RېqdR;:b~2^cTڌR`s6?o~Lt%ZJ*j|x8ɗ@K RdցFc
-w-Kl||QQ3thrfh^[㓭CEob7O&/++a<G=#J[/3eGh!@@LnOS)eХo !
-kX]&D-K!
-q%?xYC)ygH֢܌x,5ހqn|~tgG7mZsͽڽ)nS1DC~jy*Ց-=Aɠ-Ū_qHel-f.$ӹ݃=;J]q帓|1j`/n~(l6þ!E8'~aKeڵ`\?=<B
-g/wHc-SqV#qIV&T1ZԴ V攽fS4F { c_HLdfX/EJHu-KI\i}>l[2pJ5]a&+]8@M8|_KuMoZ<#gs͚_|a}_lj봖Yes7@cT#)ʐVifGΧI{=FJ22NGɐHLK0艞x˝f'u[XErṞ&2SqX$tXLT NsFf!$Y23\-njb*>\(S);16-(M 8zu5Im~FY{${.JwiwƾikF.hIdylKklNHl9"@H [@KK!-BMHB%-ZJ݀n斥#P|3#|Ό4|3rҶzo=#I/'nK{<xijq DrG"k1<K& eP-.WC7]ͮͮo;{loOx߮EZ+mb6:6vV#h9G\Ӹ.B;y,x®p
-Gqg/U-URŁoTB~f0oG$uǚͳ778)_l1Y(&rxIĄId Ahr;v`-MJ͐#m0`.28]^&Ε2.Is϶_5/o7[;3ǻ UL=\7_iyc?(^45.B-x@DlTcܖ m
-oB7ov?"ᶓmKnId.idy
-HFIKcFx<xCG$ۢW<!uD≱(b!!QDD["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:,'Q)=?Y'_{q۱es^|^J{/cnw.~/58G8fG!÷'_8GǦ?P/
-Ysa{4bq4bPaS&pU|lH;ysvjо
-50A|6R3Ś%
-LqD9# b0e~_G1 !`)E#+84ݱ;l;*Ţ~ehW
-&LhST,WyE\[vZSx2h&v :L~Ϟn!֎jqIfSfrLl˸x4'd[renܜ}8=Vt UTZζH-T#MG#RTZ'.GA.Hdr9X6l^[m,˰6CXj%e-h<`bZ WaU
-ԧxF+c[&k6y"_=ѡF)'>|CaΣ.ʍW'yW]ѿe.Cg=YdVO+'+^7Te&#eq=Hk,I-wvL8,K<%t!q#@'&I-mjsr'5XQmB'G.
-=VFG4Y#xFG>@`[k]{HhU}jOߙֹ|Rcxނֳf|ݱ}N%@v>e^GDyEMf$r"AI|*APi~9n7ȶ%5K &D!h^9?jb-HT!r 7@CtzkR:MrZxᖓ$t&M1dܝJ+i692, )Îap|8_90mF߶pfk~==ySEY,R%
-i VT&W_^R&>D&\cd}. ,ڌLy+Ɯo^5ük[k;-OJ1[o\sW!kC\=oo)zo$u MoѵyPԥP6k=7aiꧮS?_vyaqBׇ5&z[zzMK<f%G jcԋ<;JM1,,^m-ċ/ bAd\HwPP+o
-hFe\4)L55:MpjX!)bQ-s?K$-fܒL2Ig2ds@3.aq]LOű,1`!)TB8Ԝ^Bz")*[c T
-2~[FyLmг /N|3ZHU4 ;Q{}6v-ʳc1cd.ȩ`Z?Ֆr"<'qpk"k%1qfjM\R.~DG")xBth7pMnZ8819_$MBϝt?I25.nxr-1Kzlciߦ<w`IhZ.Ir6\rSㆣ
-c,%`KFjo<xM{cCtI3]yn2APnoVSb7`2(<bc72bmP=@U#
-EJSêib}e"U+|hwMOhс;&
-J&G3ju
-bWzb9i9rGqcQRFUlQ*RE5ՓhZ)֫dP7-n;_[Ν"MVkTecДIp.sTI#C*ŊeGQ7wƏ8Tw\[9"IkMF-Woφﻲ;5vfd`
-%ԴaA@{]c_Wݵ4~K*]8;ˑ
-T+.ģx.d'>%$!R`F6fxB2GPCrPߧuLM5iRU>ۇfUEJWE"P9.HqP pW4-ZV3K'!cpKk@-Y<x!@*F,mKyߝo UjZ=sċzNP9C+PL=}cԹc;t8ep*]vMJW?q#"k2Jdj;_3LVB4©&cSݡ0"E=r]9ORx@3Y奨5idQ4f6a͡U}'(.ۋvEq8`؎ۨf@"ȨVD胜-hdEAÔ(EjY'b\nkơ K;OR,ʒ3RtIe)HĢQuZkrp
-C-
-AMA* XWY)?O)a0D \ApMu4YߠK&ZژaI)#|'D&v5 ![bT_?;`n47MӕOtK3ڢ50kR_}4`+G7Mg--:02KyL(IA%HIִ_(?};Z@%%Cӥj_zVկ]^2ɲ)XbWlk6gs!p#g8m3K,f[D5pRY6:'|]5q}VHUv<1PBMJQMܟzSa[h.Ma"-@&Y4eD^/")&Y4iVF_|cɢ8æ:fqf
-3큟POKm&6nvvvLVYGhm^KL8%zg
-WKSoPXsb!Ak_]'sY+qmtu:8R-D~0ɔdcLN.3j(7T94ilpijlRM|8xǍv>h?h4HT3N5Bozb ZӓZ&kSkӧ_KN긅g2T_$sH*g8%B
-Ӹ.<!k&nKm7|I|91ޖAjna^^!a2?ǃltIמИACiZ%3k7
->ᛚ
-.{d[<uD=^ڳ;?bUUek<-uAr~g4 ERv`t!T$r5#~4om([*$D.`C%Qt!IXYUn- 2d=W"^y6ӄ$6a}l"[\Ţ&CQM-8Fq.NYgANLNrt< #aҔCFj耧)ǧ2sI%PjO잆R3(6ٕiVlM5s˳10x^jkB -qڪ)W0GԣFW6pE2F
-O'N{3edkh+qcC nt3|YvFvo^JL8$㹪8PTސ
-]n^xޘʙx1jv"^ƦOZ-u@KAآފ;I [Jqys\zXnQŃV
-?#)}/<nB%TbVXI@MBYIx$7gNEa[5bN%4 W$\g[v*Gj9삂AA"y#Qٲ86ǃvAЃ];-S(QmV(0\Oa&j#c@F-:m=jh;lXdY׳Y*MqwOiw HxZÃ-1C1[edr
-5|/=peT-]YB##xt>Mfb3]k%J̶֙U]xQr~VsEq:Wr.$ܔ^HmqL=ͫ
-eX*x_)u;-vǡ{UU51{b8#z h{`92+4'_B5~kFEdlm+ڒU~V2]T]
-ѼѮ鮙\<p&/2pOƥȆ|8` ؏o[r>ʋnϜ544~K50FpMg?D4z}1#VHI*C_N?9?WO:o>9qSp9Sg8A
-+@XCJ#2]6Mhzwҫ5Uȋ9*GzY7^f^[Z\{!p\ekVg!_WN+'&NT( R+?q
-tפ&g^7}y?N~3G
-AHBSI&jk3|T!T?w?ZgZRtwCKBӫ{2D.
-f4T֩j
-PK&b)F:!~K(fNF|8V~BSckmGKwzdBjonq\&\qg4ŗ&A<l^D.ډ":"|&7E9&7F}vحgc'k&1OM6+P!ڤZ>XOYbgC9ꏗYu=PxٯGc_ZsYtW,i
-=thNe2$V?i6\~1 )L
-ߝz(u8EoJݘR{н
-P:+4FN\JP~@V
-$|;57W;qZF[}˿Q/v_|xsv72W
-ud{.me1|>҅|iy([xn[0<==PV &dBb4mf`J0?O5S:1ηWqD)V"%wXX5OW;>P_g(:z<e37vBVMr-Od9!%hq%hXE=[3hhAQricj!J'~DRuԙF``RJg<f}9K֮>73|^1ZFA8Pg@rL<|3|BAqiOxTMUїX.DIBHy{hS,{tǯÑԗ6=QK0պ蒞ggmyP^ӵ[ݜ+F$.E|!F:z66!13\"yTu%}ڊhrHBYLVɓSNRMɆl4HDya}OUNfT98FfMOSP1TG?x+'>~
->̓ƵU|ڳR`E}`#Ү=kk&XN!ei?ZnVj#ghqZbj @EQ*zάYF1w-!K-ƨ]l9-##em33vz;uyN8Z\^:'c;Q(3X3yw`P_S
-}궺Wryye&yj)yre?NFչpv~t쨼uo9?pUT>ۘ:}Umz\U48&l/\EXҪkj߁s=&#wW8ysg0Y**-&}w܉*JZ]Q]cPjhj&JXoTj*;xpW$o`hfj[-|*JjjS*<?U*F[YRiilV-FUɗ7M-JGH-@p:pyN]qKAqz4*ne[[-"W.~Wxi}<3jgT|oNۆvРL8}\oW;vB=bk+7]^&ނj5ohE55[*Fljks6_vY|7$ i'8~sdk4N ,RX$1ZT&-ȳs鏾rљGo466+ZŦ_mGگ&4vǗk0h=xtcf+kS#]meV'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ܿ\&ov/c wʝjبۄ"ר-Pvڬ`g5VC%ݐ,ⓨAKR]=E>9Qjn(ҹHNkI_pKmHk:Gn8++;':;ݮtt7t˶{ zѵHl,mz^]K]Wɝ.7s*{;v]'<^,\-m>ZGY>z죷MB@tnoՋ5Z['
-5*^a1)vc{gv^ E\yw5kFmsZaīvځhBֻ[d%,^A6+5(svoS$}Xv7oMGVv<%M<Tnk߱W6t6o=s/ivfoO8ƾ,c~ʢm3ZixM9WG\tF툽dMZҨ&[-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']">ZaYj~ԟq_ߏFz|:?><o7vj9֢ZAn2xSYӪ4842zK{/HyFL{Rɍ}`ҳBA4Y-e✽Ue<85]Soji;LMe:rrPo8Zק>45|fy~Ynb;tP{syuz{:\ޑEY#+|ܴb0 &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&w(ϰ.Cu1,GnWy>
-z@/cX{'S00#ǰZ
-
-ː`gCˑ0p9:@u5p2yÓ 0WːE{=_0,CmR,vư9<n1Vf
-hWSː<Cq(iKd Kd Kd Kd KZ7Jq%ѽiAvi.%Wưubͭcib
-y=Ȱyݒ}#fuԿНflS'?0㾉b%e&Gq=bw((n$>80b3ħX+qIeO;f|!٭اot<Oq1L/EW_QH/UQUQU_T91¨yFsh9(?YReҀ11W(QV`|e""Ҟj18[Vm@4垀ys&^>&g-^k<8/-iPKQdb::\]ecӴezE012!:^=DsKG3r}1m@_*zXa%}ר%szE$&ToO<TcQ
-ycԖa._kEy_6K*O)S~_2xX(xjFOM/bLOQRd=WcI6RP
-O^9RTKIe5Kwߤ6l51/dQ/5!AIQKKN坢#;KQT?/M"%}Yr^w['Eϣ0X4;?ϥhLlP;-̹61Sq=LIŠrꕹK2-΄\lig%
-r_.ס Hd|ژٳITȮ2?ɎV&5(*l>$>'wWQj'g
-scVNH*[Cw:Ub#qeʻM=8vi&he'zD@"d3nԫh#Z!αk.,{"XN_gu.|46OgE!3⹙|d
-(\+4ns3R!!B/9R\D! \u%*ֳ߂/P݉bGY.5#=+ZŌ+'Uon-Q2]urV}澤l81.;'WaUȚJ$e9.E[2JR/RYDR}Y\K$v2gh2zw,}p+.Xbq7cn5 X$AɜKEkG*XQAn;GcV+ﯥ_n)'lT\SvZ!j}57>MϰeoJ@iַ1W2L[ơ
-C
-Õcp6=ft~tx8'hA ? ng|Y?2bZQZ`t0DI9hy
-wK5NgI6 ga?Ʈ8G'P<sI6" !(DH<|@Y:,I;Eu.A*tcW|!Vj1*M~C9pu0rj:Kd6#چYA+SCTbUba3]%YEv8^%`!jiz&ycQ_n0YH^l>BFhJScHi>bYrQ#yB6!rg~?Ξ?n/[d2nD<LH6Lxp j6bFLViqOl&׳8\-dj3M`NߍÑxjEKɥ3z4cin5b>4-cK8f3B$L3ٍHZ뉨YŖDF<3ŵE18.⨘YJRDA:GTFbg.&fNEdΦ#Qq->o\Ky&Q욌-Dcb:CҾЕ }'aӑXbO//f# bc`77>[ʂH:*&םgSxt_N&|""x%&8Ki18ˤnIDq*KЅ0dpJLŲY`Imh.c9LfpOꑼ8t2ucI0M&%jliH
-4XGIO&k<[8\MZ)5b&'
-y^\1%+?c0k4'#H-yѳI`+(E1J֚\}p-@L&&#$`K[<ˊͷ[DQ$?\ވeWIsQYs1Sin+-[&Ѝג2ARPf&,^\'ɛ!,J@NP<#BJWUJxRJfi*jr*:4XO'@2&(SYNK\?wP
-bXf@#)C!I*D
-YV̍)&gPfc"H^)ѯf-n<iݘtǂ CsSD驹0A\~٠ #i`O #)7S].|~6Xe8Y2EV ٫wsj@sykΛݫ kpRi}iaz_\KO?K+=/=/=/=~rN}}|@wdH*Y{=GҽQ?YZ}suWc^h;K=Ck^OJmbK*
-ò Yߞ3}gD[
-Ix
-콧\;g{GIy5DWc.E4Xaؘ-'/-C!^ ޖe'ʲH6,--\qb 7)+T(][>=IӀ[_T'|E#+T?*ʟ'?| *zqTeO-͋Hм>y
-!?Ҿx7-pDeE
-gpYq+\=w(;w+|gO<ȃ`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
-<</Filter/FlateDecode/Length 343>>
-stream
-xeRn0>GJ)JPI?KTe_K&A4ٝq,,BߝvS2H7!ʶ2Aˡw,c_l#<U`}bmqy6ZЎ ϙ7z[l^(ak`ETlOd?9^TuweQ{5G'k
-ԫ="! )X/D.r2}lQ(bBτbNo"=%L0}KHhE`L=J'rs;^8Q9gkݏhLX5˲
-endstream
-endobj
-288 0 obj
-<</Filter/FlateDecode/Length 43836/Length1 96276>>
-stream
-x}xKM6Ml6\6!!.a%oH,$/&bQbA-^k(-D[뭭X*~bTZjjwB?=sf93sY@AY_XV[
-iuUs?Uv:Wz%VD5\vLtQ¿?D]إNϸ"tU'Fi}+ZKn[1j=+'jQgة6]ܼj-,moB}E7HTQwIuGNkJ}f2; ɏy/;O]o4Yn/ꯦe^tF3- iOtTT&8RQMN`ˀnp)9;>H> #8rβ9[KP_nW>-4Eȗ5
-|8>|IF<JF:Xr_24乴p{~0_zOϑsdЇvb 1&ݑߴ(_cF&bfb 1Ab 1Ab 1Au<Nib7`w| 1AU WR5nާJ*-ie-S*wPV*sNnenx
-nGɡ8,e(^۩D4!߫m<v4T@Cly/*]4E8<)MOdR)PO
-RR(<xUϥLz`
-p08q@疲NH 1AbC8(W%9x)cȉT0Jh<GTI54h]@2ZO;!6nМfg_*/D0RN*gjK5ӊQ"Ȼӊ~v2_~{@t,,mp#gBQd|%&Y)5-=#Fps)N_FOQA9QUuLF3f͚]0gy_@|Pך,xklXU+W,_tE-4̜M:7tqcKƌ.UT8 ;by\w2x=;˖lMJ$ǙMF(]pA%=yr̻!h>K:!9&fs-5X.K-jdV|j3*3jDzK6=mABgmi3`ͺՁ*TW\WO=qH#tILON&
-fY*APxf5VW].A~U[&yuԛ *F2>l7a{aƠh6h*yQWYTRxZ讶-slw5Ygk]#=54|=BX[D[|16ASwRX ^
-egk#G(vnsՠ4ꞽ7Ksf)&Gړ4HXtFts}&Lz䞂t:I}/ɢ:f-;GS.0矩Yfd]Ǡa X0gM8,tU>K'?ǽn<^0;]
-6;tVw~(۫?9ޏN,en^C=LOn\FzJ)DSE];GckoŻچg2PɅq[.R*2eXK!n5.]=fLeZ<*Fpbh
-+QvZuE
-XJ%QAQjI#"R-Q\΅~i喳C5bg}O:t
-;3xzFF>7]JIsٍI\*gr^|,]rcѷ!
-B^閯fSδ{NMsN;X,lV#3;]n.ڟ:U`(K=hĎy[.h{ 72詁1HOݼHCSȢё٫.?LG%"Ik<,xnnXJ^-P3Gwg<30체3vh)EA/Muî;{ξЎ5SG
-!Lq|BWp
-T
-2`;VWkapH
-//A?i(9 x;a5o**cG#
-.o\%9]/;ldrL\AIvRIo8$~Z{&dI.FOG)'<қ\Lb>#@PX)%b?w|h!
- @BR[,-!)|CF^Kۑ-%y Nu#4a-XHmGj;B]^@J[/_![{3w"##r#rՆ66bl6fl6 *Eu[+
-Ľq h.tp̉K:<4́IwV\vP,F57kp֯r89x]ktQo(ՊDJrJV-t3hDFQlT6JQK9$D)|&hqvoہۀ
-zS\lB\EJY>"$%Ai*5u-x};=(Og)yM=G>7R߃w 1IN/M(wg(~/AzBPu`7Wm
-yCdrm%Lhq2j^ ~~pu(_
-Ye=
-l1:9Gȭwr0*[wN'$yr_Z{:;(;N]wC"_lJh2\!a0rMPsA}Ku.7{9LAP'98j<aCcZԽ1a6wcTnXR:s@yndΜqx Z-il152N46A4SjJ4%L&Li+K3X%3(*z%ѯ83q`,RK
-qڰ12;8[4]
-~Z1Eh]~+ܴ.M[~VkgD=zꮰQƺ2[Yʤ 5U_CؼgmpEPt$tm|E~UWR.13I&z)GQͦf9U=99Q'iyn$ZW.@]u\\>DabD+K:bIzeI W6Hx<0Hqx=_ݞ;~x_olEm0l 6%,'Yo[yw"` yR9{9=_^u^T\r4~UU=ZӪ-
-5k*}+ki3mUn6*e[~Vmʶje[imή`u=&WΏ^e">I_#]++&+TKT%/lT+&dwyV̧CkkmU_/390l6<MÚv)m6O۰]LLa3w)e2Oٰ]JS8pp;<a]ZyommQqʡsxSN[Ɯ9;rb~>ͷ#9b-f"TWGf;ʎt܀eV\dufMl[pBQ&f&2jW>aq44C!`h7tvی</x-.^uo@khrU9rMU>w<Zq>彀Rnh`=P|gBW~xWJD(-1{NjŽE%͋~^Wψr_y
-<T6:< GuF@W*E^wP[L$NEɹD\1`ebbk0`K;d(HWo R8HQQS#'_9"R:zh-Z}( g(/G.KY->إE"#Ap=6>eEA"Gt*CNԕB-3o\yp(Oh:~Q}~Fb_r3,WT/SGnBlτu=ތQ
-Q+e2s6-a[-,^gswěXUy,b@oBwӓKgy-=y$*'}n2b8?0-g]x?,UE(
-/We:EmV/!RZ?vPʧ14g1f
-g
-m+n|v CL1\yZ_Y݀v {=ɞa9xWo³ ъ]]bxoEx&
-'[L8yԈSSoSv?~dnd=P1wy-O;_a|?E
-fZ.~$//+O,QRW^P^STjTK}`711,7fkph01b`z
-~.4<:4R6օMװ97ku1;.
--{D
-\T,)w}%50F(ot*_R~9OUSz{[@NOᷢЯ21ꗴqz)=_F=ƵdS\~`=ņ1ͤ,nq?0ZAnappD,:~ӯ2&XYH?]ŞVEVL6[}MyvȧTDsTFkF"]l!?9BJ,e&|ۈE^V?,vZ9h"5+ؙ7YHn2<H3Y&Mw~6<[ɇN̫Qɤsyy2;-2-Jّ")rwd>EB4Q|U`}߰ط'؏<FnUe#/S:⑃-zVɢF=ю74+rhid%vhQEC]żV|uxUIi$1Ab|'-N1va17y/fpsDs)&5O=~ܼ㼴-'3[."zw7o)!m= 2CJjJbFlBo(+ٕa:}'5OQsu% WK(̑><vҴ1&Vט%mDɘQ),<j1
-tf!SZƘ8M<zاǒS&ceߍ*bodʮ-SFA2%-Jƌ]f9R5*˕G%bDIvٴi6ɢ).(ڄ[c3*${h8鬿$p^gưp^tHd@ǃ%2xܠM'^N BwXDUO3WQ2Kdݵ2{bᔯL^0#dFgX@=+µ|H -2J
-K
-7]UVZ:jNkoذ҉7O(je,4-'$\n3'm,w8Ĝ:3t5\$'ڂc|>OݱQ^
-{t2=oh/Ҹte|íɊO|쩗y-uƲ#>Wvj${5U*w24Yp'nrgK/N+tʜN;Zn%cر)%c#o[]Yԅ#j=տg+|9}(*?x
->eB49J!9U0
-D<I"Jq$Bߝ&b־x
-L1G@GYL
-a1TVhq\ur'4FXGPᱣ֣>ϩ#'xIh\Brx]%ɮtW2OdԱO?fOoAauW̟esf p032*J)h JiR#+]-ޑԔēlwb8-~j\GS& rLjR )) rZciևgXJ;8imxjIIUZ;b=9[R-4sQ5MKzԳ.36~;5x؍*cϹVVl31P0O9o
-J'3Eؔݳ^)CzKy+Z{cvx64CZiY++i2fnޔ 5^v9{BMߺBMVS#Gեd\l)lr!Y,a)OZ^ ogޑ<%/YRH[R)s
-A0F'X,i,ם
-
-F `0%ylYYR[anaiHe$ ˜-nIPVI2B#ΰW%=l0bAezxǤÀgf$qdh8kf&cNDgz}w-O\gV2(wҪc]w<ٿ}7_?蹹y̓l(rW)DZiFt4[vĦMuxTݺrinT9%e OD͜fStS$-(icҶIJRVˎnڕ2_\c'g^W/?T9.,+Ҝ Ubi鮒IDG8JqFOBy/Y3~xQ7pq~Y A獱i Y$
-nh4hy3V:;S~?LӶ3_q~|+Y==+#+shΌu~u[F[Y Y)_[%̖jfPef%XYlG,u@FH20$̶$aMmS03jɩ9"άiiMo[-m3oJZWZ=v-$[$Rb%/2Miib9HchhH&wKsIQ=!妔-ZbwpoҦ䍹gk̽ ^2G;f2*{`N
-`|1Vκ!-/C;ŰVR;FqW#jpTl]2x~->>kNj&8f#}#]#jQS7טIִL,W*0gWL9:_X5mbر0ydx
-*o_nXE@<kg@D6H
-lNn|%{d9a=[z?opsCȪ_y_2{ѱs-fn~pMoyzz: rpOǼX悸k;Vmzhp-C tB7
-8@Fx*'ڨD "
-":b"Ý$ȱsp<p-K;Tl
-unn®hoiP\H%
-̧MQG<e
--,Q}Tn7>̆z1VX9=dmM̏<*0$1M-́'Fc+[=2D
-MhM{UM&~SNPB%s1Xj6Dmmǘ]$[x}`H;Ðf`XÌQFXݹ0LAjq41<:5/"Q$ dw%q}1]&4ɗؒaTk{ ںǻp2RHK91/sA-b.d
-z>Vx+1Ø7e]2[:1%aөUD-ێ00e=}y\Bl
-|`hDV-f0 MLBk[%OgKzp3m ZԣvbՒhOm_W#Vj[3ʾԡK8p@މ"R:E,qz)pdW\
-WUӫ[n77ܲ⭞[ۃ?}(dRa' :)2lm榋@YRC%\#)|F5 t)ຊH%RwiWiĖ?M<;
-!;#ĄŃOB)&#OU3 H
-N*|dŀerIL
-_r^AjXR(g+@ރWr>OQ@3a_+z|gHUPQSC'DR[z_ynwy{~dl^reiҥﺦ,]K6075_w~e{qտ(Ώqݷ<tq&{-<DxK!]"g|]0)v`+8Ug-ڻzX5%X2!
-9b'~,̵h-->hW5mrҳPGz_lMi&uuXLr'`ED!g\D"fbr{@k7,l'XrCF3uEc[·'rץ'..ggw:҉`Ynp7{o,6g6,NT;;Hsc~x|^y!x-#ȏC0.f3UOS7t
-3oxDXAzUV;w:_"oY@جyLx=S0%tk
-ioPHvވz1PO}>)l
-Qt5:`uSAץFJsr6,X>,QU"2Q"|'*WtFDVK/l %e"qGlyw7!r䡱l?{{WGdnX[C[2O/߀ -qPɂ:YW¥B{sGjp#Xm_Wj-tF,\r8g<l5M|npnA7}wU#_0t
-օ1^UVM!vFRw9HoW/`7#2Fϫ~VWjY<eMCr/W;y肥@-H hK=a[ugD\ȶ{|΄R 44/!3sn-,e
-Kj~Kq0?z4+{7&-h1/X嶳3!l̋
-pOU0{J)^N.zsf]A_{0^Z>VsT*f
-Ws-I3cdI!P HD/BĎp99oo/sshgph5@
-Lbk.
-LhEpcmI){W Po_d{i<b
-VtЎt' Fei~օIՅR-6Wp}d˙t-`
-1ɩlMܘ
-L#y.vL>Ue5{bɊ`O,&+z~
-lĉ6!_tpBHN%x48zeZ~W.(][}͋ZƮO4XVk:
-Q,e$;n30Nle2tYy0ӟc`BW)ͤ%1VݢYAmڽnDL%jYQjBD6N\E-ȓ!rw:®p-$jxޠ7jM>}4}.r'|GP.TjPϟDb
-rx `Lq@̌CVh'5BaV#xE-Kij&Ѯ:`X!cY%?b;O3CFqu"_ᖅ#oGcƂ46}mZM/Җ5-;[;/Rm螎7^7xYc%[R~⽶[Fi
-:+{,r{:z<Ѯaw
-KD~RFqi+R~.䌒e"uz}&4/GYta<[_/eʲȲ¢+yude=_/w ߤA>{-z{֦wܯ sOggg#OD=+;*}W
-___ƾ0iĶ=o5)y̼<۩/_\`
-dh0_K4 eY貋)zAڲWd(nNKCȰn7HѨ(IhTǪZ<ԁ/}|*[.70*kmAEkt|FA0Gh>&5yM #BlyәNh-s;as;Y6.c͌1vvF?c*\+6@#qa_Rk[!LͷRӇo|#vC)˲
-5o
-hK)+xW]˦BS/nA1q~Ew
-t7bLv& ;v w
-dWrʄ{+r@}䉂1,X2Ex?dxo9`X-EŖ*v,F|HmInҠFjMB[##ß#Qog<ޠZշ4p2m-{$5!z7-ww78Emog|n>?ØQ3ݾ5&:\jy9ҼӦ9oJM,D[lŶ\]c,(㇇
-yȔ-%NOz2D
- ֲ+iڽeA}MIGr'+(er9(\v`SNΐҁK.%\Je/w5+Ŋ`*}=m@+Otĝ!M4irugIOMLrʞ<huW{㳥[)OY;ohjU%жnex_C%7_ z7,ݺaJظdG]mc}g_p;nn.^cq-A
-$+,|yOnIى:~:D#aed
-)
-|\縔H+XC}ƕ?'%ey(`8LjG&~HunoPSq~>I\jkY~><'
-8EZH ISn{cO -\?7/GaNg%d]Ey١= G'WW'OSP\R;ɤ1OƇ%w~S5
-sIkWONse7t$?ޱvR6L(Cٮ %A7Xv0فFA#pgF*P'yxN4i5Q &]}]{e##4AN7bƘc
-[$ (ThC2eHJ<1@Ifκݒi2RN&V=ȈD"hi>3&<1"#Kfu;?}[gSԸGN&ϿٺEx@cе}A*
-Oxr_>~0%@#
-_Jm
-kŪ;RF,H!0(T37xF !@^ϖ\XPD08zǜ0ue{-jА`M 2
-~Z'=+r?-7mD_
-}d|4>pU@=TVJ3@ū`k0Όӑs$H'#l !KVE8A="r<*bP:U%Ouʴ?6t`؍d6z<v2Ƿ}#l{._5/g-xG}OȬ'<6}]cx>7t)AψAi7vUhX`h`A-$noއ,uLG-+~-g8W7@k+{lOoT8-ÆR+A@1%m[wx-c_M颈#{VEiFmtρt3gC~9ed\wT)T}]=o]!BYS^@Q,MzOG_@锜yNSrЭ]M7+ǏşS9a_Shɠ |-SfRy;L9BC(׃y~{T(lƄ28P>\/SeRZ/R6ln'ǭ MAnPNTz1}!mK{POx]8ߘ4ڞsQ{Щas+Fخ-ߙ"Ό!X 3G^(r% >|JK8*.wT9eg]DpO?"8}e\Y\rmrEhSB]Xj*7JjK3ȿ;Ct/$K3.!HjÖİy9ssZ{vlHVÑ)NTQϦv
-CXq&
-#a6
-`3v`P/1>jIPו[3kĆ+Wb/*5-:h8?|iU1\ݶOOPswv{r`S>/~|ā[rUfo%W}6tTtVGp]3#rvzi_5FoΎ.Y9n7q;3{ܥ\ lЌ!Psvϭܑn999>B <EH+{+)c!T\.r{/h?DZ+Lx>h?
- n:p3
-JVq\Eb$oCQR y&t ~Mo¹;s9<tϭwU$UW4*pP4hp8AakFqS3(w@7qs7Ӽe$:-ZӦ&E~)h#^4,u*= ^Ssݶ
-ƺ'P
-4VD7ŶB&jq0gcU_Vft)'Is禸ye!Qx+&Sla@/-XyypǧQo[ni!X&sbWNaP(8??M4}lnв}*khI;Թ7n
-sL8'~b*DAģ4.JZ{3dM"&qcAOfq6rbdb
-X~67[ɦ&(sI0J%&IڵX4.xGG=VY([eBǥYT
-d'`; Jw>J \WQGvUT|JrwR6suz*s2<%Gwd|"q/%
-y1XLnh
-GVE[j2?Kl#z}%Mc.!X3J]]!gl_'!UiEޕ]>弦)HC"A\khLId-{Ž@qvt)F:>yz|_+
-!7bZl
-Jn-0~a;AئNCgE{8{bXl"uvVM>ƶ&kdUs9Z1\.x馾xegda^?b^-W4VtHÝBf5E])J^ԨRhHGCHtjk(N $OB>-BڧGF8$S?i"w0c'M.`k:vacff%Lfb&ɱ41!:u'*:o@ EεHւ8Q|o.a9ZWV ٿSia>l:jWt1<o
-x
-<z~rRve}*^RY)nLGSYG?ɀr"WWx%
-v\A2):uBbɨk塌[Ж
-B僵E`i\dkUWKij賞ksPh>/]Y3H-:VU:bUk,PËu]Pʚ fʊNL)K%,+Jtξ itf.|'HqXhcfO'Ƃ'SQؑqe`Di#Jb[bh-cPCM@&
-ka4p
-ZkI4FMcxY1r35Dž?3F6-r|[[Gw2vfܾIļ j8I尫mZ?ԏ?+mU\V\>ZFvjnd)qu/;|?F zHCv=Ol&n%/yJ
-sajR8rn07]7-N2vX1mÙ61
-Bd"(D&Vkۍml6b3i`M;v/Fϻ8'C̦e9ȍ &e
-Liђ#jL1.Txpldl!aL_ wC=xH^-%%`߄vy~'$J;^bS52Ȟffx I?qm\5+}xۆI߳q}]խ}hѡbc/G^ǧ54羕;vhM8>;U4!bB%wlk7#ڊwW(n7~5dž9./mbWƖy5 $HS"̰XXXi@KZ-=#!FbDKdB=2jVrOV*Xu:U6`,tJ^ǫ`6,VDy+(Dml&LD2фj7h@Htt'N&<ႁ$3ǂ(:γ/6BH2ˌe&\x"2B+ɊCPMW`iٮO+3K`xTXSIMpSI4~K"Cbmh< k}Jl#w mlc-]zahG}+w)8$ď;Jd"ifs& E,L5}
-lRmAT1цق:tx
-\@8qOE'6QK6
-H7Pf\<DPi8sW+lvl?-cETҌ-ln$"]F!Mڦls6vɅTkg{;Fa֡c~t̶ݻCHkàD] lxKx+#BWVIH=t:%>-n7f앦='t+X"x.4!<9Dz5ׅ-`C=[[ww?>ɼ.^PbtFBNy<#AQ#JR.MيB@wB28rqFzN-ic:j?Z壉FED# ;ZJTeܬ^IReth䆻NGڝE_,%ssH>#iS\`~ujTT)TOLE0-#3&oD04H6쇦`W#XZєCr)Ig^?[7vFu˲ʷ$zv]'gn:YBΕAi?BHWSXTiD0j9s[Bmǖtp0c
-e:3.9Egk-"[eHe݆fU^(P&c,shVVF;7*nX|wvopzS@>aZ==yWԯGZܷO el{~{?
-뷧{ol6֓2F3&hJ+Gd=y$-9!~eZ6tI;j-LXd 140i$ ^.hvm2'˗8=\`fiBlM%֤dfE
-≀`2k>s\^yZH7\F^J2/e{ݵ+m
-gw'Ԙ?u?^7627l6`?ׄ̾ɟBjݺNLS& I-֖
-D̶304dﵓv=DǣdT-hjsVyo'&;7g<G^ɓT4|Y}ݩDž/%ådTl'w.-aj֏
-?R8\t'9\$0I@DɄGGǵ/&tJ9w:?yWo%uIve(1PKNjY9<1:<@$)p;m{7Xʶz'EFK|z$-!Igb LLaZ|`0h)Q-gO&1& <'yc9:ijb&|at''栗bZSꎴR&W'*΅s"lQw Q'Bu\(NX|s55/KHR=IwL:%uhwL
-}&xּ&ɢe'g)
-+ktgk0@MWbR-!v&%E䂓sԝڸC;mt'nڰ+?/kS$ul/:XNgnG
-6}nZ/g>"kqS/NF^`HoE:9
-Zk8<-3`5gN~ِ_VT
-/tPrn2IUE7xl}Dؼr9!#-yeSK7/ML6苦;*J8#Sj۰.Hɖ{uکyd:84rY(ChuDX4Sl-VP,Ԝ'ΦYHTTr8$lJ4V&%\*"<T 8Jvd\1mR<o
- i?
-[Yhc5zGwF5@?e4aUz8!)0^6Ao&%i;%gB5 gCWۊh毯 f,EZP5 0/y5LbH ˨cDsf?t9'N@SlfW\TM"Q6bg7;026FcCԗ:w0nHGˏώu
-u5RGYTHK5kWqD`Eip#_>M ҥKL+vsX-sphEۊM(14\8sW[Pk<tH[]RWg
-i>ŧ&m\\Ԥ)s=ZGd8
-ezu?-I7o
-}=8͝(Ϫ
--T~{O~_-;@ƋMVpkh*7mJðD*E+|}Z+|~I6G[*r="y{D~HjfʾiQB(ͼCU4YQpp!UM:XXcn4J|#hUq-
-]u 3Fa@!ˬͿPt2,~ro#Dס!@2筳4D-/P\M<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َ'mr0Npd86${Ä'C&,$aH'Yf%{%u!c&cO3''{Үal-=LLc^#cR<p{曗v#!<-NِD;ڼwUơuT_e8"[X>ŒX1U^ھs61J5V[,HND[=pqc]w
-^orG(4/l|DB2bD~IHW~/k#eyÈKS_WkR:nlޅd϶ jA 0NO[N''
-_w(N)(Q#}4I״5vkJ!S]f\ͬfGezu=-OTo#1ccϓ3_.yfhN-R<LP}~ i<<'})ϸ~ϭAиネ<Fg'ayW>88ۅr"0
-H M5Z:i,4vV*eJCib~jp3=,gIã_lCMQk\I!?g̊հ[2
->f{m.KM5(] U(,H34
-)P(3<aVc}P=U3m'^s-Oǂٿ|,]{X5r?;J
-o|kzڳf:$-.WcvvEpIw\Z#ok9E'vgDвQQ<8ͩFOb>6ԔƂ-ncX!r1\UҴ_{<,Z"{3q|Ҁ"#-p[!QW{7V[1$잰AJpEuaswON]];<w&w?=fxH"jg:jDD2jQu̐^p{<8e$ -V^nmeghvW6/'ڲha2H\:epM5-5ǒP(gpN^ӽ V?*A7C#í},j5мڕ[;9t߆iĘ0MX]c6-.Ֆ:UQgyh=uI{TShK¥ùIWLnPUg{ίԷ}<]&kn{5gIb|\>|u'/\\
-e(_&'c< gyxH
-ucrEdRW('n99& +f-fdSԑL_RLH߳|@(S ʾx~C|NԠM6m>_X$$>
-PZ\8YTZT
-ڴ+qMfn)Rq&2G^ذי_Mb=*z<'q
-\
-4UYowP)ּ@f3N(E@Gd[0*%8P!,?
-x!q5'.<hܕz>
- ЙBe 9B1{R,3f0.J\C5mG*dR\B.ڳLNɡ2i{އ)"Bk
-Z #u|04܃X`t O\cQ",/>
-b)גr.9mg%nܵ2تvNӇ!̘ÐWϿ>4>2$ بf%(Vn/mD2Q%ƜAv5ǡvޯ['9W'_24ùPŔ|~2Ǵcr{jT;+:\m4\'2DrT.)\swI'Fq:f :nu<dzτ(tՉA=*(x::Dg1nύ8~_5[ẅ9Wc qm2.zSm=C1Ī
-HBwzKHOT^V-W/-F`܋N-(z#X s_ߣqMg~k]-#1-7'2Bsh|6^gy|t-iJ^ˢxeq]p}0ηۇ뜻Vp
-N]&pBn׃8
-ڛDHb̽qv<VA\6LxK@v.xЇBF P4~}ӗub-gV3V̌ɕ{w'N]ܷ<a_}>v÷-8غMSvv:Ų{h euJgY5SX937|yeHXLjY
-$2i\,b)Ϋ-}\Zx]2G+oWj>$~S$4
-@vVrp%ZB ̰e=itNT<HS7*I@ q_k.5r+9ۼVs23ٌl2X#}$R"}|ޤ<zO:WnuM eDtKoM
-Vӥ"~%if)1^/{uFJS;w}/vj^rGbΫoN@Z[/#fƺΙ$E`Y3i3f@8fafK@os
-3PثeI̙/7ow<v|&?o~OQh& [&^7au(~?k4_`XLHi.IL;8kysy+>sȑ" I؈ZKHo&Nn_4OA1f_wn~Mm=)sl6TuCmwQpڝK=Pj;yny;un^|'G lav
-ۉ}^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臭,$"hFwT +;F>ZmH,&`j#AIYFeF?"MO0==Rlu+{bᚊU^y쎛wҷ4?O`
-,:N"-ANW@G A DkQvSqG0#LJ%,\=#b*`u-衄 ȇV,gWlrbS}}C+4U(Jyڱy(ޱeUͽ+(|t7ilpfUamyN>r8RK"!i .14P *殡Dm_|dgΘd+E9mm>鵢.V>ͳD+Z{L@e*MKXPM|DV]HzG'@Фå2tw}"̀
-{#F6%&G?[GcHR_c2a<G<n.joߪ'Zz+=Xq}U{Sz)٣Qb,>/'NFKڵZ%-jzz,Zx!0ɭܬZn%AV+'ĉ s2-z@ C#uL:A9l?vd^~q ހc?6m{Jt\$rЪ 4^TדȓW
-ˀOR}@--ЂPÛP]}
-X#DxM[gB@J&S:CSۺЈɖ>!]c[U?>oTL[ݵ<Z*{ʇ7xVx$;~l^vi4Gh֯m&-nKgĕ/truLtX^qy.zYC:azm6|j5, ́tyQ$H
--hT~q'M"igݘ+CՏV9粈z28rǷ\;yޕ;Co5"-L: [9yG$tۙHUҔ5C\\ Җ+`S)PMJ$^F0#KO5ge"xl)evkςJhAT(hDOG~-yݵ֖dWĈ0RRBq[+=FexcO6CH!Ju Fʭ%pm}|p -KaB(I\T~
-@H&sS=i|xCBozDĜs|k2'&J?Hާ2L
--vRgS=zz8#3+PgH35խ`#vϗp{U]iPC $ooDTmEy*K١ܮ***wh[\l۵B8xDGߺ;?%%&7lJ}85h[Cxd͊L1Fi2d_w2ibmz!Ld:uv<0u8HB+IFnp[tJ~0?ٛ$R7/%1¯OZgbΠIh̟\ڶkZp--*0@@2]U{UBMI@Ym0$u4m4F)vyK"Cjφ:OE95q ic9U5RP`zibHj#MiHjՎ)!dgq,L5.v:[05-`_+D_Xw=-[íZ1-Z=IN|Jw-AtQ܍
--f7pVr^׆=(7YXMV0f+y̠yD99^HʖƥFu>|Dǀh4%HD:g8n9T˂vͲ1_l4L,+dRYv4NRl)15ۙRN(DA0&e_oc7ZYi.Tr'o$8FDIP>#$)Ga~6&djViXoP
-[gҢ3o)Î`,.7ؽZ.CV7,56ppm-wR,.QYmc]ZP]AR+AT\-]*n9Tmf3ԧxPL=,Q;Acyz_9V1Jh(.=9H7Һ ~X/*+eI/q$G"Pu<sډ`ET{w5Uؠ'q˙G|`L@d|@s>4; GЗ3fp&#dL-OSKQ)*p}\L *^yvZ珙G/K~"imqtЈ `n 1օ7J;+O.[7Q29mtu*9"}ԱfO\}w<̉^"?uj
-Ja3uUp$R {*-@*kϙɼ~{(G << {x:D=3oDs*jU*J{C-9]ځY*-ysBZXOdmX4RZ<%\3)GdX-7wG
-gѴKvއB'ewrE9@6ʫ ůkr.DQt)P[#:6
-Eiߊ`x4@=K~vK!8*(Fex4ZQNU@++xKʃ+V
-"Vdo8,xE` p>.i5|V_Pͩ3@ф O,L/xLW6HT8.nr!V\Q6O5HyY+
-@eiUF=˄YgLl'b1{Ouk][dٖmY-/ceY4#/LI*Kc%#8IiC(P m%4mHH6) @ÁMmp_g&!B-ONvfWnozBR]jut̜>?<ا֩&ڇ ;-S:os3er3~v0i-4ukj|^,2|/_\?}snWZᳱa> f
-3
-vrh 4j(1*u+='ڻNzϙO~x'H?2~OߧRoRRoSA$ D6A&OuVJ;':@`2 YTS3~)J8Y71E|/-]7岾/QٜdezMԕ\<iқI':
-G}GwLN,O<N}_
-Ux.6Qm,vPc=ff""م62$0drut2C!X;V[e5J(iVs֓`|l-h¾M1"m0T+>/WD^JMG_=`te2t{,:ӪhΩC#@K(%A1UT_k08:R-!G'}aV)I_GHݭY2Zܟ1X5to?z{=GOZv064n'6gXM&E˥>>u(wfvź;og]R ;̒.%}XzA=#8qCgLW+.977&
-WS#PpΑv6P@<r]`ɩ-91@vQ.R<>?;gG]@7#'rJmqZ f pG{5oV_L.:>uFF<i >..C@j3!#p!|uDjG[U&TmnS:;\XƤ]]Z[*ֱhz˖|f+F>}gvQ+Dm=|eoOg)%ri5zv֓:T;va>2
-41\)@`?,xܮtao7:nOq9aaQJx'}+cŪ}<) ٰxl5=IӦQ~P<.wM=kڻԴ`%rD3nw-'6}2Q-X{݃6%=WK8F!O4K;}(~?~?=-~-4k5t^9@:~W}
-_x"K^^,kxm33䉰7>VJru
-8R>:wV.<SJz¥~6<달$&U#\%aY"9l\#C%`r$d #_RC!KʔC=voG;{m2L4F0bA=:8hw=0}
-b}InkkuIGFM%ε16
-I))Id{{ȮAb/CWEx/(זx!?%h6ߠ]+;ki[Wp%C):z*ۊ^߸[QYԼ8؉\x^Y}㒸x|\<hOkԴi5@>B^q,S@oC\SBW`QPxghR.%x1qtZ;Mm>cdgq}al&Y.hV6ϯOkNN?|eT@qOi*,fAgۇ|:Jk#5Zժ8L*1%R*bwjm
-4Dh8 yf~|xrHKYTed0JILR(Z#M>z7==0ߋ<(2%xZr"CHEi09j|f" NǏ]7UE=z(p⹑ɛNFn>o95+
-7ݬ$n&\&Ψz.cy oU@PSؐF*E\ƀ>`7ְy+T{ۆr8oה>sv>Fq)?KG
-
-503&QJ,}(rRNXNIf+$}[!q~%B!_1Sޅi1$Ico:
-g\и?m8tϼfӌFnкFqmt@y&]'I';w)IWbN"0zۭ
-Z%9@3nۧCΞ`~ҋ4uF>j_ŵgImJ?d'uzDѧH5uaj!u˵:BSB$[s/Le]Tz.LR:ZA:ţ4DQm3I(~@{'nA1::չؽuOo-jժ|1Hm&ɲNvC<nk>'ov竇B`+W?bD6tCp+76Ȗ"?
-(=l-Y:|*p[FNIZKG{{4cbZ1cc a_<qJBG/鬈jm穙ʁ۽~.A-vt_kh5~!c<<FM7[/P_`,-x\4&LK,}B,ڶY?A8 <luf[wBw9Ob0=g[϶q}%π`^
-L5'č|~lɩf`6ЂNT ׂ]~-hAZЂ-hAZj '-O-hܝsߚ{1:ۢ/<$goabxr"ȩ,-jvS7Gׯǰu=3;6
-FƉS-9CMMJte5#+5 S#Emd(
-#pZ$wGR*3N!KN#iH7\F9 iYhF65"*)mz?PD]N .\kR~RR6qކ<ېEMmx8oCm
-y!Fw .o_e\Txy7-6s P~-NyGe"`oB
-.KבS4e =}އeRrr,-=p}C
-X!
-Ò'-AY)qLXۈ[?Q<]r?GZfh䉞u{bJ]0HiPi7(5o!r%[F ֵ<}h_`_ng+=zU&TΐUA$AȌ=&D={%ZnUs,bSպ_kY%9,G
-|P$|v|߬@&q%ہVUR{m9j7U)kJ:ظ:>}uB\A>Sl_4OTH%$!_52m ,دe=
-jܯk)&.U¯dp_$#9U/ W^+9hWDXڋ-q{vQLzm+Inę-/yrj֡@kdQ'<'#9-Bj2o&,S8g'jWe] Uzj1|'Dl﹦yP5fX^M"'T{u_6އC+d2XzVmy-g1ݰ>OlWE2\9r<vZd+c>oX-}5GX$@CAHӰ_>WArLjdXD5b`3m5=%`b?uۥȕ%D6H}_DFV(K_Zj$cUhVy4Iþm+J~]vV`_@6..FKR9S͗lP`S
-*\"dU8Yٕ]}^-.l{P}XL>b#gS6mPz]d{
-WB3RoL8B0e+r~̱{WfXDM\McM.rl/es\%[b Wt~%U1[-grN|[zy;
-'.2eַϖKX3\Y9&WזuĬ~x]v)3lTHf9Xe'B:'[ȃ[bu=Wcw2ؠj͖L|e<g3[Cm`
-˕w*< ٳ
-r
-.nV,#}jEv;nl^]MRp_Wl2WnܽNkX.Un{~P[/Û
-)+Uw!sV
--
-Cx 4`fdTpm
- -("[<|k t¦.r96屑RbT(-Uɀқ{xVp%(^ {kJ4ۥWr\ R2V.[X#!sy2&l.rM3d?<d<x6"Elg@M4)Z+(yp^~xصF$ckjjLb>6Dn$4-R9ve,cO'lj*Ʈj2r4>X^d
-LL @4bDl
-[q%9?H/c@4®FRDt=IՕˉp-ŖӃad)"_te\*O|
-b Yd.YRd$g#KTR F<F_GӉeFte9[?hJn$b~6Ja,V<6'X!DrM4k,Hh͍aS"')}&:TNvRiz?%g`a$<|p딼uJ_mwJ?l<):-oN[Wg։uZS֩ةy2CW~;0S
-NEp|xm#o2/w0
-q^G >wP
-+R)Agm~6#&lѯf|B] EDnEDo
-1?H?{-)*^B)?(*?gy|AAJ"FծZ<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
-<</Filter/FlateDecode/Length 526>>
-stream
-x}Tˎ@sV0h,$C7(c)dK=U]~vm3
-UG;sփud/M)#gĿյ=^6w8<˶Nj;4EȎ}^m;KSQ۳{s)V\z]_ۣB1SueeXoO*6mEPu:Wˁ# -PFQgFa(C]}(`B՜ZBIPJ!%w %GYRi1S(tqOhe!kFva8Q0A&JB-'pILcjKLxrr1z)&j
-=i0?*Kq4DEcbWU-*rNg:BG,gcxI>3G
-<t({q0G/ts~ž맪$oh
-endstream
-endobj
-292 0 obj
-<</Filter/FlateDecode/Length 25106/Length1 64696>>
-stream
-x||̳^m͍
-<l.&\p1$ᖐpɊ#"(hPP\RDj)VZ@"ƈmѪ/MUھRb{<ɓ%AP~ߙ9sfΙ3g< _2q^U=:w [ +Z_]3O7F?\xMCgǿEgAy5Ε*~LHU-My÷ء-ZlA}9;W7\rk[Z4,j!Wu"0V2^K[=$Bx{W^՝EA;B"B['YIDCKMvb-̻"ޯ8&NQ-:ﺐv|
-1`kys:J-ky-37}HW}I|v찐+- | ra"-x[Qw*-C`5§t%"03NQϞ13bLeE7n-@A3xHP->Y5%^#쵋A]sd}H>5J1B![M ~SP;
-DJW֏+B*3`-gzۄo@>٫;.9^.qQݜ ߷2e~F}7k/ok;'SYv)_~/e77|>]DBwkq{p@xBؿPJ?.>V6F|ѵ-)],}_'Ujy<OKpޔz<.9ZzȫuNO/n<^S2rN ;\Z}?-uZ
-@蹝Y4#les|[|oMA:=-bu_-{n0E-:~6An@ N {+/=JDBu&\ۻ;yW`gv )+?Sggθ_ZE?bl7/><ƁwOz-6u/|_0{뿨\Lv>fŤ,fo`*KٿEŲXY9٤.!
-Bؿ:_4<4rH]faBa^pȗA:\)|HGq a.t`!vHqN0a>i!MT3&Rkl"]
-x-grS>azN< =k-ɦSq̈gNm̪GjJ
-xrF)ߨUxhmծsjzV ~%^?NRqMm
-%]y:+Cgh.gTMĐtn/
-,uR]ˀB"Rk!s:찑*rugro9p)#>dkNgZZYO
-zCjbOu:vB_)jwѭs=tku]-
-8T\_mO' xUB*IafK@aƙ7vHf2QHP#-im{@
-k>V_`%x<Rs@FHh>y*Hk륁ȦܺڟF}GrKۥnW[ϩ+mX4d:Zwσwdw9k].oo)mيgט72~rh.[!cFX\l3Hn:me2& !LkYQ U[3L5&14[ULj7z*kW8{]EvzI0v2
-c >xr,R4/q{̆,º*WIWעx끣˘a%l+pr.aZDx
-0l{š=Fr}I' |FrepuV@q,,WJ0ǥ:eH%2Qu](A>ŕ2D=XmW9^@Ris5!Ʉ
- 8k/Ce~㠙+)ݯKDK8@[묯*T3`Թn%O%~HЖr̰,oXJhE˭:ʠ
-(Q}f9]
-`Qak[2`oRWXfK0Do,f̈A3ö9˜l3䅎8cX2B{\n_d裰ϵnlafUJ>'B%VAD3*vZ1=l&7
--js}PDOXFA^m9Ai<r6zQ31Љ
-
-.C=Q 1ޅzQ k?eʁL!$O8~f!V13z\x(ReJ2
-q;m,J5CêrݰɭZz%-s2!! $@\,-Wy@bouX"⚈Ikb;!c0EF@77L&:&&:ZM5Fe.-u߈kҬY҂uJ#F{2`+҄YlXFLEU骐x<NT1/XPm(9Ih -p-c{%C 00בXB,f97EX@x1_po
-C"0KQOMBۛp[km9[Ңmv#PR$@!5f"h:&
-}Z8nٽuwlsV1lU9ےɂ<
-
-,kLt7-FuÊ<킵}j'(AV֥-:bz8.NBw+S~?l~ަodL
-,?4jzBD
-:^Cz0/N}r7ʽbί +.GpǃK3lB\r`9*zG<~TU-Q{Ue4U{HU*jSzTBrGʖBUSWn*
-Teւ[+TedUy4AUOTuUqT|UY*]\7VUZr۔ks*s*QUc^VӪF)ͣTe娃ʊѪ|ʲUi4f,V6>{${ح*F)GʂwԎ(ʼ,U*5R*U9i`tirU$ev\9LUf9Ue*C_VfU+)SU))^OkSy)W*W8*cʘQ9Q(#ya#Z*!Ve䈡ʈdUlR2*
-%#MIwT\I ӒD<8l2,B*CT%%8&&g/H*H,D'%..?vnLmn̏k̗Fxeoֹ|\OFy^x-s
-\Wct{=ìVX*@F5~'` sԶSzw=E3۫kd8,ϩm
-zn"n-i7)V՜UH/b<Kmr:~!~t^&g"I~KnZC99M^%Pt7@~J1`7N|?IQA]h;<EC7A{g@
-8B9)>IvgK[7I8PN@}<G^Q<zyj_-㤙u&$L߃?~4g[Ɋʒ~bCd꼾O>Ϣ":c#3Aa5yhbx>
-8z)gS&db>koYUicm7/x!NciJKS̾'>z`_LS1|:xh40z0ES* B<4f
-$6nb#hߦ$iuwx٢!H_3;u8kh2=Ɇs:|J\zC-5;iL\O[} Ssi2(e;,Nw0M"pd'qtT_dxԊ>Ucq%Vge?!fB̾1"pJkO8vGV!vjVwAGa`(~Vuj6G۬/-e7DI.xo;_X߲{otx5W73<?Yԛmw7r*%"ml+2a!UWg}àxIE?N2yw'uKp|mG-d[AvNv-y`[ю&:j߁8jj iCONhLORjTԚn/e0Sq$xŶaXlۺn-ħ]Gk"5Bh-uukg,pĿ2@H8-%!$3ШD_\bc}QV9'sp~0͐hiF=xd+8Sz[LJWҥvzάYN9=x'-sJﰃ>YQi1,AYoDVV&~zbbcu'5?Rw}$#R0g<ۣl'lcFG_a˙R:jD̘w2mEDx}1Ha7.o/egKI{r[ʓʶ+f8ȁ[Z:#"${;]#} wDUHu/'&$CTI9J}
-P%1pV.^v|Y}/veՓx]xW;?L8@VR>!#'66\jYV5GVrsMʂA\!R `rclݙYw2vIoC??+czQ\'NyHimjA?鹸O(&:J2;~;|él;~}:8n;Ct`K"_#sq<r)&3I53+nwKJÆD
-6rԨٳLJTҚ+eS˧<qtBtlsRt詊h '~#yO{`rZ<}rDܢ핧V\T}yn?ѿt~(v@qZQzݟf/{0`44u6|͎7Ԭ F{lf~|LiYfvk=>og25-Oȡq+Zwl-n>dTݨyS
-O&Nl,%bEDH*jFe3ϘI$*$`"fm;Cv;{<Mw=Ԯ;v.^Vd`f>9c[O6-"R˰;T' hRm0C WWTUШGi非1R'Wo잮aW8 n9.Ϟf@d wty.#^:]VuVǏ/{fnr>1jK\gE[} v\좞ٮN!Ya'x|Πn/
-stw5ko8zqǀaxcm9IѮ̜2l1DIB'n8sYF_dU(f2Kꧦ'Oy膇o<v3
-wpcҞ_,yY8ٵo}Hb27TܖH{n|~ìYw\ڞuux͋Ap
-KTtD+
-5:/G 8#y,WCݷGQ
-ϙ^[6\6fs'!.$@ .; ą"(EDH)ZH+"OJE棘OiצZž/dwΙMP_zA= AO[:G(S'Qiͦd/NY*%d*Ґ-<4q/۱ic_voO^J7:5Fuuo;}Dt)o$e
- Ze]L2Gi2cev-z]e;0Tb B#{|HBrrՑ:Vk\b`mP`u6=տLo籝;O&j:ھ~};|g\~oxu[kN[ce/m{WW_x-h*d~QR12ǧ<Y-Ͳƛ)F[UfF";xCO7%?,:W*u̹=aYq3Mju8fĴ26ٹHGTi#ʠE(}^kjbe82(1id83epYBo3}ppu?9j8g8zSWȋG=5pf%ye䩏&
-~,'\=%<3$2<a3Nf>D~Oa\rn&ທ$15t2rc{,'ׯ))W5֨aw<O7I|cƋϞ]?e> i7Y&fW[{d-8;CK N@
-Ic=K<C}s|;e$7igs0$I0MyvryeZ:gˉ;tn] ?P[3^ls~OS1IBݼ)#-)eI86]Ll8vȇ@]FcpJ`+/:jpUta['b`|Pހ x֘hjҨ$q7ڡ6{\i[BwQY6uJv=Z-%LGrg˲VE!J2DRu8^0sANq>C^SdO/^{i5w/}ꉶ1o=HnQhMM
-ySE* /#k\.Mikv<HgT1.LO4%I;};FVNe0'fT-TP)?msΦ]6=kcmmƦ9sƌ[hV&3[Y;뎂Y
-*vJsFB4AlgtY
-R;)4{.v*4P'7)7K1iOqsj?0ezJ75Pvޛ439-q>"n Ҵ9&38Ao4->-bՋlC3&Rc.0n)+!K
-vPp4FS1)"X,ʛ%&cR2sP*<Px[Ѹ8wѶ~UAZ1w*{~`ԙ]xAyﺮ+ՎhV`a5FpHc2tE˲^'ZDX/Gqdr[l;S!}ڎ^F3$w:kXthB4oakUYq"dFmQL!cEC81ZL8RFE왔#}hu82Gˎ}1ь
-ְ"-kM#Bhm=JMѳ"{b<CUAeū:;˂spn1#蝇HY8gdf
-П=p$+M^I
-0bkqoYB-Yp8>C=-w
-yW׃S:;%|ĤR-Y1/NQ=Hm+g
-q5Ɣz}քmYbSU|?Fkܐΐ%r.>09wjg0.
-4[21f췥j+1OtJKK҆SjQ.\1Rt,8U:i61JL_7-fDd0^fr.HoIAģs礧~oWeitUꓖ~xp8-h45r>;5Aֆ
-_?
- W{=ï&܉UbٵxJmF3=kO|'0:q!q%&f8$7WDҐ6xرa\։fo[,8KK_rD*!:.}m#~#7#Z8#+3Mkj# _`(\v=A)boe[YgF!'e=6tZj@օ.~}W$[ZP3~
-79+ep{"22ΡFPETU#';k+N*G|ƂBљ.8yY/7SEM[ȠAb9v 6Nߌ?/a*5'`߹Q+~xɔ-/;~wAއR_Z`;"x:JHBxX1, f5#T!Xsx
-}ftYsd'OJa;Rm*_-X͜"DKycOBëN.Ki@Vz%4NN-7w>y^ і"/E^4k?7*41}fkkDy?ZK ڋQ1I cgn4RCz+u
-'^4@-^V̩`j>zD/QkJ&"UY%x.j@7X16hJ]ߖlFwIG]7#*Mf+5ijL:5BHL6{Io5ު-jKDyYեq^TӂbO]([l߫
-w̵xmعH7-PN>+PLor+pY(>ɐ?NJܻ8?t6C"٪dﶠ'tr9pUu+4r
-V;.$Rc1b'1H;)zAL
-Enj6lsx%o3:00-Rڭ-~x~n,LEK MkOϤ?AHh'-fM$1&.v?YmWg"Q֭x~k?>zF9+4
-Nc/lB#/F.V_awƁWΩ6u(93zLR7.nm&l!yM7D%(d7^WtC'ů̧hid.r|T0\+d5LWAE]ģOi*ljIO2zԨ8SY,/LdM|S~X1fΨyݾG6{yЧ?{$3|<VJ/oYvyɒM
-B]/e]EˢOY/.#
-]vt>;߉RZ iN ow_f/MimRJoǧN#mkŔE3*Ǻs
-tAvz=JX?_ ||{HE%3;?J*`5SX3v=fLT0TpYI,cӊ<gN:ev8ԷIcJ"OVVLorQ̹7Nw>͛+۰xG:mlid
-]δ/~_JY/@NIi1zS})uBJl葺I[iੂA. [~VVvFhLVD#5E6Xy9eX%z$өES[V'kqD%6wӎW_ԫ}۶1YYinyi| n©,j,ͥmccH>.asF=lp6gj ;jŘA=U^%/Ʋx<߉4_]nB
-34z=xi(qy_{}Vzuב#ѓ&Wfyh0}LN{bƏ_?sJlouccӲ64yOL#7-ɍ&E^kl@fl#=,JdY|UŪpCzّ}Ғ>&Px UO~YMVs{gO}_2ظ4$GUj5gQWqJݒRҨ6M
-{Wji(*kc^dqi}@^Qߙ-%=i`OouVA'uϱIuZDrɟ@v8'o0fYR"NGv)ZeC46g}h\͝^>N6ʛ7_3NkأtKWXi-0Gd^d~0C",-Ti5Sf\"oK9Vj+1!y
-^5OnfynOd3z--sss$:#%R2~`}Tҝrq v7{
-x 9LFt`?
-^O=9 Ѐm"
-Hё5*VQ]
-b?>4R%֛}Ҟ+cL-`-TQQx'5uKM2?]#ӈ]41uyr$umBR
-Q r!+Xc`ۼ:c̜$2Z/wL3-jUiKx%zzzˆhJdyTl{2ߩ(>%!؆$2Q!NuV#j 6"ch&;='zZW2J^-mXA=gҹOnK3KBNyMx[ָ.E?vݨbatQ-SJ#Rza7.#OF+Lz[`+AB
-c4ZFc9y
-{-'<tk=8t2$DŽ^փQ|YZ2i13bBwh7s$y?0a"$Kl7:'JT<
-PtBU_?Fp%'5/)ZlB!lyI9_)rDI4˅zqa3]p,vtHmFAǠic{u{mwyy
-k+f>]W^BEϫsjOX^KwCJTyoZZ9]l=`WEQ56Q;&!%wI8IL:,7CҞDag&mFiLy[++4ny6._ظzsڞ4jqUٺ_2sĊuKtyy/LQelFXsS|q揟JSp;"D0Xqd6C" 2-.bF{H4yR6($aI+L^QChxKhAȤWP"HUE`Ǿo]
-BUgg4@-3۬4Jz3CLrG)Ukz 3gUTcܙK+[gPbg\MuϾ73[qQcT!UNSVJFkfqtqlI$}^ǮI),LY"ZFz-)QT>
-ZSQĻ_-y/9Q 2I1%V]n5=L>Jta'MƎNKlBmێ(-n/+5H>N3Uޟ6O3<Ѹ**yvSÌy38^yI9ON~Eډ]&mRFѼR_ҩ$Ŀ~كUv=[voy=7Soҹ$e$~a0mZlH{^KWhdbr
-F1'WJ>hxِu#ċ&-U_(BIUL41,E7+Y lR7TRCǣ̐=q%3&I;5HアcF$/V⢖</LKPҔ-29v4u%ڵ4xC*~5NͧR5E"q#Olv9ӨF4lXXO+Xw,*? Gvtv`'|ZiV ~lԉ@6gAua
-LkiBo x<?b]au/
-ֲה\gpc\#u.aܹuUu=\lx׀+".Ty6cd^I;3gzOt$ Qa0|Uv͟UA.XS8\[QkQ(pؘ2?<//kT38tVFW'0%nsZsC0)Xd*e=7+Yt7/=4SAD!VXqUhg;DJѢ$&jHeD
-G`S/>uClx<bY#)U2P8dL:JA@2JG ϰV!(|zZ^>r*n-i`rh`{
-Fhxkt̰^o<m.6hDy;?oS(
-R;!r-AsKAHe@fFt3>X$A
-UX@=ĭ!,1Fs #<8?6F<-(l%d%P=(!nIz?6$1F:2M<O$Q4~gGpA={eu&Ƀ0 2IH={&!$&L̋vrԶ
-k}[Э,J\+-"R9k}v~Lf&{7{$!CJ f7yߒ7thYc#yOL<NJU_&KedwFzod?H*FPb2ezܬ53I|FɡyvO)&/k.?Ky'wCsab N[[vO%dTMSTH3'LE22{/7/̯lh{$ePIO2f=?֫s)?.߁:J[/O(ٍbƲȳʚIoh$͝KABycXZXb_KGo.^oyhg<(6Ԕsu7+53#'[U=RYqI3c(;JSd0!̧>UNk2Ĭ$`)J;[FWweS2r٩KMKuBzWU[Tve7)SՁOYɊSNiγ{Z
-q$k
-T<+EXrXbVh6h{{{+
-O;$A-N<5ԗU1*3B.ry@4ʲ2!{ZS.{ӯ}x9PTDIYAnᇟ@JCEx|%laKT-<eqW,Nb`e÷-)=E~CO>aqg6}_~D?QX?gPkژk|ٸh10zuvcq"5'#u]aoow{zBٴ-/d|!-@
-kz"=UzM;|>˞,;=}kُd>)y->wssϛ *'\3aG_9{g&&NX=/(.{;4cФ_P'䤓=,XW\$$ [l(?]Y])Vў?TS`Yٔ)5SnvSNuO0~?L9ഫ=?ioMϘ>o]]2ђWKK;f3f8L-+*
-=VvOڿrWMOWЊߩ_髼Ggyf}}3UUUǪ_q'^$3 IHB$$! _x8c$W'
-;w-|LRRON Z%3PjFJ%Y.rHAtu2K hA*
-=" 8Ȏ1Z"
-Z&cVl% %Jy
-Z}>>K~J
-I5* $ax$*DHRwjI@!inx]0&0օav
-{vBfkXg"7aϜ~n)(Kh7tPLQnػKPTaVՋ; iAkjqpYY6JXY[!tg0hvW
-aq'W
-}=-=dfch`Rt?\w!jag|`fP
-]u;=YVuP#ʔC1#+-㊢!5xs~h
-S-F]OYe`뼹}Ю, Zs;At`vEf2艽˥2#R
-c|UQs"cd1,`#
-^
-:%)qVY0j[<̳ەׯ0kt3ڹ|aQO0a?gކv7r1ou|h:DM鳢/QّT)5>}/s?=d'$~*3/<;AA<5CٚGDaf۵/{OX؎Q!>F9r+^oFVb1jk?(NԪWe3C{B}koo-{&e3):qtoNk
-sidm>u|^x4Oޘuh#-g'6-Bxi;Faf@R܋ޅxͮM[@G
-[+l({j؊:Y
-Oe_b%mqkT)"jBGK1ɒsmvng¥,p3>#r9ꅴM<ui@ 'Dux61ӏ2}q=zrɚmR!l`_fqnES3Bb(DO7"B=ZW-סUw|@3y[>-[ŀa>jрh٭ w_h[V',=ao pmSււ۹V:\یW,6c,Ze9f\ΪEZVYHHG(l$-T;ڃ̞;ղܽ6.^{tٙkź
-y^O+Q^H"I-_N+._-?-z~Q~ ʯ}D~d\>JUJ7_ V@ZV6-GI mv`I
-{z`d-]:
-@?D<B7ҍ0-t?nz@w@?Gz?=--@1zFj`sT**se׆-xRF߮wg]Q{L~\?CWw)0T$-EF1ŘjL3%F)X
-B?}@;&-j#Au){_{}~b'Ǘ$
-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
-<</Filter/FlateDecode/Length 348>>
-stream
-x}Mn0taCFBHET{HYpD,ǼgթD7=&vRh@.pb":>-oz'+^IdN^
-79eКAύziz kWԻiޛ_ǬnFpЍR2feHqW_.-jUҘ9}UC''+TPF2G Ri+Qo['#BTY0z--GrtP$%G"Hx#p9H16Rt_[oZtpt-endstream
-endobj
-296 0 obj
-<</Filter/FlateDecode/Length 19576/Length1 48180>>
-stream
-x\y|SUI&JSx/}M
-@iiK@hi-K-&]FPQqD܀QR-88:tDgfq\ƙhwoJ(ߌ7I۹{ι@!d/I˸k-BxUlQb!CxԸUj<W6i3kys
-Bnh6{u<0.FLC<gNs}S~zu?*zPΘ3uSʯ"2wAcә
-[JۼXڠ}K5wm@(5kŭʝ=Hf5_݊2cfkW]̸oQ7?j&?vZƈCZ-wn+1E
-H(zZ@f}1n
-#A-H&W8|v⎣&n10GVD7XE<)'Cir4
-)P
-HeK
--9Vϗt1+Ya?-vIyՏLFV5 {KR+`-O0頄sUEc>]0]61<R⏣[=Pe|Gt\{|$RRl`<
-fy20j!3[Y.)X`(*?˦Ec\?%cgk%'uXl(lK!u$uBf+02g*YB-#%2Ie
-|7&g2ף2fc_U}ـՐ0N (,b9vQ`--ԯ*{KR~63Q}(oo.uT}N2-l?@z;=)d3_1JY<?}~QĶտ(vAݗl
-kX:X~dO9#и_R}G3ձ~@w@# 2 ba9}X2'h.?rG磠!R菳>>k+Bgu{r%}3|@\Ң((*%qYz26|]S^-oS뿼^C/ӝo*
-/<Ș]Dv;Ki/(t7y.Sד|7<EM|{a׳\;Y,olБ8.Gm#S_t,a4xUg;I_ϡel[P=$raGn}ƛb}w3:"xѾeߡkU>շxjT]|ET~p鹳-g0`^}Eb>EPftTOH!C >&-'x^wK۠-!Ƹ1-CfuXMfXH՟Ց76Z7ZkGѣoYZ{^;Nt_)pO_@t]+_gyFR8k}!
-!n6'!]鍀o"ĸW-F-|8
-U[K)Ð^GtbW=JOCz5>@~BY@Av(
-+?=*AsnPH4XV8X=
-#?HEL-`N۱єlJ|r-;do3жQSW9S$0aA
-krS!noP#R?(O^Nu!QBZP
-:BN$/Hۃ!|iZvX*nz
-Ij8̕3!GH-$P%*ÃBmjVFXZG{N;8ZgDA@[<jRezhÈ(6H 41h<zOrRu-^sC-CLygy\V$2lCUd.P熬d)'(XprӚB8dZFEKZtrq'QʥRJKQn-uW:LXMriP7x8&T#"@AՑf%('}qqNW6JHp:B~{hERjkE*/h2m9iAETHe.8&f
-w_4$T\SsNP[Tv.4Jq[ES`5EdC:8f7!i p!d`2 ]!$YAd>Y[!KeH8*KxkMݦqZT5j\ǂd$U`D䃁(aB
-sO9/ԨnJWG&yCU"wKdxAUYUIo)xz夫=0
-jTKEG_#NU?&靠-GL4Ibsʛٮds7^Z%'T
-C~J
-UQv3j*qX%``kcBra<$1vgd565у؋HhUv)qM5^]&
--s3+K]ȞE$'mF:2j.ԭlMgŨmW
-OT=>LvezVL2.A6+*2^Qt6,@<5m#4Z
->Mo9kfu.s WFP$el'.5ulxӘA/wHJ1`.B98\@C8`Fȃ+B+A˷ƪL˱])dP2M1-S1e_8]y$L܁f_vZbrx*5<k@p˔NN"4!3~HٜSG yX(*jW)
-Ho(*uW+ˮ-.K(bk".&q!+87gxm"sbK"'Ν niq"6'ĺř3(iqj8%:.z"N;C5&W)~8ѥU8!s8ީ2qd+}b后q<[,K'+(HKX,*>Ug8A[)bQS$0&
-ss\Tm7W;.Ok+fNpպRK#f,
-"d2YubsrҴI62vMMlj*%\b/8D+Zb,XTQZO
-6CNb՚}և|1WZYhpqWvI!}rVoBvTo;ƷmތzWT{r%Ff7P尻N6_Yڽy Wل!)r&`etaxB'ӸnF!QAo#,S0iAkt'Þ}H}fxFPGF`ht-ﴕ3|,X2B '逛8c1q%kHo w; {P}|.(pCsgO=(,!sp94ζ;F7Crpi6#+Jl~
-Yb0Azux[p;{P#v$r\2&sdsKԁ,:,ΏNl^(r')D<&UuL<ZݍDOrI'#`/|Փǣdt'IY3L |b\HS&srrlZmɅكFdAR<乑M[*s:Ssf-o;{,7S|ΧtnΝOa->m9<q7O[b牅qUc%'cXNrO)y~=J9#|D4=viH
-xb-`4ЫWN } =Y=rnW>#c:s߬_aܜ_TfENJ2nL5/=9^?sC>=:I>Gi|ŇwA*\/zļ<cw@,%hBl&
-(5E;/.RDbmw
-8P^魁֦s1C-F*dX79X}^tL3L \_x!cFq+&YnsG'-:`[ :/#A meՓ5
-zp /ߓM]<l١f>_~ѻϟm[tKy׃gÙ8͗ HzҐ7--Zu5r*/iܹ M75k,-,W1n_vӻքgv+$hfwo]ķL$yy&mo<&q1Xf&^<ol5>yrXzfݵ[74z4!ygxvJ0|53P%zLp3?W!j2:65 g|`M]j C3+O-9r?^y۰iҲ{y [M߰齮@|8z-x[J)fOLo>U"c./zYsE} om^(tI+*Iͱ|m-n$11մFkwFcw;}ո2>Ms'TD7
-
-,$;W0l4^ Dd.*0st 3xæߙ0tlŅ9ܶٿiyb8c>3EUn2Xx})s`x\lQY-ꪇS*7!
-vn`7'c2ί~?Ïv
-6h=qF] (
-Mxyx깇5o{}7B8?ߏ
-τ4+:7<$\ƪ V{ +9udqfl$ZN%مFo
-fs@0ѪF6G]1£F*a`v8m$x<tNK4f'!SȠs8\cَL
-h9J,춂$[E5N/wCn룥nKin3斫G?$һ{}_~uOxH(t\D6J1BmP⬃mL!D<U:\l7ϙ[?\}f;
-{¿oW0lioJIϱ=wO5,%r_XArXB!
-Q= .9GJkI
-s B
-Ov9a봹96myy-ǿӝvswtSZ:n0>ӯ/:Y~mּ
-3#KpR
-
-?k+UJ2PmYάc\YerI7pS%ؚޒwM-o]j[u*d<'y/n:xQ':J_l-nAk/4 ӓXju=[b[UE;5XX.{g9$v5ſ_{Cپ[}Mqι9丢gkvu6-vTӼ[N.20y/=9
-zhkI=5
-9"u
-;=z\:,ߛWsw\D˶U}xS~4N 9nL|HӃZ_-$EI+%Ƣ"SloH.HYaOL η@G;I33ruh
-<5uҀiEsQ~jik#&ܸh<3MǮ}ӈA{f87mAƜ0G9W<䑌"ĘjVyE-ۉȩke|@:g&<GLEw៴ԅ77*E~(
-v\U^?9<*?:obM_mc:Me4űs{,A)柽(oqTRE;.~pFqrjjy0DI+!F~lj>3"vmS_ƛ68en.[1B
--;jp`h'XwgZf9QpF dr!IqbڂBK&B)gbk4UexR ٯ߄ kۀ5ˋ,p#C-"84g_pbdW596VEpa'=d fYOMS9^t~~."BqPqcν!</說{t93IBHT& aT1p0 NOQ+<kZJϥ<[ZSۧhU sϽIzVkڿ},R'Ə_7#OMP^Et|HbfT;q<
-3(\/ayA%y0PDjb5`FDӃMO OuMZT
-˄0XYq 7s5NȒDU^><p7:-Lŭx;h+PWlƴ%fPEk`Sk*UNҶj
-*gu; ^dHtD-b!KE
-*nPˑȦS~.io`?%2t
-}d!-Po&Qk16Ԏ.ϝ˘6ݕ5y`B5taI״paAckkJAZr-٬ښ@yPX]#Q@N䥼E?SW\_sG#⫗<g#DG|5ԇAzs}Z
->wP|V`). o#D{mr
-ANEXA/j4>\Bc-<b9?L7Ibo+HBHC;B$t\ki-7,O|E/Z$<F@@]
-PNq(}6JˀoÈb>ڢk48<
-ANo"ɿK{XƴXFb͡w5υuc;UM`y$sk-N6m$kcaHM^w_B`y
-jԀ|27uSt
-5ml7l$7p#H:,$@|
-c6O3_ =:> .z0c$~h4hHf\E/cO<&̱-'
-w
-I_(ٳabNtRCeuv@8#)2?iSO7qs__$]7P$W~2!@\rtI7~/&c+t$rBՐɛdGID>&8#VwIAkb:Oz>KrM$f9:!\EZc)<'1Sa&C*b.'`l,y>CIkMdq/gܰR-W?
-ߐ//6`G3SvOIk3+DlZKR9]mm#`E]?%P:-s3ƹ%ŷ>0?~ъE76J}#GN#`D טP/Rz[wI{#[c}xaKz"Wh0T*ƝJ);}u<~>w˵G$UdwКP_BrՋoZ+-&Lsp(|9_y_!?pJ+{ՓǣSo$TJnOuR]LJ
-e*ywNW!LК-3y#X7FO, RY۔@o#.r)+:Ň,y?j`qSnm0>N>1FR{{Y!45v߀\qxzRn&Y}\8رrXC:7F?K.qF i{ZCI($xrz,:z_NSCG4Jwajx?jHۆ
-}Ćt2D^uՂHgfsGE'^+1}ҿOc
-tV9T<siidTŒ 9%);R-2Q>u/h,ӋE.DKM%><x,d10r=̠S29]Ljc8ÏB%3\`uiuS۰EK6KP?Ox9YGïh;t
-?-Co[CmZe:>CÔ&@:q|ѪxYp/7TxO^,^d{=aG
-B<g
-&lv!\tNK!v17.i,ߗ+>1עKKce"~q&1$V p-at/ux+">F,VbefW8fCPPDn#REii,tKcpBl(ʟcYxTnRG
-3*"?2. !\.Ifnu &gc[w>#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塊PbCeRi2-<ʣw]@('~_̟f3ZAR+t<乗Db.ȥ̚ԛiV|Pخ1WFSHCsC%rd
-HH)UP=DžqB0D=p("b+!alˑDx8vӕ%\;xB!|{/WN`+gF.fD㢈=5O-|s`)9pCxg`.88'|ʀ;oSԥ^z!z{)AT=z_xIDCǢr]6J9eIE鹶]+RlxW\%}FՐM
-邅['WuLmشw]{M\WR~xf
-rjrr$%g}A΄g/gE݇[ e)culӬ4Θ$x
-3wq+=fd}c'I@^^vKoھ[\67oek~W\}ҕW7-Zq|.XggN kS!g8l.yE5-/$r>63P//?bCidq0D84lGeSY,1Z&`%=^zx-(xz;-Uhͭgl {9|¼NO)H'$B~YI[C= m7|k_Hަ|oƢuSmg]fm7u*0eZ%-,bw
--qreiz{0'g⎵wbǃY^]W]tz+o͜?Aމ?4d|Ut/Țɾ;1^O+ʛQߴ R\}4mG
-nx,xSg-X+"Ⓐ?.B&i*1?;5HI#ʠ<ߚJ+-t)rXI*R|Io姯Llu<k`v2䐊s6Օ..L
-؉
-c(f]*f<|؉֢`r
-8r()!6nX8
-gTNrrnfE%6浖Np좞9Sz.(gsc_ƌ <-.dfn͚LUO.)^,9sRdO<jЂuꉎ/hEdIGIE]}<%72]S[ne r~QLa'{{ɕs6.d`~2?b9|̝5{ȅH=z5: =e&^(>(?ō|7#}.-%Ǧ0ޒѸAhi~ۨ3X7̔tz?H6@d̷[E2wLBnˎ
-wSCq2I:Loiѱ2_&s/hC<͡:2`ϓkF':SOX
-7A{zSMr/A-6QuܞذY4uj6 $ՋKl`/F/ޚԸՔC\nI,d[nse)K$7'4ni'x^U*3<ҧHiѡSFlA39c2T/5\9"NKW"#6tbAWK!EFl*VψHDApSHsmmßDz;~3R>$kGccp`oʗx
-%9JRV/i&yōeJxQ__hդQR̫ղ|nOг-*!7F"T8 TTMRA8y)>i
-yV&DyI ŀ.DfMhXG
-:T3u@д-oIMHn#@ٔ8=>x.]1>=)́z{ףQgU~^y6KEή +oy>rr` n]c5ZlPf9yCSĨ+2hvFn;5A[B>t^! !.2QȑFfBY(¹ C:El3l-'$NR!P浚W'0Jn,i7˧ߞ@P/Uj
-iM2lr0*4*xlGz)BY:F0Q,FP!G}#7:$̑y堃X,L,OE`9f&C>XA^Ĝ2ƁC):Z-ˈ8
-06nC_4/X'D//_lrx쿃6Խ+8ID[PrR0ϓDR*#`( WJi)50^T1d*g[xzwxc=Y<)dO$(.wbFx01=
-rHO˒[3_<'Ή;2~9'@Ƹ'%C3DA<b䩋S= "fۡ/GhR
-fnxRLm@r5\;]92iiA-9D⑈? oBDd~z?QE<]nĹB6" 9?"uIbx@AHlI0j(
--!spf]`^G0h^28<%CA
-'r~3gAr5\ zp
-
-R2-ʌ(ĪݟijWJ;2rMo$;Ҷm+-;[g6!GR4ϟpwJ[cIV 鍑P,tKw|Ib@OWKbIrc֏W{d6m1%g|t>5JHB+IHjzZOY>|3,MN.U&؞sv/{}}}aqƹǹΓAݕ
-Zh:;K\w{{O4^MmzӇ璼fow|:J{[[w/G䤶I$HmrzrqۓM>~_)ԢԋSpiӢ5קؖqSgcZǼCctg.ͼ2Yvdz9lsvQvMv}ّrnyɟGvr|I-OV{+~>O>Ot>OO:+(Ee7Vge5ԲpZ/P*Z6q(oPoV6TeH9e' !{cZPZcjьk,jYBIz_}șZ ~GT?PB~V~x^$T5
-h$?ZV5PGug7yl~}0n;|AZ?|'}ȳ~:>yz)|@jж#Q~i;RT(-8ౖ\RZ3yumhYƃby*%[%+nJv-i|~PCK&ܡ
-?oH2@)$s2K?2*??jIiGkMnh;2>곇γZԾ(v:*KU?#:(֙\I/.֣jwؓU:edA. ˨yy9QMmr|dmV9%;jF=鳎}1|Сe
-UѻHY/]3TszmtM6-C>]ZdFv
-ζ^5;ХQx~gQgBmj
-Qzz?V`5ae%]xPI1ވ5JKtA{SMVf/hA@K- EMgRfIj\MCj;eRmikYZmnP}ׯRZjT[6bb̒ZUlsg)AkcQv(![OJmKkB:tЕ;Th/
-ᵌ*͂
-}>ibU@,Y@5Ey7d@oϙm賊NdFiou=dT_}'Wo=a0G0}붏!M]D[tP箷D:TLY[hJgUt70gzvJ'XT[ya_;PF̱z\,_aǰ/u :3ӧNC[~<BYG$S1bx~9i#ݪl(W.:kiYXЭ^}/~]`O,>64}j~EJ}^l<r(gmy8lsjFEVJ13qfe!-*2Q/WN*c"^=A(t|Rag&FX#3$V-0uK>VxӥF
-y]3aBZ_D["y!Y5[3<m'ТUϥZe2|Fbc,~|c-h)Fk-ұSjQۑM
-D|CZylxf5·0LƞE#QI<*
-TFdEtOh(/|>#2:UjQC=㥅R4(j07i1ZD 3-R[Q ?ʹ?{)leRRʒAX?:h2?:BUDjstZh}
-ʄFH60rB1n[, YښT 1u31ȰE*x.: Ǹ`rnP&w><UMFS[.%tŵV
-TU:W`GT+S/_mh!X$l
-[ui|P=pI8C3֒(w5:<BC_]qPJy>6^OaHFn0[i:xO!at#DWZ'IOk _B].oC'?ş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
-<</Type/Metadata/Subtype/XML/Length 3060>>
-stream
-<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1-701">
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-<rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
-<pdf:Producer>Microsoft® Word 2016</pdf:Producer></rdf:Description>
-<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">
-<dc:creator><rdf:Seq><rdf:li>Amit Dutta</rdf:li></rdf:Seq></dc:creator></rdf:Description>
-<rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/">
-<xmp:CreatorTool>Microsoft® Word 2016</xmp:CreatorTool><xmp:CreateDate>2025-11-27T22:07:02+05:30</xmp:CreateDate><xmp:ModifyDate>2025-11-27T22:07:02+05:30</xmp:ModifyDate></rdf:Description>
-<rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
-<xmpMM:DocumentID>uuid:9D00B1CA-14A4-4889-B00B-F7EBECDEE165</xmpMM:DocumentID><xmpMM:InstanceID>uuid:9D00B1CA-14A4-4889-B00B-F7EBECDEE165</xmpMM:InstanceID></rdf:Description>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-</rdf:RDF></x:xmpmeta><?xpacket end="w"?>
-endstream
-endobj
-299 0 obj
-<</DisplayDocTitle true>>
-endobj
-300 0 obj
-<</Type/XRef/Size 300/W[ 1 4 2] /Root 1 0 R/Info 49 0 R/ID[<CAB1009DA4148948B00BF7EBECDEE165><CAB1009DA4148948B00BF7EBECDEE165>] /Filter/FlateDecode/Length 670>>
-stream
-x=iPMaEkUvZ)KU!K-,EȒPKeV*kBxDu33sQGKQ
-YPPՂ=rACQS0v743?s-B^$4x
-itW=g]B{'njh/54@xA{-C 7?8-cƂ78`"$0!- s
-<`!,hXK`),V*e/FUI_-VA5 z-p98"\"(PPW*\P7&܂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
-<</Size 301/Root 1 0 R/Info 49 0 R/ID[<CAB1009DA4148948B00BF7EBECDEE165><CAB1009DA4148948B00BF7EBECDEE165>] >>
-startxref
-185797
-%%EOF
-xref
-0 0
-trailer
-<</Size 301/Root 1 0 R/Info 49 0 R/ID[<CAB1009DA4148948B00BF7EBECDEE165><CAB1009DA4148948B00BF7EBECDEE165>] /Prev 185797/XRefStm 184924>>
-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 <stdio.h>
-#include <math.h>
-
-int isPrime(int);
-
-int main()
-{
- int n;
- printf("Enter the number: ");
- scanf("%d", &n);
-
- if (isPrime(n))
- {
- printf("\nInput %d is a Prime Number.", n);
- }
- else
- {
- printf("\nInput %d is not a Prime Number.", n);
- }
-
- return 0;
-}
-
-int isPrime(int n)
-{
- if (n <= 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 <= 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 <stdio.h>
-#include <math.h>
-
-int isArmstrong(int);
-int count(int);
-
-int main()
-{
- int n;
- printf("Enter the number: ");
- scanf("%d", &n);
-
- if (isArmstrong(n))
- {
- printf("\nInput %d is a Armstrong Number.", n);
- }
- else
- {
- printf("\nInput %d is Not a Armstrong Number.", n);
- }
-
- return 0;
-}
-
-int count(int n)
-{
- int count = 0;
- while (n > 0)
- {
- count++;
- n = n / 10;
- }
- return count;
-}
-
-int isArmstrong(int n)
-{
- if (n < 0)
- return 0;
- if (n == 0)
- return 1;
-
- int power = count(n);
- int temp = n;
- int checker = 0;
-
- while (temp > 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 <stdio.h>
-
-int isPerfect(int);
-
-int main()
-{
- int n;
- printf("Enter the number: ");
- scanf("%d", &n);
- if (isPerfect(n))
- {
- printf("\nInput %d is a Perfect Number.", n);
- }
- else
- {
- printf("\nInput %d is not a Perfect Number.", n);
- }
- return 0;
-}
-
-int isPerfect(int n)
-{
- if (n <= 1)
- return 0;
- int temp = 1;
- int i;
- for (i = 2; i <= 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 <stdio.h>
-
-int main()
-{
- int month, year, days;
- printf("Enter the month (1 to 12) and year: ");
- scanf("%d %d", &month, &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) && (year % 100 != 0)))
- {
- days = 29;
- }
- else
- {
- days = 28;
- }
- break;
- default:
- printf("\nYou entered something wrong.");
- return 0;
- }
-
- printf("\nNumber of days: %d", 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<stdio.h>
-
-int main() {
- int inp, result_sum = 0, result_product = 1, temp;
- printf("Please enter the number : ");
- scanf("%d",&inp);
- printf("\n");
-
- if (inp < 0) {
- printf("\nPlease enter a valid non negetive integer.");
- return 1;
- }
-
- temp = inp;
- while (temp != 0 ) {
- result_sum = result_sum + (temp % 10);
- result_product = result_product * (temp % 10);
- temp = temp / 10;
- }
-
- printf("\nSum of the digits of the input number '%d' is : %d"
- "\nProduct of the digits of the input number '%d' is : %d",
- 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<stdio.h>
-
-int main() {
- int inp, result = 0, temp;
- printf("PLease enter the number you want to reverse : ");
- scanf("%d",&inp);
- printf("\n");
-
- if (inp < 0) {
- printf("\nPlease enter a non negetive integer.");
- return 1;
- }
-
- temp = inp;
- while ( temp != 0) {
- result = (result * 10) + (temp % 10);
- temp = temp / 10;
- }
-
- printf("\nReverse of the input '%d' is : %d", 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<stdio.h>
-
-int main() {
- int n, i;
- float result = 0;
- printf("Please enter the value for 'n' : ");
- scanf("%d", &n);
- printf("\n");
-
- if (n <= 0) {
- printf("\nPlease enter a positve number greater than ZERO.");
- return 1;
- }
-
- for (i = 1; i <= n; i++) {
- result = result + (1.0 / i);
- }
-
- printf("\nSum of the first %d terms of the following series S =1+1/2+1/3+1/4+...... is : %f",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<stdio.h>
-
-int main() {
- int n, result = 0, temp, i;
- printf("Please enter the value for 'n' for this series 's = 1-2+3-4+5-....': ");
- scanf("%d",&n);
- printf("\n");
-
- if (n <= 0) {
- printf("\nPlease enter a positive integer.");
- return 1;
- }
-
- for (i = 1; i<= n; i++) {
- if (i % 2 == 0) {
- result = result - i;
- }
- else {
- result = result + i;
- }
- }
-
- printf("\nAns : %d", 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<stdio.h>
-
-int isPrime(int inp) {
- int i, is_prime = 1;
-
- if (inp < 2) is_prime = 0;
-
- for (i = 2; i <= inp / 2; i++) if (inp % i == 0) {
- is_prime = 0;
- break;
- }
-
- return is_prime;
-}
-
-
-int main() {
- int inp, i;
- printf("Enter the number you want to check : ");
- scanf("%d",&inp);
- printf("\n");
-
- if (isPrime(inp)) printf("\nGiven input '%d' is a Prime Number.",inp);
- else printf("\nGiven input '%d' is not a Prime Number.",inp);
-
- printf ("\nSeries of prime number upto 100 : ");
- for (i = 2; i < 100; i++) if (isPrime(i)) printf(" %d",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<stdio.h>
-#include<string.h>
-
-int isPalindrome(char inp[]) {
- int len = strlen(inp);
- int i = 0; //starting point
- int j = len - 1; //end point
-
- while (i < j) {
- if (inp[i] != inp[j]) {
- return 0;
- }
- i++;
- j--;
- }
-
- return 1;
-}
-
-int main() {
- char inp[20];
- printf("Enter the number : ");
- scanf("%s",inp);
- if (isPalindrome(inp)) printf("\n\nInput '%s' is a Palindrome number.", inp);
- else printf("\n\nInput '%s' is not a Palindrome number.", 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<stdio.h>
-#include<stdlib.h>
-
-int main() {
- int inp, num, i;
- printf("Please enter the number to get the factors from it : ");
- scanf("%d", &inp);
-
- num = abs(inp);
-
- if (num == 0) {
- printf("\n\n0 has infinitely many factors (all integers).");
- return 1;
- }
-
- printf("\n\nThe factors of ' %d ' is :- ", inp);
- printf("\nPositive : ");
- for (i = 1; i <= num ; i++) if (num % i == 0) printf(" %d", i);
- printf("\nNegative : ");
- for (i = 1; i <= num ; i++) if (num % i == 0) printf(" %d", -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'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' 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 (&&, ||) 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 <stdio.h>
-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("------ Home Security Controller ------\n");
- printf("Enter sensor states (1 for active, 0 for inactive).\n");
- printf("Format: [Door] [Window] [Motion] [Glass Break]\n");
- printf("Example: 0 1 1 0\n");
- printf("Enter states (or press Ctrl+D for MacOS or Linux / Ctrl+Z for Windows to exit): ");
-
- // doing the main calculation
- // chacking the combined state and taking a decision
- while (scanf("%d %d %d %d", &doorSensorState, &windowSensorState, &motionSensorState, &glassbreakSensorState) == 4)
- {
- // validating input
- // The expression (variable & ~1) results in 0 only if 'variable' is 0 or 1.
- // For any other positive number, it'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 & ~1) | (windowSensorState & ~1) | (motionSensorState & ~1) | (glassbreakSensorState & ~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 << 3) | (motionSensorState << 2) | (windowSensorState << 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 'default' case in the switch.
- // We achieve this by multiplying the flag (which is > 0) by 16.
- combinedState += invalidFlag * 16;
-
- // printing the given state
- printf("\n\nState : [Door : %d, Window : %d, Motion : %d, Glass Break : %d]\nState Id : %d",
- doorSensorState, windowSensorState, motionSensorState, glassbreakSensorState, combinedState);
- printf("\nSystem Action : ");
-
- // taking decision based on combined state
- // A single switch statement controls the program'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("System Idle. All sensors inactive.\n");
- break;
- case 1: // Binary: 0001
- printf("Check front door camera.\n");
- break;
- case 2: // Binary: 0010
- printf("Check window sensors.\n");
- break;
- case 3: // Binary: 0011
- printf("Warning: Perimeter breach suspected. Check doors and windows.\n");
- break;
- case 4: // Binary: 0100
- printf("Check interior cameras for movement.\n");
- break;
- case 5: // Binary: 0101
- printf("Warning: Potential entry and movement detected. Check front door and interior. Ask for patrol.\n");
- break;
- case 6: // Binary: 0110
- printf("Warning: Potential entry and movement detected. Check windows and interior. Ask for patrol.\n");
- break;
- case 7: // Binary: 0111
- printf("Alert: High probability of unauthorized entry. Ask for patrol.\n");
- break;
- case 8: // Binary: 1000
- printf("Alert: Glass break detected. High-priority event. Ask for patrol.\n");
- break;
- case 9: // Binary: 1001
- printf("Severe Alert: Forced entry likely (door + glass). Activate Alarm and Contact authorities.\n");
- break;
- case 10: // Binary: 1010
- printf("Severe Alert: Forced entry likely (window + glass). Activate Alarm and Contact authorities.\n");
- break;
- case 11: // Binary: 1011
- printf("Intrusion Alert: Multiple perimeter breaches. Activate Alarm and Contact authorities.\n");
- break;
- case 12: // Binary: 1100
- printf("Intrusion Alert: Confirmed interior presence after breach. Activate Alarm and Contact authorities.\n");
- break;
- case 13: // Binary: 1101
- printf("INTRUSION CONFIRMED! Activate maximum response protocol. Activate Alarm and Contact authorities.\n");
- break;
- case 14: // Binary: 1110
- printf("INTRUSION CONFIRMED! Activate maximum response protocol. Activate Alarm and Contact authorities.\n");
- break;
- case 15: // Binary: 1111
- printf("CATASTROPHIC EVENT! ALL SENSORS TRIGGERED. ACTIVATE ALARM AND CONTACT COPS.\n");
- break;
- default:
- // This case should not be reached with valid 0/1 input but is included for completeness.
- printf("Error: Invalid sensor state detected.\n");
- break;
- }
-
- // discarding extra characters (if any) left
- while (getchar() != '\n')
- ;
-
- // asking for next set of input
- printf("\nEnter next set of states: ");
- }
- printf("\nSecurity system shutting down.\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">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's behavior.
- * 5. The program should handle all possible combinations of the sensors' 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 <stdio.h>
-
-int casekey(int door, int window, int motion, int glass) {
- int key = (door << 3) | (window << 2) | (motion << 1) | glass;
- return key;
-}
-
-int main() {
- int door, window, motion, glass, key;
- char choice;
-
- static const char *action[16] = {
- "IDLE", "CHECK WINDOW", "WARN MOTION", "WARN MOTION WINDOW",
- "CHECK DOOR", "WARN DOOR WINDOW", "INTRUSION SUSPECTED", "INTRUSION CONFIRMED",
- "GLASS ONLY", "DOOR GLASS", "MOTION GLASS", "MOTION WINDOW GLASS",
- "DOOR WINDOW", "DOOR WINDOW GLASS", "DOOR MOTION GLASS", "ALL SENSORS"
- };
-
- do {
- printf("Sensors: Door, Window, Motion, Glass\n");
- printf("Enter the state of each sensor in binary (0 or 1): ");
- scanf("%d %d %d %d", &door, &window, &motion, &glass);
-
- key = casekey(door, window, motion, glass);
- printf("Action: %s\n", action[key]);
-
- printf("Want to continue? (y/n): ");
- scanf(" %c", &choice);
- printf("\n");
- } while (choice == 'y' || choice == 'Y');
-
- 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 <stdio.h>
-int main()
-{
- // testing number
- int num, len = -13 /* here minus 13 because we will remove the massage characters in line 10 */;
- printf("Enter a number to get the length : ");
- scanf("%d", &num);
- len += printf("Your input : %d", num); // here the "Your input : ", this 13 characters are extra
- printf("\nLength : %d", len);
-
- // testing char
- char a[20];
- len = -13;
- while (getchar() != '\n')
- ;
- printf("\nEnter a word to get the length : ");
- scanf("%19s", &a);
- len += printf("Your input : %s", a); // here the "Your input : ", this 13 characters are extra
- printf("\nLength : %d", 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 <stdio.h>
-int main()
-{
- printf("Starting.....\n");
-
- for (int i = 1; ; i++)
- {
- printf("i = %d\n", 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<stdio.h>
-int main() {
- float f, c;
- printf("Enter the temperature of city in Fahrenheit : ");
- scanf("%f", &f);
- // formula (F - 32) 5/9
- c = ((f - 32) * 5) / 9;
- printf("\nTemperature in centigrade : %f", 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 <stdio.h>
-#include <math.h>
-int main()
-{
- double len, bre, r, area_r, per, area_c, cir;
- printf("Enter the length and breadth of the rectangle : ");
- scanf("%lf %lf", &len, &bre);
- printf("Enter the Radius of the circle : ");
- scanf("%lf", &r);
- area_r = len * bre;
- per = 2 * (len + bre);
- area_c = M_PI * r * r;
- cir = 2 * M_PI * r;
- printf("\nArea of Rectangle : %lf"
- "\nPerimeter of Rectangle : %lf"
- "\nArea of Circle : %lf"
- "\nCircumference of Circle : %lf",
- 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<stdio.h>
-#include<math.h>
-int main() {
- double s_long = 1189.0, s_short = 841.0, temp;
- int i;
- printf("A0 Dimension : %g mm x %g mm", floor(s_long), floor(s_short));
- for (i = 1; i <= 8; i++) {
- temp = s_long;
- s_long = s_short;
- s_short = temp / 2;
- printf("\nA%d Dimension : %g mm x %g mm", 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'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 <stdio.h>
-int main()
-{
- int inp, result = 0, i, temp;
- printf("Enter a five digit number : ");
- scanf("%d", &inp);
- if (inp < 10000 || inp > 99999)
- {
- printf("\nPlease enter a valid five digit number.");
- return 1;
- }
- temp = inp;
- for (i = 1; i <= 5; i++)
- {
- result = result + (inp % 10);
- inp = inp / 10;
- }
- printf("\nSum of the digit '%d' is : %d", 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 <stdio.h>
-#include <math.h>
-int main()
-{
- double x, y, r, phi;
- printf("Enter the Cartesian Co-Ordinates in this format 'x, y' : ");
- scanf("%lf, %lf", &x, &y);
- r = sqrt(pow(x, 2) + pow(y, 2));
- phi = atan2(y, x);
- printf("\nPolar Co-Ordinates are : (%g, %g Rad)", 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 <stdio.h>
-#include <math.h>
-int main()
-{
- double l1, l2, g1, g2, d;
- printf("Enter the Latitude in 'L1, L2' format : ");
- scanf("%lf, %lf", &l1, &l2);
- printf("Enter the Longitude in 'G1, G2' format : ");
- scanf("%lf, %lf", &g1, &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("Distance in nautical miles : %g", 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 <stdio.h>
-#include <math.h>
-int main()
-{
- double t, v, wcf;
- printf("Enter the temperature and velociy of the wind : ");
- scanf("%lf %lf", &t, &v);
- wcf = 35.74 + (0.6215 * t) + (((0.4275 * t) - 35.75) * pow(v, 0.16));
- printf("\nWind-chill factor (wcf) : %g", 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 <stdio.h>
-#include <math.h>
-int main()
-{
- double inp, rsin, rcos, rtan, rcosec, rsec, rcot;
- printf("Enter the Angle in degree : ");
- scanf("%lf", &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("\nTrigonometric ratios :-"
- "\nsin = %g "
- "\ncos = %g"
- "\ntan = %g"
- "\ncosec = %g"
- "\nsec = %g"
- "\ncot = %g",
- 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 <stdio.h>
-int main()
-{
- double a, b;
- printf("Enter the two number A and B : ");
- scanf("%lf %lf", &a, &b);
- printf("\nBefore Interchange : ");
- printf("\nA = %g (Memory location = %p)", a, &a);
- printf("\nB = %g (Memory location = %p)", b, &b);
- a = a + b;
- b = a - b;
- a = a - b;
- printf("\nAfter Interchange :");
- printf("\nA = %g (Memory location = %p)", a, &a);
- printf("\nB = %g (Memory location = %p)", b, &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 <stdio.h>
-int main()
-{
- int num, rev, temp, i;
- printf("Please enter the number : ");
- scanf("%d", &num);
- if (num < 10000 || num > 99999)
- {
- printf("\nPlease enter a five digit number.");
- return 1;
- }
- temp = num;
- for (i = 1; i <= 5; i++)
- {
- rev = (rev * 10) + num % 10;
- num = num / 10;
- }
- printf("\nReverse of the Input number : %d", rev);
- if (rev == temp)
- printf("\nOriginal and reversed numbers are equal.");
- else
- printf("\nOrigianl and reversed numbers are not equal.");
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
-int main()
-{
- int ram, shyam, ajay;
- printf("Please enter the age of Ram, Shyam and Ajay : ");
- scanf("%d %d %d", &ram, &shyam, &ajay);
- if (ram == shyam || ram == ajay || shyam == ajay)
- printf("\nThree must have different age.");
- if (ram < shyam && ram < ajay)
- printf("\nRam is the youngest. Age : %d", ram);
- if (shyam < ram && shyam < ajay)
- printf("\nShyam is the youngest. Age : %d", shyam);
- if (ajay < ram && ajay < shyam)
- printf("\nAjay is the youngest. Age : %d", 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 <stdio.h>
-int main()
-{
- double angle1, angle2, angle3, sum;
- printf("Enter the value of the three angle of the triangle : ");
- scanf("%lf %lf %lf", &angle1, &angle2, &angle3);
- sum = angle1 + angle2 + angle3;
- if (sum == 180.0)
- printf("\nThis Triangle is a valid one.");
- else
- printf("\nThis Triangle is not valid. Sum of the angles : %g", 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 <stdio.h>
-#include <math.h>
-int main()
-{
- double num;
- printf("Enter the number : ");
- scanf("%lf", &num);
- num = abs(num);
- printf("\nAbsolute value of the input is : %g", 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'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 <stdio.h>
-int main()
-{
- double len, bre, area, peri;
- printf("Enter the length and breadth of the rectangle : ");
- scanf("%lf %lf", &len, &bre);
- area = len * bre;
- peri = 2 * (len + bre);
- if (area > peri)
- printf("\nThe area of the rectangle is greater than it's perimeter.");
- else if (area < peri)
- printf("\nThe area of the rectangle is lower than it's perimeter.");
- else
- printf("\nThe area of the rectangle is same as it's 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">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 <stdio.h>
-#include <math.h>
-#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("Enter the point A(x1, y1) : ");
- scanf("%lf %lf", &x1, &y1);
- printf("Enter the point B(x2, y2) : ");
- scanf("%lf %lf", &x2, &y2);
- printf("Enter the point C(x3, y3) : ");
- scanf("%lf %lf", &x3, &y3);
- area = 0.5 * ((x1 * (y2 - y3)) + (x2 * (y3 - y1)) + (x3 * (y1 - y2)));
- if (fabs(area) < EPSILON) // abs() for integer, fabs() for float, double
- printf("\nA(%g, %g), B(%g, %g) and C(%g, %g) points fall on one straight line.", x1, y1, x2, y2, x3, y3);
- else
- printf("\nA(%g, %g), B(%g, %g) and C(%g, %g) points doesn't fall on one straight line.", 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 <stdio.h>
-#include <math.h>
-// 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("Enter the center coordinates (h, k) : ");
- scanf("%lf %lf", &h, &k);
- printf("Enter the radius (R) : ");
- scanf("%lf", &R);
- printf("Enter the point P coordinates (x, y) : ");
- scanf("%lf %lf", &x, &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) < EPSILON)
- {
- printf("The point P(%g, %g) lies ON THE CIRCLE.\n", x, y);
- }
- // Case 2: Inside the circle (D^2 < R^2)
- else if (distance_sq < radius_sq)
- {
- printf("The point P(%g, %g) lies INSIDE THE CIRCLE.\n", x, y);
- }
- // Case 3: Outside the circle (D^2 > R^2)
- else
- {
- printf("The point P(%g, %g) lies OUTSIDE THE CIRCLE.\n", 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 <stdio.h>
-#include <math.h>
-#define EPSILON 0.00001
-
-int main()
-{
- double x, y;
- printf("Enter the point P(x, y) : ");
- scanf("%lf %lf", &x, &y);
- if (fabs(x) < EPSILON && fabs(y) < EPSILON)
- printf("\nPoint P(%g, %g) lies on the origin.", x, y);
- else if (fabs(x) < EPSILON)
- printf("\nPoint P(%g, %g) lies on the Y-Axis.", x, y);
- else if (fabs(y) < EPSILON)
- printf("\nPoint P(%G, %g) lies on the X-Axis.", x, y);
- else
- printf("\nThe point P(%g, %g) lies in a QUADRANT (not on an axis or the origin).", 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 <stdio.h>
-
-/**
- * @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 && 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[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
-
- printf("Enter the year (e.g., 2025): ");
- if (scanf("%lld", &year) != 1 || year < 1) {
- printf("Invalid year input. Please enter a positive integer year (>= 1).\n");
- 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 < 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("\nOn January 1st, %lld, the day was: **%s**.\n", 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 <stdio.h>
-
-int is_leap(int year) {
- if ((year % 400 == 0) || (year % 4 == 0 && 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[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
-
- printf("Enter the year (e.g., 2025): ");
- if (scanf("%lld", &year) != 1 || year < 1) {
- printf("Invalid year input. Please enter a positive integer year (>= 1).\n");
- 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("\nOn January 1st, %lld, the day was: %s.\n", 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 <stdio.h>
-#include <math.h>
-
-#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("Please enter the length of three side of the triangle : ");
- scanf("%lf %lf %lf", &side1, &side2, &side3);
- if (side1 < 1 || side2 < 1 || side3 < 1)
- {
- printf("\nLength of a side of triangle should be a positive integer.");
- return 1;
- }
- if (side1 + side2 < side3 || side1 + side3 < side2 || side2 + side3 < side1)
- {
- printf("\nEntered triangle is not VALID.");
- return 1;
- }
- // isosceles check
- if (side1 == side2 || side2 == side3 || side3 == side1)
- printf("\nEntered triangle is a ISOSCELES triangle.");
- else
- printf("\nEntered triangle is NOT a ISOSCELES triangle.");
- // equilateral check
- if (side1 == side2 && side2 == side3)
- printf("\nEntered triangle is a EQUILATERAL triangle.");
- else
- printf("\nEntered triangle is NOT a EQUILATERAL triangle.");
- // scalene check
- if (side1 != side2 && side2 != side3)
- printf("\nEntered triangle is a SCALENE triangle.");
- else
- printf("\nEntered triangle is NOT a SCALENE triangle.");
- // right-angle check
- if (fabs(((side1 * side1) + (side2 * side2)) - (side3 * side3)) < EPSILON ||
- fabs(((side2 * side2) + (side3 * side3)) - (side1 * side1)) < EPSILON ||
- fabs(((side3 * side3) + (side1 * side1)) - (side2 * side2)) < EPSILON)
- printf("\nEntered triangle is a RIGHT-ANGLED triangle.");
- else
- printf("\nEntered triangle is NOT a RIGHT-ANGLED triangle.");
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
-
-// declaring function
-double get_white(double red, double green, double blue)
-{
- double max;
- max = red / 255;
- if (max < (green / 255))
- max = green / 255;
- if (max < (blue / 255))
- max = blue / 255;
- return max;
-}
-
-int main()
-{
- double r, g, b, w, c = 0, m = 0, y = 0, k = 0;
- printf("Enter the RGB color code in 'R G B' format : ");
- scanf("%lf %lf %lf", &r, &g, &b);
-
- // checking for invalid input (negetive input)
- if (r < 0 || g < 0 || b < 0)
- {
- printf("\nRGB color code can not be a negetive number.");
- return 1;
- }
-
- // checking for invalid input (out of range color code)
- if (r > 255 || g > 255 || b > 255)
- {
- printf("\nRGB color code can be maximum (255, 255, 255).");
- return 1;
- }
-
- // converting RGB color code to CMYK color code
- if (r == 0 && g == 0 && 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("\nRGB color (%g, %g, %g) equivalent to CMYK color (%g, %g, %g, %g).", 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 <stdio.h>
-int main()
-{
- double hardness, carbon_content, tensile_strength;
- printf("Enter the details of the steel below - \n");
- printf("1. Hardness : ");
- scanf("%lf", &hardness);
- printf("2. Carbon Content : ");
- scanf("%lf", &carbon_content);
- printf("3. Tensile Strength : ");
- scanf("%lf", &tensile_strength);
-
- // storing how many conditions are met as boolean result
- int condition_met, condition1, condition2, condition3;
- condition1 = hardness > 50;
- condition2 = carbon_content < 0.7;
- condition3 = tensile_strength > 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 && condition2)
- grade = 9;
- else if (condition2 && condition3)
- grade = 8;
- else if (condition1 && condition3)
- grade = 7;
- }
- else if (condition_met == 1)
- grade = 6;
- else
- grade = 5;
-
- // printing the result
- printf("\n------------- Result -------------");
- printf("\n1. Hardness : Condition %s", condition1 ? "MET" : "DID NOT MET");
- printf("\n2. Carbon Content : Condition %s", condition2 ? "MET" : "DID NOT MET");
- printf("\n3. Tensile Strength : Condition %s", condition3 ? "MET" : "DID NOT MET");
- printf("\nTotal Condition Met : %d", condition_met);
- printf("\n\nGrade : %d\n\n", 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 < 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 >= 40
-*/
-/* Author - Amit Dutta, Date - 4th OCT, 2025 */
-/* Let Us C, Chap- 4, Page - 72, Qn No.: D(d) */
-
-#include <stdio.h>
-
-int main()
-{
- double weight, height, bmi;
- printf("Enter your Weight (in Kilograms) and Height (in Meters) : ");
- scanf("%lf %lf", &weight, &height);
- bmi = weight / (height * height);
- printf("\nCalculated BMI : %g", bmi);
- if (bmi < 15)
- printf("\nBMI Catagory : Starvation");
- else if (bmi >= 15.1 && bmi <= 17.5)
- printf("\nBMI Catagory : Anorexic");
- else if (bmi >= 17.6 && bmi <= 18.5)
- printf("\nBMI Catagory : Underweight");
- else if (bmi >= 18.6 && bmi <= 24.9)
- printf("\nBMI Catagory : Ideal");
- else if (bmi >= 25 && bmi <= 25.9)
- printf("\nBMI Catagory : Overweight");
- else if (bmi >= 30 && bmi <= 39.9)
- printf("\nBMI Catagory : Obese");
- else if (bmi >= 40)
- printf("\nBMI Catagory : Morbidly Obese");
- else
- printf("\nBMI Catagory : Unclassified");
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
-int main()
-{
- char inp;
- printf("Enter the character : ");
- scanf("%c", &inp);
- printf("\nInput Character '%c' is %s a LOWER CASE ALPHABET.", inp,
- (inp >= 'a' && inp <= 'z') ? "" : "NOT");
- printf("\nInput Character '%c' is %s a SPECIAL SYMBOL.", inp,
- (inp >= 'a' && inp <= 'z' || inp >= 'A' && inp <= 'Z'
- || inp >= '0' && inp <= '9') ? "NOT" : "");
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
-int main()
-{
- int year;
- printf("Enter the year : ");
- scanf("%d", &year);
- printf("\nYear %d is %s a Leapyear.", year, (year % 400 == 0 || year % 4 == 0 && year % 100 != 0) ? "" : "NOT");
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
-int main()
-{
- double num1, num2, num3, max;
- printf("Enter three number : ");
- scanf("%lf %lf %lf", &num1, &num2, &num3);
- printf("\nGreatest of the three number '%g', '%g' and '%g' is : '%g'", num1, num2, num3,
- (num1 > num2 && num1 > num3) ? num1 : ((num2 > num1 && num2 > 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 <stdio.h>
-#include <math.h>
-#define EPSILON 0.0000001
-
-int main()
-{
- double angle, result;
- printf("Enter the angle value in degree : ");
- // checking if the input is other than number.
- if(scanf("%lf", &angle) != 1) {
- printf("\nPlease enter a number.");
- return 1;
- }
- angle = angle * (M_PI / 180); // converting degree to radian
- result = pow(sin(angle), 2) + pow(cos(angle), 2);
- (fabs(result - 1.0) < EPSILON) ?
- printf("\nsum of squares of sine and cosine of this angle is equal to 1.") :
- printf("\nsum of squares of sine and cosine of this angle is NOT equal to 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">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<stdio.h>
- int main()
- {
- float sal;
- printf("Enter the salary");
- scanf("%f", &sal);
- if(sal >= 25000 && sal <= 40000)
- printf("Manager\n");
- else
- if(sal >= 15000 && sal < 25000)
- printf("Accountant\n");
- else
- printf("Clerk\n");
- return 0;
- }
-*/
-/* Author - Amit Dutta, Date - 6th OCT, 2025 */
-/* Let Us C, Chap- 4, Page - 73, Qn No.: E(e) */
-
-#include <stdio.h>
-int main()
-{
- float sal;
- printf("Enter the salary");
- scanf("%f", &sal);
- (sal >= 25000 && sal <= 40000) ? printf("Manager\n") :
- ((sal >= 15000 && sal < 25000) ? printf("Accountant\n") : printf("Clerk\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">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 <stdio.h>
-int main()
-{
- int i = 0;
- printf("ASCII Value\tCharacter");
- printf("\n-----------\t---------\n");
- while (i <= 255)
- {
- printf("%d.\t%c\n\n", 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 <stdio.h>
-#include <math.h>
-int main()
-{
- int num = 100, temp1, temp2, res;
- printf("Armstrong numbers between 100 and 500 :");
- while (num <= 500)
- {
- temp1 = num;
- res = 0;
- while (temp1 != 0)
- {
- temp2 = temp1 % 10;
- res = res + pow(temp2, 3);
- temp1 = temp1 / 10;
- }
- if (num == res)
- printf(" %d", 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's pick and the
-computer's pick equal to 5 in each round. This forces the player
-to pick the final matchstick. */
-
-#include <stdio.h>
-int main()
-{
- int remaining_matchsticks = 21, player_pick, computer_pick;
- printf(" --- Matchstick Game ---\n");
- printf("Rules: There are 21 matchsticks. You can pick 1, 2, 3, or 4.\n");
- printf("Whoever is forced to pick the last matchstick loses the game.\n");
- while (remaining_matchsticks > 1)
- {
- // game start
- printf("\n--------------------------");
- printf("\nRemaining Matchsticks : %d", remaining_matchsticks);
-
- // player pick and checking input is valid or not
- printf("\nYour turn: Pick 1, 2, 3, or 4 matchsticks: ");
- if (scanf("%d", &player_pick) != 1)
- {
- printf("\n\tPlease enter a number.");
- while (getchar() != '\n')
- ;
- continue;
- }
-
- // checking player pick is valid or not
- if (player_pick < 1 || player_pick > 4)
- {
- printf("\n\tPlease enter a number among 1, 2, 3 and 4.");
- while (getchar() != '\n')
- ;
- continue;
- }
-
- if (player_pick > remaining_matchsticks)
- {
- printf("\nInvalid choice! There are not enough matchsticks left.");
- while (getchar() != '\n')
- ;
- continue;
- }
-
- // computer_picks
- computer_pick = 5 - player_pick;
- printf("\ncomputer_picks : %d", computer_pick);
-
- // remaining matchsticks
- remaining_matchsticks = remaining_matchsticks - (player_pick + computer_pick);
- }
-
- // game over
- printf("\n----------------------------------\n");
- printf("Only 1 matchstick is left.\n");
- printf("You are forced to pick the last matchstick. You lose!\n");
- printf("The computer wins.\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">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's input as a generic string (char array).
- * This allows the program to accept multi-digit numbers (e.g., "-500") or the command ('n').
- * 4. TERMINATION CHECK: Immediately check if the input string is exactly "n" using strcmp().
- * If true, the user wants to quit, so break the loop.
- * 5. VALIDATION & CONVERSION: If the input is not "n", 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 > 0, increment positive_count.
- * - If the number is < 0, increment negative_count.
- * - If the number is == 0, increment zero_count.
- * 7. ERROR HANDLING: If the input is neither "n" 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 <stdio.h>
-#include <stdlib.h> // for strtol
-#include <string.h> // 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's input as a string (e.g., "123", "-50", or "n")
- char input_buffer[MAX_INPUT_LEN];
- int number;
-
- printf("--- Number Analyzer ---\n");
- printf("Enter numbers one by one. Type 'n' and press Enter to finish.\n\n");
-
- // Loop until the user enters 'n'
- while (1) {
- printf("Enter number or 'n': ");
-
- // 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 '\n' if the input was shorter than MAX_INPUT_LEN
- size_t len = strlen(input_buffer);
- if (len > 0 && input_buffer[len - 1] == '\n') {
- input_buffer[len - 1] = '\0';
- }
-
- // 1. Check for the termination condition
- if (strcmp(input_buffer, "n") == 0) {
- printf("\n'n' received. Stopping input...\n");
- 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 "%d" (decimal integer)
- // It returns 1 if a number was successfully read.
- int conversions = sscanf(input_buffer, "%d", &number);
-
- if (conversions == 1) {
- // Conversion was successful, now check the number's sign
- if (number > 0) {
- positive_count++;
- } else if (number < 0) {
- negative_count++;
- } else {
- zero_count++;
- }
- printf(" -> Number recorded: %d\n", number);
- } else {
- // Conversion failed. The input was neither 'n' nor a valid integer.
- printf(" -> Invalid input. Please enter a valid number or 'n'.\n");
- }
- }
-
- // Display the final results
- printf("\n====================================\n");
- printf(" Analysis Complete\n");
- printf("====================================\n");
- printf("Positive numbers entered: %d\n", positive_count);
- printf("Negative numbers entered: %d\n", negative_count);
- printf("Zeroes entered: %d\n", zero_count);
- printf("Total numbers recorded: %d\n", positive_count + negative_count + zero_count);
- printf("====================================\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">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 <stdio.h>
-int main()
-{
- int choice = 1, num, positive_count = 0, negative_count = 0, zero_count = 0;
- while (choice == 1)
- {
- printf("\nEnter the number (Type any character and press Enter to finish.) : ");
- choice = scanf("%d", &num); // Checking whether the user has input any characters
- if (choice == 1)
- {
- printf("Number recorded : %d", num);
- if (num < 0)
- negative_count++;
- else if (num > 0)
- positive_count++;
- else if (num == 0)
- zero_count++;
- }
- else
- {
- // If the user inputs any characters, then choice = 0, it means he doesn't want to give any more input;
- choice = 0;
- printf("\nCharacter received. Stopping input...\n");
- }
- }
- // Display the final results
- printf("\n====================================\n");
- printf(" Analysis Complete\n");
- printf("====================================\n");
- printf("Positive numbers entered: %d\n", positive_count);
- printf("Negative numbers entered: %d\n", negative_count);
- printf("Zeroes entered: %d\n", zero_count);
- printf("Total numbers recorded: %d\n", positive_count + negative_count + zero_count);
- printf("====================================\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">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 <stdio.h>
-int main()
-{
- int octal[20], decimal, index = 0, temp, rem;
- printf("Enter the decimal number : ");
- scanf("%d", &decimal);
- temp = decimal;
- while (temp != 0)
- {
- rem = temp % 8;
- temp = temp / 8;
- octal[index] = rem;
- index++;
- }
- printf("\nDeciaml %d to octal : ", decimal);
- while ((index - 1) >= 0)
- {
- printf("%d", 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 <stdio.h>
-int main()
-{
- int choice = 1, set_of_numbers[30], num, index = -1;
- while (choice == 1)
- {
- printf("\nEnter the number (Type any character and press Enter to finish.) : ");
- choice = scanf("%d", &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't want to give any more input;
- choice = 0;
- printf("\nCharacter received. Stopping input...\n");
- break;
- }
- index++;
- set_of_numbers[index] = num;
- }
- int max = set_of_numbers[0], min = set_of_numbers[0];
- while (index >= 0)
- {
- if (max < set_of_numbers[index])
- max = set_of_numbers[index];
- if (min > set_of_numbers[index])
- min = set_of_numbers[index];
- index--;
- }
- int range = max - min;
- printf("\nBiggest number in the set : %d", max);
- printf("\nSmallest number in the set : %d", min);
- printf("\nRange : %d", 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 <stdio.h>
-int main()
-{
- int i, num, res;
- printf("Enter the number : ");
- scanf("%d", &num);
- printf("\n--- Multiplication Table ---\n");
- for (i = 1; i <= 10; i++)
- printf("%d * %d = %d\n", 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 <stdio.h>
-int main()
-{
- double y, x;
- printf("\n--- Approximate Intelligence ---\n");
- for (y = 1; y <= 6; y++)
- {
- printf("\tY = %d\n", y);
- for (x = 5.5; x <= 12.5; x += 0.5)
- {
- printf("Y: %g\t X: %.2g\t I: %g\n", y, x, 2 + (y + 0.5 * x));
- }
- printf("-----------------------\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">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 & q and calculate the
-corresponding as' */
-/* 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 "https://github.com/notamitgamer/bsc/issues" with the updated code.
-
-#include <stdio.h>
-#include <math.h>
-int main()
-{
- double interest, principalAmount, interestRate, timeInYears, compoundFactor, totalAmount;
- int index;
- for (index = 1; index <= 10; index++)
- {
- printf("Enter Principle amount : ");
- scanf("%lf", &principalAmount);
- printf("Enter Rate of Interest : ");
- scanf("%lf", &interestRate);
- interestRate *= 0.01;
- printf("Enter the Time (Years) : ");
- scanf("%lf", &timeInYears);
- printf("Compound count in one year : ");
- scanf("%lf", &compoundFactor);
- totalAmount = (principalAmount * pow((1 + interestRate / compoundFactor), (timeInYears * compoundFactor)));
- interest = totalAmount - principalAmount;
- printf("\nInterest : %.2f\nTotal Amount : %.2f\n\n", 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 <stdio.h>
-#include <math.h>
-
-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 <= 7; i++)
- {
- result += 0.5 * pow(((x - 1) / x), i);
- }
- return result;
-}
-
-int main()
-{
- double x;
- printf("Enter the value for x : ");
- scanf("%lf", &x);
- printf("\nResult : %g", 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 <stdio.h>
-#include <math.h>
-
-int main()
-{
- int a, b, c;
- printf("Pythagorean Triplets with slide length less than or equal to 30 : \n");
- for (a = 1; a <= 30; a++)
- {
- for (b = a; b <= 30; b++)
- {
- int c_square = a * a + b * b;
- for (c = b + 1; c <= 30; c++)
- {
- if (c * c == c_square)
- printf("(%d, %d, %d)\n", 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 <stdio.h>
-int main()
-{
- int i, population = 100000;
- printf("Present year : %d\n", population);
- for (i = 1; i <= 10; i++)
- {
- population /= 1.10;
- printf("%d year ago : %d\n", 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 <stdio.h> // 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 'long long' because cubes (like 47^3) are large and can exceed
- // the capacity of a standard 'int', 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("Ramanujan Number Finder (a^3 + b^3 = c^3 + d^3)\n");
- printf("Searching up to %d (Max base value is %d)\n", LIMIT, MAX_BASE_VAL);
- printf("---------------------------------------------------\n");
-
- // 5. OUTER LOOPS: Establishing the FIRST SUM (a^3 + b^3 = sum1)
-
- // Loop for 'a' (the smaller base of the first pair)
- for (int a = 1; a <= MAX_BASE_VAL; a++)
- {
-
- // Loop for 'b' (the larger base of the first pair)
- // We start 'b' at 'a + 1' to enforce the rule a < b.
- // This prevents us from checking redundant pairs like (1, 12) and (12, 1).
- for (int b = a + 1; b <= 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 'long long' type.
- sum1 = (long long)a * a * a + (long long)b * b * b;
-
- // Optimization 1: Check if the sum exceeds the global limit.
- if (sum1 > LIMIT)
- {
- // Since 'b' is increasing, any further increase will also be over the limit.
- // We stop the 'b' loop and move to the next 'a'.
- break;
- }
-
- // Reset the flag for every new sum1.
- // We start searching for a second way for this new 'sum1', 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 'c' (the smaller base of the second pair)
- // We start 'c' at 'a + 1' to enforce the rule a < 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 <= MAX_BASE_VAL; c++)
- {
-
- // Optimization 2: Check the flag to exit the 'c' loop early.
- if (found_match)
- {
- // If we already found the second way (c, d) in a previous iteration of 'c', stop searching and move to the next (a, b) pair.
- break;
- }
-
- // Loop for 'd' (the larger base of the second pair)
- // We start 'd' at 'c + 1' to enforce c < d.
- for (int d = c + 1; d <= 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 > sum1)
- {
- // Since 'd' is increasing, any further increase will also be greater than sum1.
- // We stop the 'd' loop and move to the next 'c'.
- 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("[%d] %lld = %d^3 + %d^3 = %d^3 + %d^3\n",
- count, sum1, a, b, c, d);
-
- // Set the flag to 1, confirming we found the second way.
- found_match = 1;
-
- // Stop the 'd' loop immediately, as we found the required second pair.
- break;
- }
- }
- // If found_match was set to 1, the 'break' in the d loop will execute,
- // then the 'if (found_match) break;' in the c loop will execute,
- // and the program will move to the next (a, b) pair.
- }
- }
- }
-
- // 8. CONCLUSION
- printf("---------------------------------------------------\n");
- printf("Search complete. Found %d Ramanujan-type numbers.\n", 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 <stdio.h>
-
-#define limit 100000
-#define max_base 47
-
-int main()
-{
-
- long long sum1, sum2;
- int count = 0;
-
- printf("Ramanujan numbers : \n");
-
- int found_match;
-
- for (int a = 1; a <= max_base; a++)
- {
- for (int b = a + 1; b <= max_base; b++)
- {
- sum1 = (long long)a * a * a + (long long)b * b * b;
- if (sum1 > limit)
- {
- break;
- }
-
- found_match = 0;
-
- for (int c = a + 1; c <= max_base; c++)
- {
- if (found_match)
- {
- break;
- }
- for (int d = c + 1; d <= max_base; d++)
- {
- sum2 = (long long)c * c * c + (long long)d * d * d;
- if (sum2 > sum1)
- {
- break;
- }
- if (sum1 == sum2)
- {
- count++;
- printf("(%d.) %lld = %d^3 + %d^3 = %d^3 + %d^3\n", count, sum1, a, b, c, d);
-
- found_match = 1;
- break;
- }
- }
- }
- }
- }
-
- printf("-------------------------------\n");
- printf("Search complete.");
-
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
-int main()
-{
- int hour, temp;
- printf("Time \tSuffix\n");
- for (int hour = 0; hour <= 23; hour++)
- {
- if (hour == 0)
- printf("12:00\tAM (Midnight)\n");
- else if (hour == 12)
- printf("12:00\tPM (Noon)\n");
- else if (hour >= 1 && hour <= 11)
- printf("%02d:00\tAM\n", hour);
- else if (hour >= 13 && hour <= 23)
- printf("%02d:00\tPM\n", 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 <stdio.h>
-int main()
-{
- int starter = 1;
- int tab = 3;
- printf("The pattern : \n");
- for (int i = 1; i <= 4; i++)
- {
- int count = 0;
- for (int k = 1; k <= tab; k++)
- {
- printf(" ");
- }
- tab = tab - 1;
- for (int j = starter; j <= 10; j++)
- {
- if (count >= i)
- {
- break;
- }
- printf("%d ", j);
- count++;
- starter++;
- }
- printf("\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">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 <stdio.h>
-
-int main()
-{
- int studentClass, failedSubjectCount, graceMarks = 0;
- printf("Class obtained by the student (Enter 1 for First Class, 2 for Second Class, 3 for Third Class): ");
- scanf("%d", &studentClass);
- printf("Failed Subject Count: ");
- scanf("%d", &failedSubjectCount);
-
- if (failedSubjectCount < 0) {
- printf("\nFailed subject count cannot be negative.");
- return 1;
- }
-
- switch (studentClass)
- {
- case 1:
- if (failedSubjectCount <= 3)
- {
- graceMarks += 5 * failedSubjectCount;
- }
- break;
-
- case 2:
- if (failedSubjectCount <= 2)
- {
- graceMarks += 4 * failedSubjectCount;
- }
- break;
-
- case 3:
- if (failedSubjectCount <= 1)
- {
- graceMarks += 5 * failedSubjectCount;
- }
- break;
-
- default:
- printf("\nWrong Choice.");
- return 1;
- }
-
- printf("\nStudent will get %d grace marks.", 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 <stdio.h>
-
-int leapYear(int);
-
-int leapYear(int year)
-{
- if ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0)))
- return 1;
- else
- return 0;
-}
-
-int main()
-{
- int year;
- printf("Enter the year : ");
- scanf("%d", &year);
- if (leapYear(year))
- printf("\nYear %d is a Leap Year.", year);
- else
- printf("\nYear %d is not a Leap Year.", 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 <stdio.h>
-#include <math.h>
-
-void findPrimeFactors(int n)
-{
- int temp_n = n;
-
- if (temp_n == 1)
- {
- printf("Prime factors of %d are: None.\n", n);
- return;
- }
-
- printf("Prime factors of %d are:", n);
-
- while (temp_n % 2 == 0)
- {
- printf(" %d", 2);
- temp_n = temp_n / 2;
- }
-
- for (int i = 3; i <= (int)sqrt(temp_n); i = i + 2)
- {
- while (temp_n % i == 0)
- {
- printf(" %d", i);
- temp_n = temp_n / i;
- }
- }
-
- if (temp_n > 2)
- {
- printf(" %d", temp_n);
- }
-
- printf("\n");
-}
-
-int main()
-{
- int n;
- printf("Enter a positive integer to get the prime factors: ");
- if (scanf("%d", &n) != 1)
- {
- printf("Error: Invalid input. Please enter an integer.\n");
- return 1;
- }
- if (n <= 0)
- {
- printf("Error: Please enter a POSITIVE integer.\n");
- 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 <stdio.h>
-
-void circularShift(int *, int *, int *);
-
-int main()
-{
- int x = 5, y = 8, z = 10;
-
- printf("--- Before Shift ---\n");
- printf("x: %d, y: %d, z: %d", x, y, z);
-
- circularShift(&x, &y, &z);
-
- printf("\n--- After Shift ---\n");
- printf("x: %d, y: %d, z: %d", 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 <stdio.h>
-
-void convertWeight(double, double *, double *, double *);
-
-int main()
-{
- double weightGram, weightPound, weightKG, weightTON;
- printf("Enter the weight of the comodity in Kilogram(s): ");
- scanf("%lf", &weightKG);
-
- convertWeight(weightKG, &weightGram, &weightPound, &weightTON);
- printf("\n%g Kilogram(s) = %.04f Gram(s)"
- "\n%g Kilogram(s) = %.04f Pound(s)"
- "\n%g Kilogram(s) = %.04f TON(s)",
- 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 <stdio.h>
-#include <math.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-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("--- Compute the distance between two points ---\n\n");
- printf("Enter the co-ordinates of Point 1 (Ex.: 5,6): ");
- scanf("%lf,%lf", &x1, &y1);
- printf("Enter the co-ordinates of Point 2 (Ex.: 3,4): ");
- scanf("%lf,%lf", &x2, &y2);
-
- distance(x1, y1, x2, y2, &result_Distance);
- printf("\nDistance between P1(%g, %g) and P2(%g, %g) = %g",
- 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("\n\n--- Compute the area of a triangle ABC ---\n\n");
- printf("Enter the co-ordinates of Point A (Ex.: 5,6): ");
- scanf("%lf,%lf", &x1, &y1);
- printf("Enter the co-ordinates of Point B (Ex.: 3,4): ");
- scanf("%lf,%lf", &x2, &y2);
- printf("Enter the co-ordinates of Point C (Ex.: 6,7): ");
- scanf("%lf,%lf", &x3, &y3);
-
- area(x1, y1, x2, y2, x3, y3, &result_Area);
- printf("\nArea of the A(%g, %g), B(%g, %g), C(%g, %g) = %g",
- 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("\n\n--- Check if a test point P(x, y) lies strictly inside the triangle ABC ---\n\n");
- printf("Do you wish to use previous entered triangle?"
- "\nIf Yes, type 'Y'; If No, type 'N': ");
- scanf(" %c", &choice);
- choice = toupper(choice);
- switch (choice)
- {
- case 'Y':
- break;
- case 'N':
- printf("Enter the co-ordinates of Point A (Ex.: 5,6): ");
- scanf("%lf,%lf", &x1, &y1);
- printf("Enter the co-ordinates of Point B (Ex.: 3,4): ");
- scanf("%lf,%lf", &x2, &y2);
- printf("Enter the co-ordinates of Point C (Ex.: 6,7): ");
- scanf("%lf,%lf", &x3, &y3);
- break;
- default:
- printf("\nYou entered invalid choice.");
- break;
- }
- printf("Enter the co-ordinates of Test Point (Ex.: 3,5): ");
- scanf("%lf,%lf", &x, &y);
-
- if (is_inside(x, y, x1, y1, x2, y2, x3, y3))
- printf("\nTest Point (%g, %g) is inside ABC.", x, y);
- else
- printf("\nTest Point (%g, %g) is not inside ABC.", 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, &ab);
- distance(x2, y2, x3, y3, &bc);
- distance(x1, y1, x3, y3, &ac);
-
- s = (ab + bc + ac) / 2.0;
- double area_sq = s * (s - ab) * (s - bc) * (s - ac);
-
- if (area_sq < 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, &area_ABC);
- area(x, y, x1, y1, x2, y2, &area_PAB);
- area(x, y, x2, y2, x3, y3, &area_PBC);
- area(x, y, x1, y1, x3, y3, &area_PAC);
-
- double sum_of_sub_areas = area_PAB + area_PBC + area_PAC;
-
- if (fabs(area_ABC - sum_of_sub_areas) < EPSILON)
- return 1;
- else
- return 0;
-}
-
-/*
- *************** SAMPLE OUTPUT ***************
-
-PS G:\bsc\letusc> ./*.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 'Y'; If No, type 'N': 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 <stdio.h>
-int main()
-{
- int n, nonotes, temp;
- printf("Enter the amount : ");
- scanf("%d", &n);
- if (n < 1)
- {
- printf("\nAmount should be a positive integer.");
- 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("\nthe smallest number of notes that will combine to give Rs. %d : %d", 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
-&& and || . */
-/* Author - Amit Dutta, Date - 02th OCT, 2025 */
-/* Let Us C, Chap - 4, Page - 64, Problem 4.1 */
-
-#include <stdio.h>
-int main()
-{
- int year;
- printf("Enter year : ");
- scanf("%d", &year);
- if (year % 4 == 0 && year & 100 != 0 || year % 400 == 0)
- printf("\nYear %d is a leapyear.", year);
- else
- printf("\nYear %d is not a leapyear.", 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 <stdio.h>
-int main()
-{
- char inp;
- printf("Enter one character : ");
- scanf(" %c", &inp);
- if (inp >= 64 && inp <= 90)
- printf("\nInput '%c' is a CAPITAL LETTER.", inp);
- if (inp >= 97 && inp <= 122)
- printf("\nInput '%c' is a SMALL CASE LETTER.", inp);
- if (inp >= 48 && inp <= 57)
- printf("\nInput '%c' is a DIGIT.", inp);
- if (inp >= 0 && inp <= 47 || inp >= 58 && inp <= 64
- || inp >= 91 && inp <= 96 || inp >= 123 && inp <= 127)
- printf("\nInput '%c' is a SPECIAL SYMBOL.", 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 <stdio.h>
-int main()
-{
- double side1, side2, side3;
- printf("Enter the length of side1, side2 and side3 of the triangle : ");
- scanf("%lf %lf %lf", &side1, &side2, &side3);
- if (side1 <= 0 || side2 <= 0 || side3 <= 0)
- {
- printf("\nTriangle sides must be positive.\n");
- return 1;
- }
- if ((side1 + side2 > side3) && (side1 + side3 > side2) && (side2 + side3 > side1))
- // Triangle Inequality Theorem
- printf("\nThis triangle is valid.");
- else
- printf("\nThis triangle is not valid.");
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
-#include <conio.h>
-int main()
-{
- int working_hour, i = 1;
- double pay;
- while (i <= 10)
- {
- printf("Enter the working hour for the employee no. %d : ", i);
- if (scanf("%d", &working_hour) != 1)
- {
- printf("\n\tPlease enter a number as woking hour.\n\n");
- while (getchar() != '\n')
- ;
- // above line discard the input characters untill getchar() reaches the new line character.
- /* if I do not discard the input, after 'continue;' 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 > 40)
- {
- pay = (working_hour - 40) * 120.00;
- printf("\n\tOvertime working hours of Employee %d : %d", i, (working_hour - 40));
- printf("\n\tPay of the overtime for Employee %d : Rs. %.2f\n\n", i, pay);
- }
- else
- printf("\n\tEmployee %d did not work any overtime.\n\n", 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 <stdio.h>
-int main()
-{
- int num, i = 1;
- long long fact = 1;
- printf("Enter the number : ");
- // checking if the input is valid or not
- if (scanf("%d", &num) != 1)
- {
- printf("\nPlease enter a number.");
- return 1;
- }
- // result for the negetive input
- if (num < 0)
- {
- printf("\nFactorial of %d : Undefined", num);
- return 1;
- }
- // Hard codded result for input '0' (zero)
- if (num == 0)
- {
- printf("\nFactorial of 0 : 1");
- return 0;
- }
- // calculating result
- while (i <= num) {
- fact = fact * i;
- i++;
- }
- printf("\nFactorial of %d : %d", 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 <stdio.h>
-int main()
-{
- double num, result;
- int power, i = 1;
- printf("Enter the numbers in 'num^power' format : ");
- // checking if the input is valid or not
- if (scanf("%lf^%d", &num, &power) != 2)
- {
- printf("\nPlease enter numbers.");
- return 1;
- }
- // result for the negetive input
- if (power < 0)
- {
- printf("\nPlease use a positive number as power.");
- return 1;
- }
- // Hard codded result for input '0' (zero)
- if (power == 0)
- {
- printf("\n%g to the power of %d is : 1", num, power);
- return 0;
- }
- result = num;
- while (i <= power - 1)
- {
- result = result * num;
- i++;
- }
- printf("\n%g to the power of %d is : %g", 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 <stdio.h>
-#include <math.h>
-#include <stdbool.h>
-
-#define LIMIT 300
-
-int main()
-{
- printf("Prime numbers from 1 to 300 : 2"); // as 2 is the only even prime number
- for (int i = 3; i <= LIMIT; i += 2) // skipping all other even number
- {
- int n = (int)sqrt(i);
- bool prime = true;
-
- for (int j = 3; j <= 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(" %d", 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 <stdio.h>
-#define N 7 // update N here
-
-int main()
-{
- double sum = 0; int fact = 1;
- for (int i = 1; i <= N; i++)
- {
- fact *= i;
- sum += (double)i / fact;
- }
- printf("Sum of the series : %g", 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 <stdio.h>
-
-// --- 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(" %d", 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 <= 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("Combination of 1, 2 and 3 (1-digit up to 4-digits):\n");
-
- /* 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 <= 4; noOfDigits++)
- {
- printf("\n\n--- %d-DIGIT NUMBERS (%d total) ---\n", noOfDigits, (1 << 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("\n\nTotal permutations generated: 120\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">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 <stdio.h>
-
-int main()
-{
- printf("Combination of 1, 2 and 3 :");
-
- // for 1 digit numbers
- for (int i = 1; i <= 3; i++)
- {
- printf(" %d", i);
- }
-
- // for 2 digit numbers
- for (int i = 1; i <= 3; i++)
- {
- for (int j = 1; j <= 3; j++)
- {
- printf(" %d%d", i, j);
- }
- }
-
- // for 3 digit numbers
- for (int i = 1; i <= 3; i++)
- {
- for (int j = 1; j <= 3; j++)
- {
- for (int k = 1; k <= 3; k++)
- {
- printf(" %d%d%d", i, j, k);
- }
- }
- }
-
- // for 4 digit numbers
- for (int i = 1; i <= 3; i++)
- {
- for (int j = 1; j <= 3; j++)
- {
- for (int k = 1; k <= 3; k++)
- {
- for (int l = 1; l <= 3; l++)
- {
- printf(" %d%d%d%d", 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 'Exit' option the program should continue work.
-*/
-/* Author - Amit Dutta, Date - 26th OCT, 2025 */
-/* Let Us C, Chap - 7, Page - 118, Problem 7.1 */
-
-#include <stdio.h>
-#include <math.h>
-#include <stdlib.h>
-#include <stdbool.h>
-
-// Function to clear the input buffer after scanf to prevent issues in the next input.
-void clearInputBuffer()
-{
- int c;
- while ((c = getchar()) != '\n' && c != EOF)
- ;
-}
-
-// Calculates the factorial of the input number.
-void factorial(int num)
-{
- // Factorial is not defined for negative numbers.
- if (num < 0)
- {
- printf("\nFactorial is not defined for negative numbers.");
- return;
- }
- // Checks for input over 20 to prevent long long integer overflow (20! is max safe).
- if (num > 20)
- {
- printf("\nFactorial of %d is too large to calculate (max safe integer factorial is 20!).", num);
- return;
- }
- long long fact = 1;
- // Calculate factorial iteratively.
- for (int i = 1; i <= num; i++)
- {
- fact *= i;
- }
- printf("\nFactorial of %d = %lld", 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("\nInput 1 is NOT a PRIME NUMBER.");
- return;
- }
- else if (num == 2)
- {
- printf("\nInput 2 is a PRIME NUMBER. (Fact : 2 is only even prime number)");
- return;
- }
- // Exclude all other even numbers.
- if (num % 2 == 0)
- {
- printf("\nInput %d is NOT a PRIME NUMBER.", 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 <= endCheckDigit; i += 2)
- {
- if (num % i == 0)
- {
- printf("\nInput %d is NOT a PRIME NUMBER.", num);
- isPrime = false;
- break;
- }
- }
- if (isPrime)
- {
- printf("\nInput %d is a PRIME NUMBER.", 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("\nInput %d is a EVEN NUMBER.", num);
- return;
- }
- else
- {
- printf("\nInput %d is a ODD NUMBER.", 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 'Exit' is chosen.
- while (1)
- {
- // Display menu options.
- printf("\n\n===== MENU ====="
- "\n1. Factorial of a number"
- "\n2. Prime or not"
- "\n3. Odd or Even"
- "\n4. Exit");
- printf("\nEnter your choice : ");
-
- // Input validation for menu choice.
- if (scanf("%d", &choice) != 1)
- {
- printf("\nPlease enter a number.");
- clearInputBuffer();
- continue;
- }
- clearInputBuffer();
-
- // Handle menu selection using switch-case.
- switch (choice)
- {
- case 1:
- printf("\n=== FACTORIAL OF A NUMBER ===");
- printf("\nEnter the number : ");
- // Input validation for the number to be factored.
- if (scanf("%d", &num) != 1)
- {
- printf("\nPlease enter a number.");
- clearInputBuffer();
- continue;
- }
- clearInputBuffer();
- factorial(num);
- break;
- case 2:
- printf("\n=== PRIME OR NOT ===");
- printf("\nEnter the number : ");
- // Input validation for the number to be checked.
- if (scanf("%d", &num) != 1)
- {
- printf("\nPlease enter a number.");
- clearInputBuffer();
- continue;
- }
- clearInputBuffer();
- // Require a non-negative, non-zero number for prime check.
- if (num < 0)
- {
- printf("\nPlease enter a postive number.");
- continue;
- }
- else if (num == 0)
- {
- printf("\nPlease enter a non-zero number.");
- continue;
- }
- prime(num);
- break;
- case 3:
- printf("\n=== ODD OR EVEN ===");
- printf("\nEnter the number : ");
- // Input validation for the number to be checked.
- if (scanf("%d", &num) != 1)
- {
- printf("\nPlease enter a number.");
- clearInputBuffer();
- continue;
- }
- clearInputBuffer();
- oddoreven(num);
- break;
- case 4:
- // Exit the program cleanly.
- printf("\nExiting the program.\n\nSAYONARA...\n\n");
- exit(0);
- default:
- // Handle invalid menu choice input.
- printf("\nPlease enter a valid choice.");
- 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 <stdio.h>
-
-double power(double, int);
-
-double power(double a, int b)
-{
- if (b == 0)
- return 1;
- double res = 1;
- int i;
- if (b > 0)
- for (i = 1; i <= b; i++)
- res *= a;
- return res;
-}
-
-int main()
-{
- double a, result;
- int b;
- printf("Enter the value and the power (Format A^B) : ");
- scanf("%lf^%d", &a, &b);
- result = power(a, b);
- printf("Result of %g^%d = %g", 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 <stdio.h>
-
-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[] = {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"};
- // including the two-character subtractive pairs.
- int i = 0;
-
- printf("Year %d = ", year);
- while (year > 0)
- {
- if (year >= values[i])
- {
- printf("%s", romanChar[i]);
- year -= values[i];
- }
- else
- i++;
- }
-}
-
-int main()
-{
- int year;
- printf("Enter the year : ");
- scanf("%d", &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 <stdio.h>
-#include <math.h>
-
-void stats(double *, double *, double *);
-
-int main()
-{
- double sum, average, standardDeviation;
- stats(&sum, &average, &standardDeviation);
-
- printf("\n--- Stats ---"
- "\nSum: %g"
- "\nAverage: %g"
- "\nStandard Deviation: %g",
- sum, average, standardDeviation);
- return 0;
-}
-
-void stats(double *sum, double *average, double *standardDeviation)
-{
- int n;
- printf("How many numbers you want to give input: ");
- scanf("%d", &n);
-
- double inputNumber[n];
- int i;
-
- printf("\n--- Enter Numbers ---\n");
- for (i = 0; i < n; i++)
- {
- printf("Enter number %d: ", i + 1);
- scanf("%lf", &inputNumber[i]);
- }
-
- double tempSum = 0;
- for (i = 0; i < n; i++)
- tempSum += inputNumber[i];
-
- double tempAverage = tempSum / n;
-
- double tempStandardDeviation = 0.0;
-
- if (n > 1)
- {
- double tempSumation = 0;
- for (i = 0; i < 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 <stdio.h>
-#include <math.h>
-
-// Function prototype: Using pointers for 'call by reference' 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(&sum, &average, &standardDeviation);
-
- printf("\n--- Stats ---"
- "\nSum: %g"
- "\nAverage: %g"
- "\nStandard Deviation: %g",
- 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("How many numbers you want to give input: ");
-
- if (scanf("%d", &n) == 1)
- {
- break;
- }
- else
- {
- printf("\nPlease enter a valid number.\n");
- // Clearing input buffer to handle invalid input
- while (getchar() != '\n' && !feof(stdin))
- ;
- }
- } while (1);
-
- // Variable-Length Array (VLA) to store the input numbers.
- double inputNumber[n];
- int i = 0;
-
- printf("\n--- Enter Numbers ---\n");
-
- // Input Loop for numbers
- while (i < n)
- {
- printf("Enter number %d: ", i + 1);
-
- if (scanf("%lf", &inputNumber[i]) == 1)
- {
- // Clearing input buffer after successful read
- while (getchar() != '\n')
- ;
- i++;
- }
- else
- {
- printf("Invalid input. Only integers are allowed. Please try again.\n");
- // Clearing input buffer to handle invalid input
- while (getchar() != '\n' && !feof(stdin))
- ;
- }
- }
-
- // 1. Sum Calculation
- double tempSum = 0;
- for (i = 0; i < 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 > 1)
- {
- double tempSumation = 0;
- // calculating the sum of squared differences from the mean
- for (i = 0; i < 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 <stdio.h>
-
-void bothPowerFactorial(double, int, int, double *, long long *);
-
-int main()
-{
- double a, resultPower;
- int b, factN;
- long long resultFactorial;
- printf("Enter a and b for calculating a raised to b: ");
- scanf("%lf %d", &a, &b);
- printf("Enter number to calculate the factorial: ");
- scanf("%d", &factN);
- if (b < 0 || factN < 0)
- {
- printf("\nOnly non-negative integer is allowed as input of b and factorial.");
- return 1;
- }
- bothPowerFactorial(a, b, factN, &resultPower, &resultFactorial);
- printf("\n%g Raised to %d: %g"
- "\nFactorial of %d: %lld",
- 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 <= b; i++)
- tempResultPower *= a;
-
- for (i = 1; i <= 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 <stdio.h>
-
-int main()
-{
- float a = 3.14;
- float *c = &a;
- float **b = &c;
-
- printf("Location 1 (Variable a):\n");
- printf("Value: %g\n", a);
- printf("Address: %p\n", (void *)&a);
- printf("------------------------------\n");
-
- printf("Location 3 (Variable c: float *):\n");
- printf("Value (Address stored): %p\n", (void *)c);
- printf("Address of c itself: %p\n", (void *)&c);
- printf("Value pointed to (*c): %g\n", *c);
- printf("------------------------------\n");
-
- printf("Location 2 (Variable b: float **):\n");
- printf("Value (Address stored): %p\n", (void *)b);
- printf("Address of b itself: %p\n", (void *)&b);
- printf("Value pointed to (*b): %p\n", (void *)*b);
- printf("Value pointed to (**b): %g\n", **b);
- printf("------------------------------\n");
-
- 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 <stdio.h>
-int main()
-{
- int i, j, num;
- printf("Enter n : ");
- scanf("%d", &num);
- for (i = 1; i <= num; i++)
- {
- for (j = 1; j <= i; j++)
- {
- printf("%d\t", j);
- }
- printf("\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">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 <stdio.h>
-int main()
-{
- int i, j, n, temp = 1;
- printf("Enter n : ");
- scanf("%d", &n);
- for (i = n; i >= 1; i--)
- {
- for (j = 1; j <= i; j++)
- {
- printf("%d\t", temp);
- temp++;
- }
- printf("\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">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 <stdio.h>
-int main()
-{
- int i, j, n;
- printf("Enter n : ");
- scanf("%d", &n);
- for (i = 1; i <= n; i++)
- {
- for (j = 1; j <= i; j++)
- {
- printf("%d\t", i * j);
- }
- printf("\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">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 <stdio.h>
-int main()
-{
- int i, j, k, n;
- printf("Enter n : ");
- scanf("%d", &n);
- for (i = n; i >= 1; i--)
- {
- for (j = 1; j <= i - 1; j++)
- {
- printf("\t");
- }
- for (k = i; k >= 1; k--)
- {
- printf("%d\t", k);
- }
- printf("\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">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 <stdio.h>
-int main()
-{
- int i, j, n;
- long long temp1 = 0, temp2 = 1, temp3;
- printf("Enter n : ");
- scanf("%d", &n);
- printf("1\n");
- for (i = 2; i <= n; i++)
- {
- for (j = 1; j <= i; j++)
- {
- temp3 = temp1 + temp2;
- printf("%lld\t", temp3);
- temp1 = temp2;
- temp2 = temp3;
- }
- printf("\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">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 <stdio.h>
-#include <math.h>
-
-int main()
-{
- int num, i, temp;
- printf("Enter the number : ");
- if(scanf("%d", &num) != 1) {
- printf("Only postive number allowed.");
- return 1;
- }
- if(num <= 0) {
- printf("\nOnly potive number are allowed.");
- return 1;
- }
- if(num == 1) {
- printf("\nInput 1 is not a prime number.");
- return 0;
- }
- if(num == 2) {
- printf("\nInput 2 is a prime number.");
- return 0;
- }
- if(num % 2 == 0) {
- printf("\nInput %d is not a prime number.", num);
- return 0;
- }
- temp = (int)sqrt(num);
- for (i = 3; i <= temp; i += 2)
- {
- if (num % i == 0)
- {
- printf("\nInput %d is not a prime number.", num);
- return 0;
- }
- }
- printf("\nInput %d is a prime number.", 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 <stdio.h>
-
-int main()
-{
- int num, temp1, armstrongCheck = 0;
- printf("Enter a three digit number : ");
- if (scanf("%d", &num) != 1)
- {
- printf("\nOnly positive number allowed.");
- return 1;
- }
- if (num < 100 || num > 999)
- {
- printf("\nOnly Three digit postive number allowed.");
- return 1;
- }
- temp1 = num;
- while (temp1 > 0)
- {
- armstrongCheck += (temp1 % 10) * (temp1 % 10) * (temp1 % 10);
- temp1 /= 10;
- }
- if (armstrongCheck == num)
- printf("\nInput %d is a armstrong number.", num);
- else
- printf("\nInput %d is not a armstrong number.", 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 <stdio.h>
-
-int main()
-{
- int n, i;
- long long fact = 1;
- printf("Enter n : ");
- if (scanf("%d", &n) != 1)
- {
- printf("\nOnly non-negative number allowed.");
- return 1;
- }
- if (n < 0)
- {
- printf("\nOnly non-negative number allowed.");
- return 1;
- }
- if (n == 0)
- {
- printf("\nFactorial of 0 : 1");
- return 0;
- }
- for (i = 1; i <= n; i++)
- fact *= i;
- printf("\nFactorial of %d : %lld", 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 <stdio.h>
-int main()
-{
- int num, sumOfDigit = 0, temp;
- printf("Enter the number : ");
- if (scanf("%d", &num) != 1)
- {
- printf("\nOnly a number is allowed.");
- return 1;
- }
- temp = num;
- while (temp > 0)
- {
- sumOfDigit += temp % 10;
- temp /= 10;
- }
- printf("\nSum of the digit %d : %d", 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 <stdio.h>
-int main()
-{
- int num, temp, rev = 0;
- printf("\nEnter the number : ");
- if (scanf("%d", &num) != 1)
- {
- printf("\nOnly a number is allowed.");
- return 1;
- }
- temp = num;
- while (temp > 0)
- {
- rev = (rev * 10) + (temp % 10);
- temp /= 10;
- }
- printf("\nReverse of the number %d : %d", 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 <stdio.h>
-#define true 1
-#define false 0
-
-int isPalindrome(int num)
-{
- int temp = num, numRev = 0;
- while (temp > 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("Enter the Lower Bound and Upper Bound : ");
- if (scanf("%d %d", &lBound, &uBound) != 2)
- {
- printf("\nOnly Integer values are allowed.");
- return 1;
- }
- if (lBound < 0 || uBound < 0 || lBound > uBound)
- {
- printf("\nPlease enter appropriate inforamtion.");
- return 1;
- }
- printf("Palindrome Numbers from %d to %d :", lBound, uBound);
- for (num = lBound; num <= uBound; num++)
- {
- if (isPalindrome(num))
- {
- printf(" %d", num);
- palindromeCount++;
- }
- }
- printf("\nTotal Palindrome number found inside the range (%d to %d) : %d", 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<stdio.h>
-int main() {
- double length, breadth, area, perimeter;
- printf("Enter the length and breadth of the Rectangle : ");
- scanf("%lf %lf", &length, &breadth);
- area = length * breadth;
- perimeter = 2 * (length + breadth);
- printf("\nArea of the Rectangle : %g"
- "\nPerimeter of the Rectangle : %g", 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 <stdio.h>
-#include <math.h>
-int main()
-{
- double r, area;
- printf("Enter the radius of the circle : ");
- scanf("%lf", &r);
- area = M_PI * pow(r, 2);
- printf("\nArea of the circle : %g", 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 <stdio.h>
-#include <math.h>
-int main()
-{
- double dia, side, area, peri;
- printf("Enter the diagonal of the square : ");
- scanf("%lf", &dia);
- side = dia / sqrt(2);
- area = pow(side, 2);
- peri = 4 * side;
- printf("\nArea of the square : %g"
- "\nPerimeter of the square : %g",
- 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 <stdio.h>
-#include <math.h>
-int main()
-{
- double r, area;
- printf("Enter the area of the circle : ");
- scanf("%lf", &area);
- r = sqrt(area / M_PI);
- printf("\nRadius of the circle : %g", 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 <stdio.h>
-int main()
-{
- int days, months, years, temp;
- printf("Enter the No. of days : ");
- scanf("%d", &days);
- temp = days;
- years = days / 365;
- days = days % 365;
- months = days / 30;
- days = days % 30;
- printf("%d Days = %d Years, %d Months, %d Days", 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 <stdio.h>
-int main()
-{
- int sec, hours, minutes, temp;
- printf("Enter the no of seconds : ");
- scanf("%d", &sec);
- temp = sec;
- hours = sec / 3600;
- sec = sec % 3600;
- minutes = sec / 60;
- sec = sec % 60;
- printf("\n%d Seconds = %d Hours, %d Minutes, %d Seconds.", 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 <stdio.h>
-int main()
-{
- double bs, gs, ns, da, hra, pf;
- printf("Enter the basic salary of the employee : ");
- scanf("%lf", &bs);
- da = bs * 0.25;
- hra = bs * 0.125;
- pf = bs * 0.10;
- gs = bs + da + hra;
- ns = gs - pf;
- printf("\nGross Salary : %g"
- "\nNet Salary : %g",
- 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 <stdio.h>
-int main()
-{
- int num, multi, div;
- printf("Enter the number : ");
- scanf("%d", &num);
- multi = num << 2;
- div = num >> 2;
- printf("Multiplication : %d"
- "\nDivision : %d",
- 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 <stdio.h>
-int main()
-{
- int a = 4, b = 6;
- printf("Before swap : A = %d and B = %d", a, b);
- a = a ^ b;
- b = a ^ b;
- a = a ^ b;
- printf("\nAfter swap : A = %d and B = %d", 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 <stdio.h>
-#include <math.h>
-int main()
-{
- double a, b, c, result;
- printf("Enter the value for a, b and c : ");
- scanf("%lf %lf %lf", &a, &b, &c);
- result = (1 / pow(a, 3)) + (1 / pow((b + 2), 3)) + (1 / (pow(c, 4) + sqrt(2)));
- printf("\nResult = %g", 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 <stdio.h>
-#include <math.h>
-
-int main()
-{
- int num, temp;
- printf("Enter the number : ");
- scanf("%d", &num);
- if (num < 0)
- {
- printf("\nYou entered a negetive number.");
- return 1;
- }
- temp = (int)sqrt(num);
- if (temp * temp == num)
- {
- printf("\nInput %d is a perfect square number.", num);
- return 0;
- }
- else
- printf("\nInput %d is not a perfect square number.", 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 <stdio.h>
-
-int main()
-{
- int a, b, c, secondLargest;
- printf("Enter three number : ");
- scanf("%d %d %d", &a, &b, &c);
- if ((a < b && a > c) || (a > b && a < c))
- secondLargest = a;
- if ((b < a && b > c) || (b > a && b < c))
- secondLargest = b;
- if ((c < b && c > a) || (c > b && c < a))
- secondLargest = c;
- printf("\nSecond Largest : %d", 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
-('s' for simple interes, 'c' for compound interest), then calculate and display the earned interest */
-/* Author - Amit Dutta, Date - 31st October, 2025 */
-
-#include <stdio.h>
-#include <math.h>
-#include <ctype.h>
-
-int main()
-{
- double p, t, r, si, ci;
- char mode;
- printf("Enter the Principle, Time (Year) and the Rate of Interest : ");
- scanf("%lf %lf %lf", &p, &t, &r);
- printf("Enter the mode of calculation ('s' for simple interest, 'c' for compound interest) : ");
- scanf(" %c", &mode);
- mode = tolower(mode);
- switch (mode)
- {
- case 's':
- si = (p * t * r) / 100;
- printf("\nSimple Interest : %g", si);
- return 0;
- case 'c':
- ci = (p * pow(1 + (r / 100), t)) - p;
- printf("\nCompound Interest : %g", ci);
- return 0;
- default:
- printf("\nYou entered a wrong choice.");
- 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
- =========== ================
- <= 180 5.57 %
- 181 - 364 7.75 %
- 365 - 500 9.25 %
- > 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 <stdio.h>
-
-int main()
-{
- double p, t, r, si;
- int days;
- printf("Enter the Principle, Time (Days) : ");
- scanf("%lf %d", &p, &days);
- if (days > 0 && days <= 180)
- r = 5.57;
- else if (days > 180 && days <= 364)
- r = 7.75;
- else if (days > 364 && days <= 500)
- r = 9.25;
- else if (days > 500)
- r = 9.15;
- si = (p * t * r) / 100;
- printf("\nMaturity Amount : %d", 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 <stdio.h>
-
-int main()
-{
- int lb, ub, i;
- printf("Enter the lb, ub : ");
- scanf("%d %d", &lb, &ub);
- printf("\nEnds with 7 :");
- for (i = lb; i <= ub; i++)
- {
- if (i % 10 == 7)
- {
- printf(" %d", i);
- }
- }
- printf("\nDivisible by 7 :");
- for (i = lb; i <= ub; i++)
- {
- if (i % 7 == 0)
- {
- printf(" %d", 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 <stdio.h>
-
-int main()
-{
- int num, temp, rev = 0;
- printf("Enter the number : ");
- scanf("%d", &num);
- temp = num;
- while (temp > 0)
- {
- rev = (rev * 10) + (temp % 10);
- temp /= 10;
- }
- if (rev == num)
- printf("\nInput %d is a palindrome number.", num);
- else
- printf("\nInput %d is not a palindrome number.", 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 <stdio.h>
-
-int main()
-{
- int num, i, divisibleSum = 0;
- printf("Enter a number : ");
- scanf("%d", &num);
- for (i = 1; i <= num / 2; i++)
- {
- if (num % i == 0)
- {
- divisibleSum += i;
- }
- }
- if (divisibleSum == num)
- printf("\nInput %d ia a Perfect Number.", num);
- else
- printf("\nInput %d is NOT a Perfect Number.", 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 <stdio.h>
-#include <math.h>
-
-int main()
-{
- int num, square, count = 0, temp, modNum;
- printf("Enter the number : ");
- scanf("%d", &num);
- square = (int)pow(num, 2);
- temp = num;
- while (temp > 0)
- {
- temp /= 10;
- count++;
- }
- modNum = (int)pow(10, count);
- temp = square % modNum;
- if (num == temp)
- printf("\nInput %d is a Automorphic Number.", num);
- else
- printf("\nInput %d is a Automorphic Number.", 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 <stdio.h>
-
-int main()
-{
- int a, b, temp, temp_a, temp_b;
- printf("Enter the a and b : ");
- scanf("%d %d", &a, &b);
- temp_a = a, temp_b = b;
- while (b > 0)
- {
- temp = a;
- a = b;
- b = temp % b;
- }
- printf("\nHCF of %d and %d is : %d\n", 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 <stdio.h>
-
-int main()
-{
- int a, b, temp, temp_a, temp_b;
- printf("Enter the a and b : ");
- scanf("%d %d", &a, &b);
- temp_a = a, temp_b = b;
- while (b > 0)
- {
- temp = a;
- a = b;
- b = temp % b;
- }
- if (a == 1)
- printf("\n%d and %d is co-prime\n", temp_a, temp_b);
- else
- printf("\n%d and %d is NOT co-prime\n", 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 <stdio.h>
-
-int main()
-{
- int num, temp, sumOfDigit = 0, productOfDigit = 1;
- printf("Enter the number to check if it is a special number : ");
- scanf("%d", &num);
- temp = num;
- while (temp > 0)
- {
- sumOfDigit += temp % 10;
- productOfDigit *= temp % 10;
- temp /= 10;
- }
- temp = sumOfDigit + productOfDigit;
- if (num == temp)
- printf("\nInput %d is a special number.", num);
- else
- printf("\nInput %d is not a special number.", 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 <stdio.h>
-#include <math.h>
-#include <stdbool.h>
-
-bool checkPrime(int num)
-{
- if (num < 2)
- return false;
- if (num == 2)
- return true;
- if (num % 2 == 0)
- return false;
- int limit = (int)sqrt(num);
- for (int i = 3; i <= limit; i += 2)
- if (num % i == 0)
- return false;
- return true;
-}
-
-int reverseNumber(int num)
-{
- int reverse = 0;
- while (num > 0)
- {
- reverse = (reverse * 10) + (num % 10);
- num /= 10;
- }
- return reverse;
-}
-
-int main()
-{
- int num;
- printf("Enter the number : ");
- scanf("%d", &num);
- if (!checkPrime(num))
- {
- printf("\nInput %d is not a prime number.", num);
- return 0;
- }
- if (checkPrime(reverseNumber(num)))
- printf("\nInput %d is a twisted prime number.", num);
- else
- printf("\nInput %d is not a twisted prime number.", 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 <stdio.h>
-#include <stdbool.h>
-
-int main()
-{
- int n, i, temp = 1;
- bool isNegative = true;
- printf("Enter the n : ");
- scanf("%d", &n);
- printf("\nPattern A :");
- for (i = 1; i <= n; i++)
- {
- if (!isNegative)
- {
- printf(" %d", temp * -1);
- isNegative = true;
- }
- else
- {
- printf(" %d", temp);
- isNegative = false;
- }
- temp += 2;
- }
- printf("\nPattern B :");
- for (i = 1; i <= n; i++)
- {
- temp = (i * i) - 1;
- printf(" %d", 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<stdio.h>
-int main() {
- int n, i, j;
- printf("Enter the n : ");
- scanf("%d", &n);
- for(i = 1; i <= n; i++) {
- for(j = i; j >= 1; j--) {
- printf("%d ", j);
- }
- printf("\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-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<stdio.h>
-int main() {
- int n, i, j;
- printf("Enter the n : ");
- scanf("%d", &n);
- for(i = 1; i <= n; i++) {
- for(j = n; j >= i; j--) {
- printf("%d ", j);
- }
- printf("\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-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<stdio.h>
-int main() {
- int n, i, j;
- printf("Enter the n : ");
- scanf("%d", &n);
- for(i = n; i >= 1; i--) {
- for(j = n; j >= i; j--) {
- printf("%d ", j);
- }
- printf("\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-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<stdio.h>
-int main() {
- int n, i, j;
- printf("Enter the n : ");
- scanf("%d", &n);
- for(i = 1; i <= n; i++) {
- for(j = i; j <= n; j++) {
- printf("%d ", j);
- }
- printf("\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-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<stdio.h>
-int main() {
- int n, i, j, temp = 1;
- printf("Enter the n : ");
- scanf("%d", &n);
- for(i = 1; i <= n; i++) {
- for(j = 1; j <= i; j++) {
- printf("%d\t", temp);
- temp++;
- }
- printf("\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-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<stdio.h>
-int main() {
- int n, i, j;
- printf("Enter the n : ");
- scanf("%d", &n);
- for(i = 1; i <= n; i++) {
- for(j = 1; j <= i; j++) {
- if(j % 2 == 0) printf("0 ");
- else printf("1 ");
- }
- printf("\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-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<stdio.h>
-int main() {
- int n, i, j;
- printf("Enter the n : ");
- scanf("%d", &n);
- for(i = 1; i <= n; i++) {
- for(j = 1; j <= i; j++) {
- if(i % 2 == 0) printf("@ ");
- else printf("# ");
- }
- printf("\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-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<stdio.h>
-int main() {
- int n, i, j, temp = 1;
- printf("Enter the n : ");
- scanf("%d", &n);
- for(i = n; i >= 1; i--) {
- for(j = 1; j <= i; j++) {
- printf("%d\t", temp);
- temp++;
- }
- printf("\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-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<stdio.h>
-int main() {
- int n, i, j; char temp = 'A';
- printf("Enter the n : ");
- scanf("%d", &n);
- for(i = 1; i <= n; i++) {
- for(j = 1; j <= i; j++) {
- printf("%c\t", temp);
- }
- temp++;
- printf("\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-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 <stdio.h>
-
-int factorial(int);
-
-int factorial(int n)
-{
- int i, fact = 1;
- for (i = 1; i <= n; i++)
- fact *= i;
- return fact;
-}
-
-int main()
-{
- int n, temp;
- printf("Enter the number: ");
- scanf("%d", &n);
- if (n < 0)
- {
- printf("Only non-negetive number is allowed.");
- return 1;
- }
- temp = n;
- while (temp > 0)
- {
- printf("\nFactorial of %d: %d", 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 <stdio.h>
-#include <math.h>
-
-int isPrime(int);
-
-int isPrime(int n)
-{
- if (n <= 1)
- return 0;
- if (n == 2)
- return 1;
- if (n % 2 == 0)
- return 0;
- int temp = (int)sqrt(n), i;
- for (i = 3; i <= temp; i += 2)
- if (n % i == 0)
- return 0;
- return 1;
-}
-
-int main()
-{
- int lb, ub, i;
- printf("Enter the lower bound and the upper bound: ");
- scanf("%d %d", &lb, &ub);
- printf("\nPrime numbers between %d and %d: ", lb, ub);
- for (i = lb; i <= ub; i++)
- if (isPrime(i))
- printf("%d ", 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 <stdio.h>
-
-int palindromeCheck(int);
-
-int palindromeCheck(int n)
-{
- int temp = n, rev = 0;
- while (temp > 0)
- {
- rev = (rev * 10) + (temp % 10);
- temp /= 10;
- }
- if (rev == n)
- return 1;
- else
- return 0;
-}
-
-int main()
-{
- int i;
- printf("Palindrome number of 3 and 4 digits: ");
- for (i = 100; i <= 9999; i++)
- if (palindromeCheck(i))
- printf("%d ", 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 <stdio.h>
-
-int factorial(int);
-int checkKrishnamurty(int);
-
-int factorial(int n)
-{
- int i, fact = 1;
- for (i = 1; i <= n; i++)
- fact *= i;
- return fact;
-}
-
-int checkKrishnamurty(int n)
-{
- int temp1 = n, temp2 = 0;
- while (temp1 > 0)
- {
- temp2 += factorial(temp1 % 10);
- temp1 /= 10;
- }
- if (temp2 == n)
- return 1;
- else
- return 0;
-}
-
-int main()
-{
- int n;
- printf("Enter the number: ");
- scanf("%d", &n);
- if (checkKrishnamurty(n))
- printf("\nInput %d is a Krishnamurty number.", n);
- else
- printf("\ninput %d is not a Krishnamurty number.", 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 <stdio.h>
-#include <math.h>
-
-#define lowerBound 100
-#define upperBound 999
-
-int isArmstrongNumber(int);
-
-int isArmstrongNumber(int n)
-{
- int temp = n, sum = 0, count = 0;
- while (temp > 0)
- {
- count++;
- temp /= 10;
- }
- temp = n;
- while (temp > 0)
- {
- sum += (int)pow(temp % 10, count);
- temp /= 10;
- }
- return sum == n;
-}
-
-int main()
-{
- int n, i, count = 0;
- printf("Armstrong number between %d and %d are: ", lowerBound, upperBound);
- for (i = lowerBound; i <= upperBound; i++)
- if (isArmstrongNumber(i))
- {
- printf("%d ", i);
- count++;
- }
- printf("\n\nCount: %d\n", 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 <stdio.h>
-
-int main()
-{
- printf("Combinations of two two-digit numbers such that the sum of digits of both numbers is equal: ");
- int i, j, sum1, sum2, count = 0;
- for (i = 10; i <= 99; i++)
- {
- sum1 = (i % 10) + (i / 10);
- for (j = i + 1; j <= 99; j++)
- {
- sum2 = (j % 10) + (j / 10);
- if (sum1 == sum2)
- {
- printf("(%d, %d) ", i, j);
- count++;
- }
- }
- }
- printf("\nCount: %d\n", 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 <stdio.h>
-
-int main()
-{
- printf("a² + b² = c² : ");
- int i, j, k, sq1, sq2, count = 0;
- for (i = 1; i <= 30; i++)
- {
- sq1 = i * i;
- for (j = i + 1; j <= 30; j++)
- {
- sq2 = j * j;
- for (k = j + 1; k <= 30; k++)
- {
- if (sq1 + sq2 == k * k)
- {
- printf("(%d, %d, %d) ", i, j, k);
- count++;
- }
- }
- }
- }
- printf("\n\nCount: %d\n", 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 <stdio.h>
-
-int main()
-{
- int i, count = 0, n1, n2, n3;
- printf("Distinct numbers between 100 and 999: ");
- for (i = 100; i <= 999; i++)
- {
- n1 = i / 100;
- n2 = (i % 100) / 10;
- n3 = i % 10;
- if (n1 != n2 && n2 != n3 && n1 != n3)
- {
- printf("%d ", i);
- count++;
- }
- }
- printf("\nCount: %d\n", 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 <stdio.h>
-#include <math.h>
-
-int isPrime(int n)
-{
- if (n < 2)
- return 0;
- if (n == 2)
- return 1;
- if (n % 2 == 0)
- return 0;
- int i, temp = (int)sqrt(n);
- for (i = 3; i <= temp; i += 2)
- if (n % i == 0)
- return 0;
- return 1;
-}
-
-int main()
-{
- int n, i, count = 0;
- printf("enter the n: ");
- scanf("%d", &n);
- printf("\nAll the twin numbers: ");
- for (i = 1; i <= n - 2; i++)
- {
- if (isPrime(i))
- {
- if (isPrime(i + 2))
- {
- printf("(%d, %d) ", i, i + 2);
- count++;
- }
- }
- }
- printf("\nCount; %d", 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<stdio.h>
-int main() {
- int a = 9, b = 4, c;
- c = a + b;
- printf("A + B = %d\n", c);
- c = a / b;
- printf("A / B = %d\n", c);
- c = a % b;
- printf("A %% B = %d\n", 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<stdio.h>
-int main() {
- int a = 5, b = 5, c = 10;
- printf("a = b = %d\n", a == b);
- printf("a > b = %d\n", a > b);
- printf("a < b = %d\n", 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-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 <stdio.h>
-int main() {
- int a = 5, b = 5, c = 10, result;
-
- result = (a == b) && (c > b);
- printf("Result is %d\n", result);
-
- result = (a == b) && (c < b);
- printf("Result is %d\n", result);
-
- result = (a != b) || (c < b);
- printf("Result is %d\n", result);
-
- result = (a != b) || (c < b);
- printf("Result is %d\n", result);
-
- result = !(a != b);
- printf("Result is %d\n", result);
-
- result = !(a == b);
- printf("Result is %d\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">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 <stdio.h>
-#include <conio.h>
-
-void main()
-{
- clrscr();
- int x;
- x = 1;
- while (x <= 10)
- {
- printf("%d ", 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 <stdio.h>
-#include <conio.h>
-
-void main()
-{
- clrscr();
- int n, reverse = 0, rem;
- printf("Enter the numner : ");
- scanf("%d", &n);
- while (n != 0)
- {
- rem = n % 10;
- reverse = reverse * 10 + rem;
- n /= 10;
- }
- printf("Reversed Number : %d", 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 <stdio.h>
-#include <conio.h>
-
-void main()
-{
- clrscr();
- int a = 5, i = 1, res;
- while (i <= 10)
- {
- res = a * i;
- printf("%d * %d = %d\n", 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 <stdio.h>
-#include <conio.h>
-
-void main()
-{
- clrscr();
- int i, sum = 0;
- for (i = 1; i <= 10; i++)
- {
- sum += i;
- }
- printf("\nSum of the first natural number : %d", 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 <stdio.h>
-
-int main()
-{
- int rows, cols, i, j;
- printf("Enter the number of rows and columns: ");
- scanf("%d %d", &rows, &cols);
-
- int a[rows][cols], b[rows][cols], c[rows][cols];
-
- printf("Enter the elements of matrix A (%d x %d): \n", rows, cols);
- for (i = 0; i < rows; i++)
- for (j = 0; j < cols; j++)
- {
- printf("Position %d%d: ", i, j);
- scanf("%d", &a[i][j]);
- }
- printf("\nMatrix A: \n");
- for (i = 0; i < rows; i++)
- {
- for (j = 0; j < cols; j++)
- printf("%d ", a[i][j]);
- printf("\n");
- }
-
- printf("\nEnter the elements of matrix B(%d x %d): \n", rows, cols);
- for (i = 0; i < rows; i++)
- for (j = 0; j < cols; j++)
- {
- printf("Position %d%d: ", i, j);
- scanf("%d", &b[i][j]);
- }
- printf("\nMatrix B: \n");
- for (i = 0; i < rows; i++)
- {
- for (j = 0; j < cols; j++)
- printf("%d ", b[i][j]);
- printf("\n");
- }
-
- for (i = 0; i < rows; i++)
- for (j = 0; j < cols; j++)
- c[i][j] = a[i][j] + b[i][j];
-
- printf("\nResult Matrix: \n");
- for (i = 0; i < rows; i++)
- {
- for (j = 0; j < cols; j++)
- printf("%d ", c[i][j]);
- printf("\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-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 <stdio.h>
-
-int main()
-{
- int i, j, rows, cols;
- printf("\nEnter the number of rows and columns : ");
- scanf("%d %d", &rows, &cols);
-
- if (rows != cols)
- {
- printf("Triangular matrix definitions only apply to square matrices (rows == columns).\n");
- return 1;
- }
-
- int matrix[rows][cols];
-
- printf("Enter the elements of matrix (%d x %d): \n", rows, cols);
- for (i = 0; i < rows; i++)
- for (j = 0; j < cols; j++)
- {
- printf("Position %d%d: ", i, j);
- scanf("%d", &matrix[i][j]);
- }
- printf("\nMatrix: \n");
- for (i = 0; i < rows; i++)
- {
- for (j = 0; j < cols; j++)
- printf("%d ", matrix[i][j]);
- printf("\n");
- }
-
- printf("\nUpper triangular of the Matrix: \n");
- for (i = 0; i < rows; i++)
- {
- for (j = 0; j < cols; j++)
- {
- if (j >= i)
- printf("%d ", matrix[i][j]);
- else
- printf("~ ");
- }
- printf("\n");
- }
-
- printf("\nLower triangular of the Matrix: \n");
- for (i = 0; i < rows; i++)
- {
- for (j = 0; j < cols; j++)
- {
- if (j <= i)
- printf("%d ", matrix[i][j]);
- else
- printf("~ ");
- }
- printf("\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-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 <stdio.h>
-
-int main()
-{
- int a[8] = {4, 5, 2, 10, 6, 9, 8};
- int i;
-
- printf("Elemnts of the array: ");
- for (i = 0; i <= 6; i++)
- printf("%d ", a[i]);
-
- printf("\nMethod 1: ");
- for (i = 7; i >= 4; i--)
- a[i] = a[i - 1];
- a[3] = 7;
- for (i = 0; i <= 7; i++)
- printf("%d ", a[i]);
-
- // another method
- printf("\nMethod 2: ");
- int b[8] = {4, 5, 2, 10, 6, 9, 8};
- int temp1 = 7;
- for (i = 3; i <= 7; i++)
- {
- int temp2 = b[i];
- b[i] = temp1;
- temp1 = temp2;
- }
- for (i = 0; i <= 7; i++)
- printf("%d ", 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 <stdio.h>
-
-int main()
-{
- int elementCount, i, keyElement;
-
- printf("Enter the number of element you want to add: ");
- scanf("%d", &elementCount);
-
- int elements[elementCount];
-
- for (i = 0; i < elementCount; i++)
- {
- printf("Enter Element %d: ", i + 1);
- scanf("%d", &elements[i]);
- }
-
- printf("\nEnter the Key Element you want to search: ");
- scanf("%d", &keyElement);
- for (i = 0; i < elementCount; i++)
- if (elements[i] == keyElement)
- {
- printf("\nKey Element %d is found in %d position.", keyElement, i);
- return 0;
- }
- printf("\nKey Element %d is not found.", 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 <stdio.h>
-
-int main()
-{
- int i, j, row, col, count = 0;
-
- printf("Enter the number of rows and columns in the matrix: ");
- scanf("%d %d", &row, &col);
-
- int matrix[row][col];
-
- for (i = 0; i < row; i++)
- for (j = 0; j < col; j++)
- {
- printf("Postion %d%d: ", i, j);
- scanf("%d", &matrix[i][j]);
- if (matrix[i][j] == 0)
- count++;
- }
-
- printf("\nEntered Matrix: \n");
- for (i = 0; i < row; i++)
- {
- for (j = 0; j < col; j++)
- printf("%d ", matrix[i][j]);
- printf("\n");
- }
-
- if (count > (row * col) / 2)
- printf("\nEntered matrix is a Sparx Matrix.");
- else
- printf("\nEntered matrix is not a Sparx Matrix");
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
-
-double average(int []);
-
-int main()
-{
- int marks[10], i;
- printf("\nEnter 10 numbers: \n");
- for (i = 0; i <= 9; i++)
- {
- printf("Enter number %d: ", i + 1);
- scanf("%d", &marks[i]);
- }
- printf("\nAverage = %g", average(marks));
- return 0;
-}
-
-double average(int marks[10])
-{
- int sum = 0;
- for (int i = 0; i <= 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<stdio.h>
-int main() {
- int a, b, sum, sub, multi, div, mod;
- printf("Enter 1st number : ");
- scanf("%d", &a);
- printf("Enter 2nd number : ");
- scanf("%d", &b);
- sum = a + b;
- sub = a - b;
- multi = a * b;
- div = a / b;
- mod = a % b;
- printf("\nSum = %d", sum);
- printf("\nSubtraction = %d", sub);
- printf("\nMultiplication = %d", multi);
- printf("\nDivision = %d", div);
- printf("\nModulas = %d", 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<stdio.h>
-int main() {
- int a = 10, b = 20, temp;
- printf("Before swap A : %d, B : %d", a, b);
- temp = a;
- a = b;
- b = temp;
- printf("\nAfter swap A : %d, B : %d", 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 '&' */
-
-#include<stdio.h>
-int main() {
- unsigned int a = 4, b = 5, c = 6;
- unsigned int x, y;
- x = a & b;
- y = b & c;
- printf("x = %u y = %u", 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<stdio.h>
-int main() {
- int x = 25, y = 19, z;
- z = x - y;
- z = z & x ;
- printf("Z = %d", 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 '|' */
-
-#include<stdio.h>
-int main() {
- int x = 12, y = 14, z = 10, res;
- x++;
- z++;
- x = x + y + z;
- res = x | y;
- z = res | z;
- printf("x = %d y = %d z = %d res = %d", 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 '~' */
-
-#include<stdio.h>
-int main() {
- int x = 12, y = 15, z = 21;
- int res, res1, res2;
- res = x > 10;
- res1 = ~res;
- res2 = ~x;
- printf("REs = %d, Res1 = %d, Res2 = %d", 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<stdio.h>
-int main() {
- int x, res = 1;
- printf("Enter a number : ");
- scanf("%d", &x);
- res = res & x;
- if (res == 0) {
- printf("\nInput %d is a even number.", x);
- }
- else {
- printf("\nInput %d is a odd number.", 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<stdio.h>
-#include<math.h>
-int main() {
- double r, area;
- printf("Enter the radius of circle : ");
- scanf("%lf", &r);
- area = M_PI * r * r;
- printf("\nArea : %lf", 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<stdio.h>
-int main() {
- printf("Hello world");
- return 0;
-}
-</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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<stdio.h>
-int main() {
- printf("Hello\nworld");
- return 0;
-}
-</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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<stdio.h>
-int main() {
- int a, b, sum, multi;
- printf("Enter the 1st number : ");
- scanf("%d",&a);
- printf("Enter the 2nd number : ");
- scanf("%d",&b);
- sum = a + b;
- multi = a * b;
- printf("\nSum = %d"
- "\nMultiplication = %d",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<stdio.h>
-int main() {
- double x =5, result;
- result = ((x + 3) / 4) - ((2 * x + 4) / 3);
- printf("Result = %lf",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<stdio.h>
-int main() {
- int daily_wage = 455, fine = 150, present, absent, income;
- printf("No of days present : ");
- scanf("%d", &present);
- absent = 30 - present;
- income = (present * 455) - (absent * 150);
- printf("\nIncome : %d",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<stdio.h>
-int main() {
- double f = 98.6, c;
- c = ((f - 32) * 5) / 9;
- printf("Temperature in Celcius is : %lf",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<stdio.h>
-int main() {
- double mrp, final_price, temp;
- printf("Enter the printed price : ");
- scanf("%lf", &mrp);
- temp = mrp * 0.90;
- final_price = temp * 1.06;
- printf("\nCustomer have to pay : %lf", 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<stdio.h>
-int main() {
- double mrp, shop1, shop2, temp;
- printf("Enter the price : ");
- scanf("%lf", &mrp);
- shop1 = mrp * 0.70;
- temp = mrp * 0.80;
- shop2 = temp * 0.90;
- printf("\nShopkeeper 1 price : %lf"
- "\nShopkeeper 2 price : %lf",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<stdio.h>
-int main() {
- double bs, da, hra, pf, gs, ns;
- printf("Enter the Basic Salary : ");
- scanf("%lf", &bs);
- da = bs * 0.3;
- hra = bs * 0.2;
- pf = bs * 0.125;
- gs = bs + da + hra;
- ns = gs - pf;
- printf("\nGross Salary : %lf"
- "\nNet Salary : %lf", 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<stdio.h>
-#include<math.h>
-int main() {
- double p, r, t, si, a, ci, dif;
- printf("Enter the principle amount, rate of interest, time in year : ");
- scanf("%lf %lf %lf", &p, &r, &t);
- si = (p * r * t) / 100;
- a = p * pow((1 + (r / 100)), t);
- ci = a - p;
- dif = ci - si;
- printf("\nSimple Interest : %lf"
- "\nCompound Interest : %lf"
- "\nInterest Difference : %lf", 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<stdio.h>
-#include<math.h>
-int main() {
- double l, g, t;
- printf("Enter the Length and Gravity measures : ");
- scanf("%lf %lf", &l, &g);
- t = 2 * M_PI * sqrt(l / g);
- // using M_PI variable for PI value from math.h header file
- printf("\nTime Period : %lf", 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<stdio.h>
-int main() {
- int a = 4, b = 6;
- printf("Before Swap : A = %d, B = %d", a, b);
- a = a + b;
- b = a - b;
- a = a - b;
- printf("\nAfter Swap : A = %d, B = %d", 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<stdio.h>
-#include<math.h>
-int main() {
- int a = 4, b = 6;
- printf("Before Swap : A = %d, B = %d", a, b);
- a = a ^ b;
- b = a ^ b;
- a = a ^ b;
- printf("\nAfter Swap : A = %d, B = %d", 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<stdio.h>
-#include<math.h>
-int main() {
- double d, side, area, per;
- printf("Enter the diagonal : ");
- scanf("%lf", &d);
- side = d / sqrt (2);
- area = side * side;
- per = 4 * side;
- printf("\nArea of the Square : %lf"
- "\nPerimeter of the Square : %lf", 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<stdio.h>
-int main() {
- int day, month, year, temp;
- printf("Enter the number of days : ");
- scanf("%d", &day);
- temp = day;
- year = day / 365;
- day = day % 365;
- month = day / 30;
- day = day % 30;
- printf("\n%d Days = %d Years %d Months %d Days", 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<stdio.h>
-#include<math.h>
-int main() {
- double area, r;
- printf("Enter the area of a circle : ");
- scanf("%lf", &area);
- r = sqrt((7 * area) / 22);
- printf("\nRadius : %lf", 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 <stdio.h>
-int main()
-{
- int a, b, c, max;
- printf("Enter the value for a, b, c : ");
- scanf("%d %d %d", &a, &b, &c);
- max = a;
- if (max < b)
- max = b;
- if (max < c)
- max = c;
- printf("Maximum : %d", 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 <stdio.h>
-int main()
-{
- double cost, sell, pro, prop, loss, lossp;
- printf("Enter the cost and selling price : ");
- scanf("%lf %lf", &cost, &sell);
- if (sell > cost)
- {
- pro = sell - cost;
- prop = (pro / cost) * 100;
- printf("Profit : RS %g, Profit Percentage : %g", pro, prop);
- }
- else if (sell < cost)
- {
- loss = cost - sell;
- lossp = (loss / cost) * 100;
- printf("Loss : RS %g, Loss Percentage : %g", loss, lossp);
- }
- else
- printf("Neither loss nor Profit.");
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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
- =<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 <stdio.h>
-int main()
-{
- double dis, amt;
- printf("Enter the distance : ");
- scanf("%lf", &dis);
- if (dis <= 5.0)
- amt = 90.0;
- else if (dis > 5.0 && dis <= 15.0)
- amt = 90.0 + (dis - 5.0) * 20;
- else if (dis > 15.0 && dis <= 25.0)
- amt = 90.0 + 200.0 + (dis - 15.0) * 10;
- else if (dis > 25.0)
- amt = 90.0 + 200.0 + 100.0 + (dis - 25.0) * 9;
- printf("\nAmount to be paid : %g", 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 <stdio.h>
-int main()
-{
- double nod, amt, s, i;
- printf("Enter the amount and the time in days : ");
- scanf("%lf %lf", &s, &nod);
- if (nod <= 180)
- i = (s * 5.5 * (nod / 365)) / 100;
- else if (nod > 180.0 && nod <= 364.0)
- i = (s * 7.5 * (nod / 365)) / 100;
- else if (nod == 365.0)
- i = (s * 9.0 * 1) / 100;
- else if (nod > 365.0)
- i = (s * 8.5 * (nod / 365)) / 100;
- amt = s + i;
- printf("Amount to be paid : %g", 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 <stdio.h>
-#include <math.h>
-int main()
-{
- int n, temp;
- double sr;
- printf("Enter the number : ");
- scanf("%d", &n);
- sr = sqrt(n);
- temp = (int)sr;
- if (temp * temp == n)
- printf("\nThis is a perfect square.");
- else
- printf("\nThis is not a perfect square.");
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
-int main()
-{
- int a, b, c, min;
- printf("Enter three number : ");
- scanf("%d %d %d", &a, &b, &c);
- min = (a < b && a < c) ? a : (b < a && b < c) ? b
- : c;
- printf("Minimum = %d", 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 <stdio.h>
-int main()
-{
- double cost, amt;
- printf("Enter the total cost : ");
- scanf("%lf", &cost);
- if (cost <= 2000)
- amt = cost * 0.94;
- else if (cost > 2000 && cost <= 5000)
- amt = cost * 0.9;
- else if (cost > 5000 && cost <= 10000)
- amt = cost * 0.85;
- else if (cost > 10000)
- amt = cost * 0.8;
- printf("\nAmount to be paid : %g", 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 <stdio.h>
-int main()
-{
- int year;
- printf("Enter the year : ");
- scanf("%d", &year);
- if (year % 4 == 0 && year % 100 != 0)
- printf("\nYear %d is a leapyear.", year);
- else if (year % 400 == 0)
- printf("\nYear %d is a leapyear (Century).", year);
- else
- printf("\nYear %d is not a leapyear.", 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 <stdio.h>
-int main()
-{
- double unit, amt;
- printf("Enter the electricity consp(unit) : ");
- scanf("%lf", &amt);
- if (unit <= 50)
- amt = unit * 0.50;
- else if (unit > 50 && unit <= 50)
- amt = 25 + ((unit - 50) * 0.75);
- else if (unit > 150 && unit <= 250)
- amt = 25 + 75 + ((unit - 150) * 1.20);
- else if (unit > 250)
- amt = 25 + 75 + 120 + ((unit - 250) * 1.50);
- amt = amt * 1.20;
- printf("\nAmount to be paid : %g", 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
-('s' for simple interest amd 'c' 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 <stdio.h>
-#include <math.h>
-#include <ctype.h>
-int main()
-{
- double principalAmount, rateOfInterest, timePeriod, simpleInterest, compoundInterest;
- char mode;
- printf("Enter the principle amount, Rate of interest, Time : ");
- scanf("%lf %lf %lf", &principalAmount, &rateOfInterest, &timePeriod);
- printf("\nEnter the mode ('s' : simple interest, 'c' : compound interest) : ");
- scanf(" %c", &mode);
- mode = tolower(mode);
- switch (mode)
- {
- case 's':
- simpleInterest = (principalAmount * rateOfInterest * timePeriod) / 100;
- printf("\nSimple Interest : %g", simpleInterest);
- break;
- case 'c':
- compoundInterest = principalAmount * (pow((1 + rateOfInterest / 100), timePeriod) - 1);
- printf("\nCompound Interest : %g", compoundInterest);
- break;
- default:
- printf("\nInvalid Input");
- 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 ('L' : laptop, 'D' : 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 <stdio.h>
-#include <ctype.h>
-int main()
-{
- double principal_amount, desktop_discount, laptop_discount, discount_amount, discounted_price;
- char choice;
- printf("Enter the purchase amount : ");
- scanf("%lf", &principal_amount);
- printf("Type of purchase ('L' : Laptop, 'D' : Desktop) : ");
- scanf(" %c", &choice);
- choice = toupper(choice);
- if (principal_amount <= 20000)
- {
- laptop_discount = 0.03;
- desktop_discount = 0.05;
- }
- else if (principal_amount > 20000 && principal_amount <= 50000)
- {
- laptop_discount = 0.05;
- desktop_discount = 0.075;
- }
- else if (principal_amount > 50000 && principal_amount <= 75000)
- {
- laptop_discount = 0.075;
- desktop_discount = 0.105;
- }
- else if (principal_amount > 75000)
- {
- laptop_discount = 0.1;
- desktop_discount = 0.15;
- }
- switch (choice)
- {
- case 'L':
- discount_amount = principal_amount * laptop_discount;
- discounted_price = principal_amount - discount_amount;
- printf("\nDiscount Amount : %g"
- "\nDiscounted Price : %g",
- discount_amount, discounted_price);
- break;
- case 'D':
- discount_amount = principal_amount * desktop_discount;
- discounted_price = principal_amount - discount_amount;
- printf("\nDiscount Amount : %g"
- "\nDiscounted Price : %g",
- discount_amount, discounted_price);
- break;
- default:
- printf("\nInvalid Input.");
- 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 <stdio.h>
-int main()
-{
- int i = 1, num, fact = 1;
- printf("Enter the number : ");
- if (scanf("%d", &num) != 1)
- {
- printf("\nPlease enter a number.");
- return 1;
- }
- if (num == 0)
- {
- printf("\nFactorial of 0 : 1");
- return 0;
- }
- if (num < 0)
- {
- printf("\nFactorial of %d : UNDEFINED", num);
- return 0;
- }
- while (i <= num)
- {
- fact = fact * i;
- i++;
- }
- printf("Factorial of %d : %d", 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 <stdio.h>
-int main()
-{
- int num, i = 0, result = 0;
- printf("Enter the value for n : ");
- if (scanf("%d", &num) != 1)
- {
- printf("\nPlease enter a number.");
- return 1;
- }
- if (num < 1)
- {
- printf("\nPlease enter a positive number.");
- return 1;
- }
- while (i <= num)
- {
- result = result + i;
- i++;
- }
- printf("\nResult : %d", 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 <stdio.h>
-#include <math.h>
-
-int main()
-{
- int i, r;
-
- // 3, 6, 9, 12, ...
- {
- i = 3, r = 0;
- printf("Series 1 (3, 6, 9, 12, ...) :");
- while (i <= 15)
- {
- r = r + 3;
- printf(" %d", r);
- i++;
- }
- }
-
- // 1, 4, 9, 16, ...
- {
- i = 1;
- printf("\nSeries 2 (1, 4, 9, 16, ...) :");
- while (i <= 15)
- {
- printf(" %d", i * i);
- i++;
- }
- }
-
- // 4, 8, 16, 32, ...
- {
- i = 1, r = 2;
- printf("\nSeries 3 (4, 8, 16, 32, ...) :");
- while (i <= 15)
- {
- r = r * 2;
- printf(" %d", r);
- i++;
- }
- }
-
- // 0, 7, 26, ...
- {
- i = 1, r;
- printf("\nSeries 4 (0, 7, 26, ...) :");
- while (i <= 15)
- {
- r = (int)pow(i, 3) - 1;
- printf(" %d", 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 <stdio.h>
-#include <math.h>
-
-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("--- s = (a ^ 2) + (a ^ 2 / 2) + (a ^ 2 / 3) + ... + (a ^ 2 / 10) ---");
- printf("\nEnter the number : ");
- scanf("%lf", &a);
- while (i <= 10)
- {
- res = res + ((a * a) / i);
- i++;
- }
- printf("S = %g", res);
- }
-
- // s = 1 + (2 ^ 2 / a) + (3 ^ 3 / a ^ 2) + ... + n
- {
- res = 0, i = 0;
- printf("\n--- // s = 1 + (2 ^ 2 / a) + (3 ^ 3 / a ^ 2) + ... + n ---");
- printf("\nEnter the value for a and n : ");
- scanf(" %lf %lf", &a, &n);
- while (i <= n - 1)
- {
- res = res + (pow(i + 1, i + 1) / pow(a, i));
- i++;
- }
- printf("S = %g", 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 <stdio.h>
-int main()
-{
- int n, temp, sod = 0;
- printf("Enter the number : ");
- scanf("%d", &n);
- temp = n;
- while (temp > 0)
- {
- sod = sod + (temp % 10);
- temp = temp / 10;
- }
- if (n % sod == 0)
- printf("\nIt is Niven number.");
- else
- printf("\nIt is not a Niven number.");
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
-int main()
-{
- int inp, odd = 0, even = 0, temp;
- printf("Enter the number : ");
- scanf("%d", &inp);
- temp = inp;
- while (temp > 0)
- {
- if ((temp % 10) % 2 == 0)
- even += temp % 10;
- else
- odd += temp % 10;
- temp /= 10;
- }
- printf("\nSum of even : %d"
- "\nSum of odd : %d",
- 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 <stdio.h>
-int main()
-{
- int inp, temp, index = 1, even = 0, odd = 0;
- printf("Enter the numebr : ");
- scanf("%d", &inp);
- temp = inp;
- while (temp > 0)
- {
- if (index % 2 == 0)
- even += temp % 10;
- else
- odd += temp % 10;
- temp /= 10;
- index++;
- }
- printf("\nSum of even position digits : %d"
- "\nSum of odd position digits : %d",
- 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 <stdio.h>
-#include <stdbool.h>
-int main()
-{
- int n, res = 1, temp;
- bool status = false;
- printf("Enter the number : ");
- scanf("%d", &n);
- temp = n;
- while (temp > 0)
- {
- if ((temp % 10) % 2 == 0)
- {
- res *= (temp % 10) + 1;
- status = true;
- }
- temp /= 10;
- }
- if (!status)
- printf("\nThere is no even digits.");
- else
- printf("\nThe product of the successors of even digits of the number %d is : %d", 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 <stdio.h>
-#include <math.h>
-
-int main()
-{
- double a, sum = 0;
- int n, i;
- printf("Enter value for a and n : ");
- scanf("%lf %d", &a, &n);
- for (i = 1; i <= n; i++)
- sum += pow(a, i) / i;
- printf("\nSum = %g", 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 <stdio.h>
-
-int main()
-{
- double sum = 0, temp1 = 0, temp2 = 1;
- int n, i;
- printf("Enter value for n : ");
- scanf("%d", &n);
- for (i = 1; i <= n; i++)
- {
- temp1 += i;
- temp2 *= i;
- sum += temp1 / temp2;
- }
- printf("\nSum = %g", 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 <stdio.h>
-#include <math.h>
-#include <stdbool.h>
-
-int main()
-{
- int num, i, endCheckDigit;
- bool isPrime = true;
- printf("Enter the number : ");
- if (scanf("%d", &num) != 1)
- {
- printf("\nOnly a number is allowed, not a character.");
- return 1;
- }
- if (num <= 0)
- {
- printf("\nOnly postive number is allowed.");
- return 1;
- }
- if (num == 1)
- {
- printf("\nInput 1 is not a prime number."
- "\nHas only one positive divisor (itself), not exactly two."
- "\nRule: Prime number should have exactly two distinct positive divisors: 1 and itself");
- return 0;
- }
- if (num == 2)
- {
- printf("\nInput 2 is a prime number."
- "\n(Note: 2 is only Even Prime Number)");
- return 0;
- }
- if (num % 2 == 0)
- {
- printf("\nInput %d is not a prime number.", num);
- return 0;
- }
- endCheckDigit = sqrt(num);
- for (i = 3; i <= endCheckDigit; i += 2)
- {
- if (num % i == 0)
- {
- isPrime = false;
- printf("\nInput %d is not prime number.", num);
- return 0;
- }
- }
- if (isPrime)
- {
- printf("\nInput %d is a prime number.", 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 <stdio.h>
-
-int main()
-{
- int num, i;
- printf("Enter a number : ");
- scanf("%d", &num);
- printf("\nFactors of %d : ", num);
- for (i = 1; i <= num / 2; i++)
- {
- if (num % i == 0)
- {
- printf(" %d", 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 <stdio.h>
-int main()
-{
- int a, b, temp;
- printf("Enter two number : ");
- scanf("%d %d", &a, &b);
- while (b > 0)
- {
- temp = a;
- a = b;
- b = temp % b;
- }
- printf("HCF = %d", 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 <stdio.h>
-int main()
-{
- int a, b, temp, temp_a, temp_b;
- printf("Enter two number : ");
- scanf("%d %d", &a, &b);
- temp_a = a;
- temp_b = b;
- while (b > 0)
- {
- temp = a;
- a = b;
- b = temp % b;
- }
- if (a == 1)
- {
- printf("\n(%d, %d) is co-prime.", temp_a, temp_b);
- }
- else
- {
- printf("\n(%d, %d) is not co-prime.", 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 <stdio.h>
-#include <math.h>
-
-int main()
-{
- int n, t, i, r, rev, prime = 1;
- printf("Enter the number : ");
- scanf("%d", &n);
- for (i = 2; i <= (int)sqrt(n); i++)
- {
- if (n % i == 0)
- {
- prime = 0;
- break;
- }
- }
- if (prime)
- {
- printf("%d is a prime number.", n);
- t = n;
- rev = 0;
- prime = 1;
- while (t > 0)
- {
- r = t % 10;
- rev = rev * 10 + r;
- t = t / 10;
- }
- for (i = 2; i <= (int)sqrt(rev); i++)
- {
- if (rev % i == 0)
- {
- prime = 0;
- break;
- }
- }
- if (prime)
- {
- printf("\n%d and %d are prime numbers.. TWISTED PRIME", n, rev);
- }
- else
- {
- printf("\n%d is non prime", rev);
- }
- }
- else
- {
- printf("\n%d is non prime.", 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 <stdio.h>
-int main()
-{
- int num, temp, rev;
- printf("Enter the number : ");
- scanf("%d", &num);
- temp = num;
- rev = 0;
- while (temp > 0)
- {
- rev = (rev * 10) + (temp % 10);
- temp /= 10;
- }
- if (num == rev)
- {
- printf("%d is a palindrome number.", num);
- }
- else
- {
- printf("%d is not a palindrome number.", 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 <stdio.h>
-#include <math.h>
-#include <stdbool.h>
-
-int main()
-{
- int num, iterationIndex;
- bool isPronic = false;
- printf("Enter the number : ");
- if (scanf("%d", &num) != 1)
- {
- printf("\nYou have to enter a number, not an character or symbol.");
- return 1;
- }
- if (num < 1)
- {
- printf("\nOnly postive number is allowed.");
- return 1;
- }
- for (iterationIndex = 1; iterationIndex <= num / 2; iterationIndex++)
- {
- if (iterationIndex * (iterationIndex + 1) == num)
- {
- printf("\nInput %d is a Pronic Number.", num);
- isPronic = true;
- break;
- }
- }
- if(!isPronic)
- {
- printf("\nInput %d is not a Pronic Number.", num);
- }
- return 0;
-}
-*/
-
-// using direct return method (more efficient and generally preferred)...
-
-#include <stdio.h>
-#include <math.h>
-
-int main()
-{
- int num, iterationIndex, iterationLimit;
- printf("Enter the number : ");
- if (scanf("%d", &num) != 1)
- {
- printf("\nYou have to enter a number, not an character or symbol.");
- return 1;
- }
- if (num < 1)
- {
- printf("\nOnly postive number is allowed.");
- return 1;
- }
- iterationLimit = (int)sqrt(num);
- for (iterationIndex = 1; iterationIndex <= iterationLimit; iterationIndex++)
- {
- if (iterationIndex * (iterationIndex + 1) == num)
- {
- printf("\nInput %d is a Pronic Number.", num);
- return 0;
- }
- }
- printf("\nInput %d is not a Pronic Number.", 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 <stdio.h>
-
-int main()
-{
- int i, j, n;
- printf("Enter n : ");
- scanf("%d", &n);
- for (i = 1; i <= n; i++)
- {
- for (j = 1; j <= i; j++)
- {
- printf("%d\t", j);
- }
- printf("\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">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 <stdio.h>
-
-int main()
-{
- int i, j, n;
- printf("Enter n : ");
- scanf("%d", &n);
- for (i = 1; i <= n; i++)
- {
- for (j = i; j >= 1; j--)
- {
- printf("%d\t", j);
- }
- printf("\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">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 <stdio.h>
-
-int main()
-{
- int i, j, n;
- printf("Enter n : ");
- scanf("%d", &n);
- for (i = n; i >= 1; i--)
- {
- for (j = n; j >= i; j--)
- {
- printf("%d\t", j);
- }
- printf("\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">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 <stdio.h>
-
-int main()
-{
- int i, j, n, temp = 1;
- printf("Enter row number : ");
- scanf("%d", &n);
- for (i = 1; i <= n; i++)
- {
- for (j = 1; j <= i; j++)
- {
- printf("%d\t", temp);
- temp++;
- }
- printf("\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">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 <stdio.h>
-
-int main()
-{
- int i, j, n;
- char a = '#', b = '@';
- printf("Enter row number : ");
- scanf("%d", &n);
- for (i = 1; i <= n; i++)
- {
- for (j = 1; j <= i; j++)
- {
- if (i % 2 == 0)
- printf("%c\t", b);
- else
- printf("%c\t", a);
- }
- printf("\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">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 <stdio.h>
-#include <math.h>
-
-int main()
-{
- int num;
- printf("Enter the number : ");
- scanf("%d", &num);
- int position = printf("%d", num);
- int temp = num;
- int res = 0;
- while (temp > 0)
- {
- res += (int)pow(temp % 10, position);
- position--;
- temp /= 10;
- }
- if (res == num)
- printf(" is a Disarium Number.");
- else
- printf(" is Not a Disarium Number.");
- return 0;
-}</code></pre>
- </div>
- </li>
-
- <li>
- <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
- <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
-#include <math.h>
-
-int main()
-{
- int num, res = 0, temp, position = 0;
- printf("Enter the number : ");
- scanf("%d", &num);
- temp = num;
- while (temp > 0)
- {
- position++;
- temp /= 10;
- }
- temp = num;
- while (temp > 0)
- {
- res += (int)pow(temp % 10, position);
- position--;
- temp /= 10;
- }
- if (res == num)
- printf("\nInput %d is a Disarium Number.", num);
- else
- printf("\nInput %d is Not a Disarium Number.", 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 <stdio.h>
-
-int main()
-{
- int a, b, i, sa = 0, sb = 0;
- printf("Enter two number : ");
- scanf("%d %d", &a, &b);
- for (i = 1; i <= a / 2; i++)
- if (a % i == 0)
- sa += i;
- for (i = 1; i <= b / 2; i++)
- if (b % i == 0)
- sb += i;
- if (sa == b && sb == a)
- printf("\nInput %d and %d is Amicable Pair.", a, b);
- else
- printf("\nInput %d and %d is Not Amicable Pair.", 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 <stdio.h>
-
-int main()
-{
- int n, sum = 0, temp = 0, i;
- printf("Enter the n : ");
- scanf("%d", &n);
- for (i = 1; i <= n; i++)
- {
- temp += i;
- sum += temp;
- }
- printf("%d", 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 <stdio.h>
-
-int main()
-{
- int i, j, temp;
-
- printf("\n\nPattern 1 : \n\n");
- /*
- 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 <= 5; i++)
- {
- for (j = 1; j <= 5; j++)
- {
- printf("%d ", temp);
- }
- printf("\n");
- temp -= 2;
- }
-
- // Another method print above pattern
- printf("\n\nPattern 1 : \n\n");
- for (i = 9; i >= 1; i -= 2)
- {
- for (j = 1; j <= 5; j++)
- {
- printf("%d ", i);
- }
- printf("\n");
- }
-
- printf("\n\nPattern 2 : \n\n");
- /*
- 1 2 3 4 5
- 1 2 3 4 5
- 1 2 3 4 5
- */
- for (i = 1; i <= 3; i++)
- {
- for (j = 1; j <= 5; j++)
- {
- printf("%d ", j);
- }
- printf("\n");
- }
-
- printf("\n\nPattern 3 : \n\n");
- /*
- 5 4 3 2 1
- 5 4 3 2 1
- */
- for (i = 1; i <= 2; i++)
- {
- for (j = 5; j >= 1; j--)
- {
- printf("%d ", j);
- }
- printf("\n");
- }
-
- printf("\n\nPattern 4 : \n\n");
- /*
- 1 2 3 4
- 5 6 7 8
- 9 10 11 12
- */
- temp = 1;
- for (i = 1; i <= 3; i++)
- {
- for (j = 1; j <= 4; j++)
- {
- printf("%d ", temp);
- temp++;
- }
- printf("\n");
- }
-
- printf("\n\nPattern 5 : \n\n");
- /*
- 1 2 3 4
- 4 8 12 16
- 1 2 3 4
- 4 8 12 16
- 1 2 3 4
- */
- for (i = 1; i <= 5; i++)
- {
- for (j = 1; j <= 4; j++)
- {
- if (i % 2 == 0)
- printf("%d ", j * 4);
- else
- printf("%d ", j);
- }
- printf("\n");
- }
-
- printf("\n\nPattern 6 : \n\n");
- /*
- 1
- 2 4
- 3 5 7
- 6 8 10 12
- 9 11 13 15 17
- */
- int odd = 1, even = 2;
- for (i = 1; i <= 5; i++)
- {
- for (j = 1; j <= i; j++)
- {
- if (i % 2 == 0)
- {
- printf("%d ", even);
- even += 2;
- }
- else
- {
- printf("%d ", odd);
- odd += 2;
- }
- }
- printf("\n");
- }
-
- printf("\n\nPattern 7 : \n\n");
- /*
- 1 2 3 4 5
- 6 7 8 9
- 10 11 12
- 13 14
- 15
- */
- temp = 1;
- for (i = 5; i >= 1; i--)
- {
- for (j = 1; j <= i; j++)
- {
- printf("%d ", temp);
- temp++;
- }
- printf("\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">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 <stdio.h>
-
-int fact(int);
-int isKrishnamurty(int);
-
-int fact(int n)
-{
- int fact = 1, i;
- for (i = 1; i <= n; i++)
- fact *= i;
- return fact;
-}
-
-int isKrishnamurty(int n)
-{
- int temp = n, sum = 0;
- while (temp > 0)
- {
- sum += fact(temp % 10);
- temp /= 10;
- }
- return n == sum;
-}
-
-int main()
-{
- int n;
- printf("Enter the number : ");
- scanf("%d", &n);
- if (isKrishnamurty(n))
- printf("\nInput %d is a Krishnamurty Number.", n);
- else
- printf("\nInput %d is not a Krishnamurty number.", 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 <stdio.h>
-
-void printFibonacci(int);
-
-void printFibonacci(int n)
-{
- int val1 = 0, val2 = 1, val3, i;
- printf("\nFibonacci series upto %d terms :", n);
- if (n < 0)
- printf(" N/A");
- if (n == 0)
- printf(" %d", val1);
- if (n > 0)
- printf(" %d %d", val1, val2);
- for (i = 2; i <= n; i++)
- {
- val3 = val1 + val2;
- printf(" %d", val3);
- val1 = val2;
- val2 = val3;
- }
-}
-
-int main()
-{
- int n;
- printf("Enter the n : ");
- scanf("%d", &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 <stdio.h>
-
-void swap(int *a, int *b)
-{
- int temp = *a;
- *a = *b;
- *b = temp;
-}
-
-int main()
-{
- int a, b;
- printf("Enter A and B: ");
- scanf("%d %d", &a, &b);
- printf("\nBefore swap A: %d, B: %d", a, b);
- swap(&a, &b);
- printf("\nAfter swap A: %d, B: %d", 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 <stdio.h>
-
-void series(int n)
-{
- int i;
- printf("\nSeries: ");
- for (i = 1; i <= n; i++)
- printf("%d ", (i * i * i) - 1);
-}
-
-int main()
-{
- int n;
- printf("Enter n: ");
- scanf("%d", &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 <stdio.h>
-
-void displayASCII()
-{
- int i;
- printf("ASCII Code\t\tCharacter");
- for (i = 'A'; i <= 'Z'; i++)
- printf("\n%c\t\t%d", 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"
- >
- ×
- </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
- )} — <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 <stdio.h>
+#include <math.h>
+
+int isPrime(int);
+
+int main()
+{
+ int n;
+ printf("Enter the number: ");
+ scanf("%d", &n);
+
+ if (isPrime(n))
+ {
+ printf("\nInput %d is a Prime Number.", n);
+ }
+ else
+ {
+ printf("\nInput %d is not a Prime Number.", n);
+ }
+
+ return 0;
+}
+
+int isPrime(int n)
+{
+ if (n <= 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 <= 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 <stdio.h>
+#include <math.h>
+
+int isArmstrong(int);
+int count(int);
+
+int main()
+{
+ int n;
+ printf("Enter the number: ");
+ scanf("%d", &n);
+
+ if (isArmstrong(n))
+ {
+ printf("\nInput %d is a Armstrong Number.", n);
+ }
+ else
+ {
+ printf("\nInput %d is Not a Armstrong Number.", n);
+ }
+
+ return 0;
+}
+
+int count(int n)
+{
+ int count = 0;
+ while (n > 0)
+ {
+ count++;
+ n = n / 10;
+ }
+ return count;
+}
+
+int isArmstrong(int n)
+{
+ if (n < 0)
+ return 0;
+ if (n == 0)
+ return 1;
+
+ int power = count(n);
+ int temp = n;
+ int checker = 0;
+
+ while (temp > 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 <stdio.h>
+
+int isPerfect(int);
+
+int main()
+{
+ int n;
+ printf("Enter the number: ");
+ scanf("%d", &n);
+ if (isPerfect(n))
+ {
+ printf("\nInput %d is a Perfect Number.", n);
+ }
+ else
+ {
+ printf("\nInput %d is not a Perfect Number.", n);
+ }
+ return 0;
+}
+
+int isPerfect(int n)
+{
+ if (n <= 1)
+ return 0;
+ int temp = 1;
+ int i;
+ for (i = 2; i <= 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 <stdio.h>
+
+int main()
+{
+ int month, year, days;
+ printf("Enter the month (1 to 12) and year: ");
+ scanf("%d %d", &month, &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) && (year % 100 != 0)))
+ {
+ days = 29;
+ }
+ else
+ {
+ days = 28;
+ }
+ break;
+ default:
+ printf("\nYou entered something wrong.");
+ return 0;
+ }
+
+ printf("\nNumber of days: %d", 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<stdio.h>
+
+int main() {
+ int inp, result_sum = 0, result_product = 1, temp;
+ printf("Please enter the number : ");
+ scanf("%d",&inp);
+ printf("\n");
+
+ if (inp < 0) {
+ printf("\nPlease enter a valid non negetive integer.");
+ return 1;
+ }
+
+ temp = inp;
+ while (temp != 0 ) {
+ result_sum = result_sum + (temp % 10);
+ result_product = result_product * (temp % 10);
+ temp = temp / 10;
+ }
+
+ printf("\nSum of the digits of the input number '%d' is : %d"
+ "\nProduct of the digits of the input number '%d' is : %d",
+ 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<stdio.h>
+
+int main() {
+ int inp, result = 0, temp;
+ printf("PLease enter the number you want to reverse : ");
+ scanf("%d",&inp);
+ printf("\n");
+
+ if (inp < 0) {
+ printf("\nPlease enter a non negetive integer.");
+ return 1;
+ }
+
+ temp = inp;
+ while ( temp != 0) {
+ result = (result * 10) + (temp % 10);
+ temp = temp / 10;
+ }
+
+ printf("\nReverse of the input '%d' is : %d", 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<stdio.h>
+
+int main() {
+ int n, i;
+ float result = 0;
+ printf("Please enter the value for 'n' : ");
+ scanf("%d", &n);
+ printf("\n");
+
+ if (n <= 0) {
+ printf("\nPlease enter a positve number greater than ZERO.");
+ return 1;
+ }
+
+ for (i = 1; i <= n; i++) {
+ result = result + (1.0 / i);
+ }
+
+ printf("\nSum of the first %d terms of the following series S =1+1/2+1/3+1/4+...... is : %f",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<stdio.h>
+
+int main() {
+ int n, result = 0, temp, i;
+ printf("Please enter the value for 'n' for this series 's = 1-2+3-4+5-....': ");
+ scanf("%d",&n);
+ printf("\n");
+
+ if (n <= 0) {
+ printf("\nPlease enter a positive integer.");
+ return 1;
+ }
+
+ for (i = 1; i<= n; i++) {
+ if (i % 2 == 0) {
+ result = result - i;
+ }
+ else {
+ result = result + i;
+ }
+ }
+
+ printf("\nAns : %d", 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<stdio.h>
+
+int isPrime(int inp) {
+ int i, is_prime = 1;
+
+ if (inp < 2) is_prime = 0;
+
+ for (i = 2; i <= inp / 2; i++) if (inp % i == 0) {
+ is_prime = 0;
+ break;
+ }
+
+ return is_prime;
+}
+
+
+int main() {
+ int inp, i;
+ printf("Enter the number you want to check : ");
+ scanf("%d",&inp);
+ printf("\n");
+
+ if (isPrime(inp)) printf("\nGiven input '%d' is a Prime Number.",inp);
+ else printf("\nGiven input '%d' is not a Prime Number.",inp);
+
+ printf ("\nSeries of prime number upto 100 : ");
+ for (i = 2; i < 100; i++) if (isPrime(i)) printf(" %d",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<stdio.h>
+#include<string.h>
+
+int isPalindrome(char inp[]) {
+ int len = strlen(inp);
+ int i = 0; //starting point
+ int j = len - 1; //end point
+
+ while (i < j) {
+ if (inp[i] != inp[j]) {
+ return 0;
+ }
+ i++;
+ j--;
+ }
+
+ return 1;
+}
+
+int main() {
+ char inp[20];
+ printf("Enter the number : ");
+ scanf("%s",inp);
+ if (isPalindrome(inp)) printf("\n\nInput '%s' is a Palindrome number.", inp);
+ else printf("\n\nInput '%s' is not a Palindrome number.", 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<stdio.h>
+#include<stdlib.h>
+
+int main() {
+ int inp, num, i;
+ printf("Please enter the number to get the factors from it : ");
+ scanf("%d", &inp);
+
+ num = abs(inp);
+
+ if (num == 0) {
+ printf("\n\n0 has infinitely many factors (all integers).");
+ return 1;
+ }
+
+ printf("\n\nThe factors of ' %d ' is :- ", inp);
+ printf("\nPositive : ");
+ for (i = 1; i <= num ; i++) if (num % i == 0) printf(" %d", i);
+ printf("\nNegative : ");
+ for (i = 1; i <= num ; i++) if (num % i == 0) printf(" %d", -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'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' 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 (&&, ||) 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 <stdio.h>
+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("------ Home Security Controller ------\n");
+ printf("Enter sensor states (1 for active, 0 for inactive).\n");
+ printf("Format: [Door] [Window] [Motion] [Glass Break]\n");
+ printf("Example: 0 1 1 0\n");
+ printf("Enter states (or press Ctrl+D for MacOS or Linux / Ctrl+Z for Windows to exit): ");
+
+ // doing the main calculation
+ // chacking the combined state and taking a decision
+ while (scanf("%d %d %d %d", &doorSensorState, &windowSensorState, &motionSensorState, &glassbreakSensorState) == 4)
+ {
+ // validating input
+ // The expression (variable & ~1) results in 0 only if 'variable' is 0 or 1.
+ // For any other positive number, it'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 & ~1) | (windowSensorState & ~1) | (motionSensorState & ~1) | (glassbreakSensorState & ~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 << 3) | (motionSensorState << 2) | (windowSensorState << 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 'default' case in the switch.
+ // We achieve this by multiplying the flag (which is > 0) by 16.
+ combinedState += invalidFlag * 16;
+
+ // printing the given state
+ printf("\n\nState : [Door : %d, Window : %d, Motion : %d, Glass Break : %d]\nState Id : %d",
+ doorSensorState, windowSensorState, motionSensorState, glassbreakSensorState, combinedState);
+ printf("\nSystem Action : ");
+
+ // taking decision based on combined state
+ // A single switch statement controls the program'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("System Idle. All sensors inactive.\n");
+ break;
+ case 1: // Binary: 0001
+ printf("Check front door camera.\n");
+ break;
+ case 2: // Binary: 0010
+ printf("Check window sensors.\n");
+ break;
+ case 3: // Binary: 0011
+ printf("Warning: Perimeter breach suspected. Check doors and windows.\n");
+ break;
+ case 4: // Binary: 0100
+ printf("Check interior cameras for movement.\n");
+ break;
+ case 5: // Binary: 0101
+ printf("Warning: Potential entry and movement detected. Check front door and interior. Ask for patrol.\n");
+ break;
+ case 6: // Binary: 0110
+ printf("Warning: Potential entry and movement detected. Check windows and interior. Ask for patrol.\n");
+ break;
+ case 7: // Binary: 0111
+ printf("Alert: High probability of unauthorized entry. Ask for patrol.\n");
+ break;
+ case 8: // Binary: 1000
+ printf("Alert: Glass break detected. High-priority event. Ask for patrol.\n");
+ break;
+ case 9: // Binary: 1001
+ printf("Severe Alert: Forced entry likely (door + glass). Activate Alarm and Contact authorities.\n");
+ break;
+ case 10: // Binary: 1010
+ printf("Severe Alert: Forced entry likely (window + glass). Activate Alarm and Contact authorities.\n");
+ break;
+ case 11: // Binary: 1011
+ printf("Intrusion Alert: Multiple perimeter breaches. Activate Alarm and Contact authorities.\n");
+ break;
+ case 12: // Binary: 1100
+ printf("Intrusion Alert: Confirmed interior presence after breach. Activate Alarm and Contact authorities.\n");
+ break;
+ case 13: // Binary: 1101
+ printf("INTRUSION CONFIRMED! Activate maximum response protocol. Activate Alarm and Contact authorities.\n");
+ break;
+ case 14: // Binary: 1110
+ printf("INTRUSION CONFIRMED! Activate maximum response protocol. Activate Alarm and Contact authorities.\n");
+ break;
+ case 15: // Binary: 1111
+ printf("CATASTROPHIC EVENT! ALL SENSORS TRIGGERED. ACTIVATE ALARM AND CONTACT COPS.\n");
+ break;
+ default:
+ // This case should not be reached with valid 0/1 input but is included for completeness.
+ printf("Error: Invalid sensor state detected.\n");
+ break;
+ }
+
+ // discarding extra characters (if any) left
+ while (getchar() != '\n')
+ ;
+
+ // asking for next set of input
+ printf("\nEnter next set of states: ");
+ }
+ printf("\nSecurity system shutting down.\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">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's behavior.
+ * 5. The program should handle all possible combinations of the sensors' 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 <stdio.h>
+
+int casekey(int door, int window, int motion, int glass) {
+ int key = (door << 3) | (window << 2) | (motion << 1) | glass;
+ return key;
+}
+
+int main() {
+ int door, window, motion, glass, key;
+ char choice;
+
+ static const char *action[16] = {
+ "IDLE", "CHECK WINDOW", "WARN MOTION", "WARN MOTION WINDOW",
+ "CHECK DOOR", "WARN DOOR WINDOW", "INTRUSION SUSPECTED", "INTRUSION CONFIRMED",
+ "GLASS ONLY", "DOOR GLASS", "MOTION GLASS", "MOTION WINDOW GLASS",
+ "DOOR WINDOW", "DOOR WINDOW GLASS", "DOOR MOTION GLASS", "ALL SENSORS"
+ };
+
+ do {
+ printf("Sensors: Door, Window, Motion, Glass\n");
+ printf("Enter the state of each sensor in binary (0 or 1): ");
+ scanf("%d %d %d %d", &door, &window, &motion, &glass);
+
+ key = casekey(door, window, motion, glass);
+ printf("Action: %s\n", action[key]);
+
+ printf("Want to continue? (y/n): ");
+ scanf(" %c", &choice);
+ printf("\n");
+ } while (choice == 'y' || choice == 'Y');
+
+ 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 <stdio.h>
+int main()
+{
+ // testing number
+ int num, len = -13 /* here minus 13 because we will remove the massage characters in line 10 */;
+ printf("Enter a number to get the length : ");
+ scanf("%d", &num);
+ len += printf("Your input : %d", num); // here the "Your input : ", this 13 characters are extra
+ printf("\nLength : %d", len);
+
+ // testing char
+ char a[20];
+ len = -13;
+ while (getchar() != '\n')
+ ;
+ printf("\nEnter a word to get the length : ");
+ scanf("%19s", &a);
+ len += printf("Your input : %s", a); // here the "Your input : ", this 13 characters are extra
+ printf("\nLength : %d", 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 <stdio.h>
+int main()
+{
+ printf("Starting.....\n");
+
+ for (int i = 1; ; i++)
+ {
+ printf("i = %d\n", 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<stdio.h>
+int main() {
+ float f, c;
+ printf("Enter the temperature of city in Fahrenheit : ");
+ scanf("%f", &f);
+ // formula (F - 32) 5/9
+ c = ((f - 32) * 5) / 9;
+ printf("\nTemperature in centigrade : %f", 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ double len, bre, r, area_r, per, area_c, cir;
+ printf("Enter the length and breadth of the rectangle : ");
+ scanf("%lf %lf", &len, &bre);
+ printf("Enter the Radius of the circle : ");
+ scanf("%lf", &r);
+ area_r = len * bre;
+ per = 2 * (len + bre);
+ area_c = M_PI * r * r;
+ cir = 2 * M_PI * r;
+ printf("\nArea of Rectangle : %lf"
+ "\nPerimeter of Rectangle : %lf"
+ "\nArea of Circle : %lf"
+ "\nCircumference of Circle : %lf",
+ 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<stdio.h>
+#include<math.h>
+int main() {
+ double s_long = 1189.0, s_short = 841.0, temp;
+ int i;
+ printf("A0 Dimension : %g mm x %g mm", floor(s_long), floor(s_short));
+ for (i = 1; i <= 8; i++) {
+ temp = s_long;
+ s_long = s_short;
+ s_short = temp / 2;
+ printf("\nA%d Dimension : %g mm x %g mm", 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'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 <stdio.h>
+int main()
+{
+ int inp, result = 0, i, temp;
+ printf("Enter a five digit number : ");
+ scanf("%d", &inp);
+ if (inp < 10000 || inp > 99999)
+ {
+ printf("\nPlease enter a valid five digit number.");
+ return 1;
+ }
+ temp = inp;
+ for (i = 1; i <= 5; i++)
+ {
+ result = result + (inp % 10);
+ inp = inp / 10;
+ }
+ printf("\nSum of the digit '%d' is : %d", 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ double x, y, r, phi;
+ printf("Enter the Cartesian Co-Ordinates in this format 'x, y' : ");
+ scanf("%lf, %lf", &x, &y);
+ r = sqrt(pow(x, 2) + pow(y, 2));
+ phi = atan2(y, x);
+ printf("\nPolar Co-Ordinates are : (%g, %g Rad)", 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ double l1, l2, g1, g2, d;
+ printf("Enter the Latitude in 'L1, L2' format : ");
+ scanf("%lf, %lf", &l1, &l2);
+ printf("Enter the Longitude in 'G1, G2' format : ");
+ scanf("%lf, %lf", &g1, &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("Distance in nautical miles : %g", 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ double t, v, wcf;
+ printf("Enter the temperature and velociy of the wind : ");
+ scanf("%lf %lf", &t, &v);
+ wcf = 35.74 + (0.6215 * t) + (((0.4275 * t) - 35.75) * pow(v, 0.16));
+ printf("\nWind-chill factor (wcf) : %g", 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ double inp, rsin, rcos, rtan, rcosec, rsec, rcot;
+ printf("Enter the Angle in degree : ");
+ scanf("%lf", &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("\nTrigonometric ratios :-"
+ "\nsin = %g "
+ "\ncos = %g"
+ "\ntan = %g"
+ "\ncosec = %g"
+ "\nsec = %g"
+ "\ncot = %g",
+ 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 <stdio.h>
+int main()
+{
+ double a, b;
+ printf("Enter the two number A and B : ");
+ scanf("%lf %lf", &a, &b);
+ printf("\nBefore Interchange : ");
+ printf("\nA = %g (Memory location = %p)", a, &a);
+ printf("\nB = %g (Memory location = %p)", b, &b);
+ a = a + b;
+ b = a - b;
+ a = a - b;
+ printf("\nAfter Interchange :");
+ printf("\nA = %g (Memory location = %p)", a, &a);
+ printf("\nB = %g (Memory location = %p)", b, &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 <stdio.h>
+int main()
+{
+ int num, rev, temp, i;
+ printf("Please enter the number : ");
+ scanf("%d", &num);
+ if (num < 10000 || num > 99999)
+ {
+ printf("\nPlease enter a five digit number.");
+ return 1;
+ }
+ temp = num;
+ for (i = 1; i <= 5; i++)
+ {
+ rev = (rev * 10) + num % 10;
+ num = num / 10;
+ }
+ printf("\nReverse of the Input number : %d", rev);
+ if (rev == temp)
+ printf("\nOriginal and reversed numbers are equal.");
+ else
+ printf("\nOrigianl and reversed numbers are not equal.");
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
+int main()
+{
+ int ram, shyam, ajay;
+ printf("Please enter the age of Ram, Shyam and Ajay : ");
+ scanf("%d %d %d", &ram, &shyam, &ajay);
+ if (ram == shyam || ram == ajay || shyam == ajay)
+ printf("\nThree must have different age.");
+ if (ram < shyam && ram < ajay)
+ printf("\nRam is the youngest. Age : %d", ram);
+ if (shyam < ram && shyam < ajay)
+ printf("\nShyam is the youngest. Age : %d", shyam);
+ if (ajay < ram && ajay < shyam)
+ printf("\nAjay is the youngest. Age : %d", 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 <stdio.h>
+int main()
+{
+ double angle1, angle2, angle3, sum;
+ printf("Enter the value of the three angle of the triangle : ");
+ scanf("%lf %lf %lf", &angle1, &angle2, &angle3);
+ sum = angle1 + angle2 + angle3;
+ if (sum == 180.0)
+ printf("\nThis Triangle is a valid one.");
+ else
+ printf("\nThis Triangle is not valid. Sum of the angles : %g", 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ double num;
+ printf("Enter the number : ");
+ scanf("%lf", &num);
+ num = abs(num);
+ printf("\nAbsolute value of the input is : %g", 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'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 <stdio.h>
+int main()
+{
+ double len, bre, area, peri;
+ printf("Enter the length and breadth of the rectangle : ");
+ scanf("%lf %lf", &len, &bre);
+ area = len * bre;
+ peri = 2 * (len + bre);
+ if (area > peri)
+ printf("\nThe area of the rectangle is greater than it's perimeter.");
+ else if (area < peri)
+ printf("\nThe area of the rectangle is lower than it's perimeter.");
+ else
+ printf("\nThe area of the rectangle is same as it's 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">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 <stdio.h>
+#include <math.h>
+#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("Enter the point A(x1, y1) : ");
+ scanf("%lf %lf", &x1, &y1);
+ printf("Enter the point B(x2, y2) : ");
+ scanf("%lf %lf", &x2, &y2);
+ printf("Enter the point C(x3, y3) : ");
+ scanf("%lf %lf", &x3, &y3);
+ area = 0.5 * ((x1 * (y2 - y3)) + (x2 * (y3 - y1)) + (x3 * (y1 - y2)));
+ if (fabs(area) < EPSILON) // abs() for integer, fabs() for float, double
+ printf("\nA(%g, %g), B(%g, %g) and C(%g, %g) points fall on one straight line.", x1, y1, x2, y2, x3, y3);
+ else
+ printf("\nA(%g, %g), B(%g, %g) and C(%g, %g) points doesn't fall on one straight line.", 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 <stdio.h>
+#include <math.h>
+// 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("Enter the center coordinates (h, k) : ");
+ scanf("%lf %lf", &h, &k);
+ printf("Enter the radius (R) : ");
+ scanf("%lf", &R);
+ printf("Enter the point P coordinates (x, y) : ");
+ scanf("%lf %lf", &x, &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) < EPSILON)
+ {
+ printf("The point P(%g, %g) lies ON THE CIRCLE.\n", x, y);
+ }
+ // Case 2: Inside the circle (D^2 < R^2)
+ else if (distance_sq < radius_sq)
+ {
+ printf("The point P(%g, %g) lies INSIDE THE CIRCLE.\n", x, y);
+ }
+ // Case 3: Outside the circle (D^2 > R^2)
+ else
+ {
+ printf("The point P(%g, %g) lies OUTSIDE THE CIRCLE.\n", 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 <stdio.h>
+#include <math.h>
+#define EPSILON 0.00001
+
+int main()
+{
+ double x, y;
+ printf("Enter the point P(x, y) : ");
+ scanf("%lf %lf", &x, &y);
+ if (fabs(x) < EPSILON && fabs(y) < EPSILON)
+ printf("\nPoint P(%g, %g) lies on the origin.", x, y);
+ else if (fabs(x) < EPSILON)
+ printf("\nPoint P(%g, %g) lies on the Y-Axis.", x, y);
+ else if (fabs(y) < EPSILON)
+ printf("\nPoint P(%G, %g) lies on the X-Axis.", x, y);
+ else
+ printf("\nThe point P(%g, %g) lies in a QUADRANT (not on an axis or the origin).", 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 <stdio.h>
+
+/**
+ * @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 && 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[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
+
+ printf("Enter the year (e.g., 2025): ");
+ if (scanf("%lld", &year) != 1 || year < 1) {
+ printf("Invalid year input. Please enter a positive integer year (>= 1).\n");
+ 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 < 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("\nOn January 1st, %lld, the day was: **%s**.\n", 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 <stdio.h>
+
+int is_leap(int year) {
+ if ((year % 400 == 0) || (year % 4 == 0 && 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[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
+
+ printf("Enter the year (e.g., 2025): ");
+ if (scanf("%lld", &year) != 1 || year < 1) {
+ printf("Invalid year input. Please enter a positive integer year (>= 1).\n");
+ 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("\nOn January 1st, %lld, the day was: %s.\n", 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 <stdio.h>
+#include <math.h>
+
+#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("Please enter the length of three side of the triangle : ");
+ scanf("%lf %lf %lf", &side1, &side2, &side3);
+ if (side1 < 1 || side2 < 1 || side3 < 1)
+ {
+ printf("\nLength of a side of triangle should be a positive integer.");
+ return 1;
+ }
+ if (side1 + side2 < side3 || side1 + side3 < side2 || side2 + side3 < side1)
+ {
+ printf("\nEntered triangle is not VALID.");
+ return 1;
+ }
+ // isosceles check
+ if (side1 == side2 || side2 == side3 || side3 == side1)
+ printf("\nEntered triangle is a ISOSCELES triangle.");
+ else
+ printf("\nEntered triangle is NOT a ISOSCELES triangle.");
+ // equilateral check
+ if (side1 == side2 && side2 == side3)
+ printf("\nEntered triangle is a EQUILATERAL triangle.");
+ else
+ printf("\nEntered triangle is NOT a EQUILATERAL triangle.");
+ // scalene check
+ if (side1 != side2 && side2 != side3)
+ printf("\nEntered triangle is a SCALENE triangle.");
+ else
+ printf("\nEntered triangle is NOT a SCALENE triangle.");
+ // right-angle check
+ if (fabs(((side1 * side1) + (side2 * side2)) - (side3 * side3)) < EPSILON ||
+ fabs(((side2 * side2) + (side3 * side3)) - (side1 * side1)) < EPSILON ||
+ fabs(((side3 * side3) + (side1 * side1)) - (side2 * side2)) < EPSILON)
+ printf("\nEntered triangle is a RIGHT-ANGLED triangle.");
+ else
+ printf("\nEntered triangle is NOT a RIGHT-ANGLED triangle.");
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
+
+// declaring function
+double get_white(double red, double green, double blue)
+{
+ double max;
+ max = red / 255;
+ if (max < (green / 255))
+ max = green / 255;
+ if (max < (blue / 255))
+ max = blue / 255;
+ return max;
+}
+
+int main()
+{
+ double r, g, b, w, c = 0, m = 0, y = 0, k = 0;
+ printf("Enter the RGB color code in 'R G B' format : ");
+ scanf("%lf %lf %lf", &r, &g, &b);
+
+ // checking for invalid input (negetive input)
+ if (r < 0 || g < 0 || b < 0)
+ {
+ printf("\nRGB color code can not be a negetive number.");
+ return 1;
+ }
+
+ // checking for invalid input (out of range color code)
+ if (r > 255 || g > 255 || b > 255)
+ {
+ printf("\nRGB color code can be maximum (255, 255, 255).");
+ return 1;
+ }
+
+ // converting RGB color code to CMYK color code
+ if (r == 0 && g == 0 && 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("\nRGB color (%g, %g, %g) equivalent to CMYK color (%g, %g, %g, %g).", 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 <stdio.h>
+int main()
+{
+ double hardness, carbon_content, tensile_strength;
+ printf("Enter the details of the steel below - \n");
+ printf("1. Hardness : ");
+ scanf("%lf", &hardness);
+ printf("2. Carbon Content : ");
+ scanf("%lf", &carbon_content);
+ printf("3. Tensile Strength : ");
+ scanf("%lf", &tensile_strength);
+
+ // storing how many conditions are met as boolean result
+ int condition_met, condition1, condition2, condition3;
+ condition1 = hardness > 50;
+ condition2 = carbon_content < 0.7;
+ condition3 = tensile_strength > 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 && condition2)
+ grade = 9;
+ else if (condition2 && condition3)
+ grade = 8;
+ else if (condition1 && condition3)
+ grade = 7;
+ }
+ else if (condition_met == 1)
+ grade = 6;
+ else
+ grade = 5;
+
+ // printing the result
+ printf("\n------------- Result -------------");
+ printf("\n1. Hardness : Condition %s", condition1 ? "MET" : "DID NOT MET");
+ printf("\n2. Carbon Content : Condition %s", condition2 ? "MET" : "DID NOT MET");
+ printf("\n3. Tensile Strength : Condition %s", condition3 ? "MET" : "DID NOT MET");
+ printf("\nTotal Condition Met : %d", condition_met);
+ printf("\n\nGrade : %d\n\n", 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 < 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 >= 40
+*/
+/* Author - Amit Dutta, Date - 4th OCT, 2025 */
+/* Let Us C, Chap- 4, Page - 72, Qn No.: D(d) */
+
+#include <stdio.h>
+
+int main()
+{
+ double weight, height, bmi;
+ printf("Enter your Weight (in Kilograms) and Height (in Meters) : ");
+ scanf("%lf %lf", &weight, &height);
+ bmi = weight / (height * height);
+ printf("\nCalculated BMI : %g", bmi);
+ if (bmi < 15)
+ printf("\nBMI Catagory : Starvation");
+ else if (bmi >= 15.1 && bmi <= 17.5)
+ printf("\nBMI Catagory : Anorexic");
+ else if (bmi >= 17.6 && bmi <= 18.5)
+ printf("\nBMI Catagory : Underweight");
+ else if (bmi >= 18.6 && bmi <= 24.9)
+ printf("\nBMI Catagory : Ideal");
+ else if (bmi >= 25 && bmi <= 25.9)
+ printf("\nBMI Catagory : Overweight");
+ else if (bmi >= 30 && bmi <= 39.9)
+ printf("\nBMI Catagory : Obese");
+ else if (bmi >= 40)
+ printf("\nBMI Catagory : Morbidly Obese");
+ else
+ printf("\nBMI Catagory : Unclassified");
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
+int main()
+{
+ char inp;
+ printf("Enter the character : ");
+ scanf("%c", &inp);
+ printf("\nInput Character '%c' is %s a LOWER CASE ALPHABET.", inp,
+ (inp >= 'a' && inp <= 'z') ? "" : "NOT");
+ printf("\nInput Character '%c' is %s a SPECIAL SYMBOL.", inp,
+ (inp >= 'a' && inp <= 'z' || inp >= 'A' && inp <= 'Z'
+ || inp >= '0' && inp <= '9') ? "NOT" : "");
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
+int main()
+{
+ int year;
+ printf("Enter the year : ");
+ scanf("%d", &year);
+ printf("\nYear %d is %s a Leapyear.", year, (year % 400 == 0 || year % 4 == 0 && year % 100 != 0) ? "" : "NOT");
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
+int main()
+{
+ double num1, num2, num3, max;
+ printf("Enter three number : ");
+ scanf("%lf %lf %lf", &num1, &num2, &num3);
+ printf("\nGreatest of the three number '%g', '%g' and '%g' is : '%g'", num1, num2, num3,
+ (num1 > num2 && num1 > num3) ? num1 : ((num2 > num1 && num2 > 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 <stdio.h>
+#include <math.h>
+#define EPSILON 0.0000001
+
+int main()
+{
+ double angle, result;
+ printf("Enter the angle value in degree : ");
+ // checking if the input is other than number.
+ if(scanf("%lf", &angle) != 1) {
+ printf("\nPlease enter a number.");
+ return 1;
+ }
+ angle = angle * (M_PI / 180); // converting degree to radian
+ result = pow(sin(angle), 2) + pow(cos(angle), 2);
+ (fabs(result - 1.0) < EPSILON) ?
+ printf("\nsum of squares of sine and cosine of this angle is equal to 1.") :
+ printf("\nsum of squares of sine and cosine of this angle is NOT equal to 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">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<stdio.h>
+ int main()
+ {
+ float sal;
+ printf("Enter the salary");
+ scanf("%f", &sal);
+ if(sal >= 25000 && sal <= 40000)
+ printf("Manager\n");
+ else
+ if(sal >= 15000 && sal < 25000)
+ printf("Accountant\n");
+ else
+ printf("Clerk\n");
+ return 0;
+ }
+*/
+/* Author - Amit Dutta, Date - 6th OCT, 2025 */
+/* Let Us C, Chap- 4, Page - 73, Qn No.: E(e) */
+
+#include <stdio.h>
+int main()
+{
+ float sal;
+ printf("Enter the salary");
+ scanf("%f", &sal);
+ (sal >= 25000 && sal <= 40000) ? printf("Manager\n") :
+ ((sal >= 15000 && sal < 25000) ? printf("Accountant\n") : printf("Clerk\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">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 <stdio.h>
+int main()
+{
+ int i = 0;
+ printf("ASCII Value\tCharacter");
+ printf("\n-----------\t---------\n");
+ while (i <= 255)
+ {
+ printf("%d.\t%c\n\n", 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ int num = 100, temp1, temp2, res;
+ printf("Armstrong numbers between 100 and 500 :");
+ while (num <= 500)
+ {
+ temp1 = num;
+ res = 0;
+ while (temp1 != 0)
+ {
+ temp2 = temp1 % 10;
+ res = res + pow(temp2, 3);
+ temp1 = temp1 / 10;
+ }
+ if (num == res)
+ printf(" %d", 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's pick and the
+computer's pick equal to 5 in each round. This forces the player
+to pick the final matchstick. */
+
+#include <stdio.h>
+int main()
+{
+ int remaining_matchsticks = 21, player_pick, computer_pick;
+ printf(" --- Matchstick Game ---\n");
+ printf("Rules: There are 21 matchsticks. You can pick 1, 2, 3, or 4.\n");
+ printf("Whoever is forced to pick the last matchstick loses the game.\n");
+ while (remaining_matchsticks > 1)
+ {
+ // game start
+ printf("\n--------------------------");
+ printf("\nRemaining Matchsticks : %d", remaining_matchsticks);
+
+ // player pick and checking input is valid or not
+ printf("\nYour turn: Pick 1, 2, 3, or 4 matchsticks: ");
+ if (scanf("%d", &player_pick) != 1)
+ {
+ printf("\n\tPlease enter a number.");
+ while (getchar() != '\n')
+ ;
+ continue;
+ }
+
+ // checking player pick is valid or not
+ if (player_pick < 1 || player_pick > 4)
+ {
+ printf("\n\tPlease enter a number among 1, 2, 3 and 4.");
+ while (getchar() != '\n')
+ ;
+ continue;
+ }
+
+ if (player_pick > remaining_matchsticks)
+ {
+ printf("\nInvalid choice! There are not enough matchsticks left.");
+ while (getchar() != '\n')
+ ;
+ continue;
+ }
+
+ // computer_picks
+ computer_pick = 5 - player_pick;
+ printf("\ncomputer_picks : %d", computer_pick);
+
+ // remaining matchsticks
+ remaining_matchsticks = remaining_matchsticks - (player_pick + computer_pick);
+ }
+
+ // game over
+ printf("\n----------------------------------\n");
+ printf("Only 1 matchstick is left.\n");
+ printf("You are forced to pick the last matchstick. You lose!\n");
+ printf("The computer wins.\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">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's input as a generic string (char array).
+ * This allows the program to accept multi-digit numbers (e.g., "-500") or the command ('n').
+ * 4. TERMINATION CHECK: Immediately check if the input string is exactly "n" using strcmp().
+ * If true, the user wants to quit, so break the loop.
+ * 5. VALIDATION & CONVERSION: If the input is not "n", 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 > 0, increment positive_count.
+ * - If the number is < 0, increment negative_count.
+ * - If the number is == 0, increment zero_count.
+ * 7. ERROR HANDLING: If the input is neither "n" 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 <stdio.h>
+#include <stdlib.h> // for strtol
+#include <string.h> // 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's input as a string (e.g., "123", "-50", or "n")
+ char input_buffer[MAX_INPUT_LEN];
+ int number;
+
+ printf("--- Number Analyzer ---\n");
+ printf("Enter numbers one by one. Type 'n' and press Enter to finish.\n\n");
+
+ // Loop until the user enters 'n'
+ while (1) {
+ printf("Enter number or 'n': ");
+
+ // 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 '\n' if the input was shorter than MAX_INPUT_LEN
+ size_t len = strlen(input_buffer);
+ if (len > 0 && input_buffer[len - 1] == '\n') {
+ input_buffer[len - 1] = '\0';
+ }
+
+ // 1. Check for the termination condition
+ if (strcmp(input_buffer, "n") == 0) {
+ printf("\n'n' received. Stopping input...\n");
+ 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 "%d" (decimal integer)
+ // It returns 1 if a number was successfully read.
+ int conversions = sscanf(input_buffer, "%d", &number);
+
+ if (conversions == 1) {
+ // Conversion was successful, now check the number's sign
+ if (number > 0) {
+ positive_count++;
+ } else if (number < 0) {
+ negative_count++;
+ } else {
+ zero_count++;
+ }
+ printf(" -> Number recorded: %d\n", number);
+ } else {
+ // Conversion failed. The input was neither 'n' nor a valid integer.
+ printf(" -> Invalid input. Please enter a valid number or 'n'.\n");
+ }
+ }
+
+ // Display the final results
+ printf("\n====================================\n");
+ printf(" Analysis Complete\n");
+ printf("====================================\n");
+ printf("Positive numbers entered: %d\n", positive_count);
+ printf("Negative numbers entered: %d\n", negative_count);
+ printf("Zeroes entered: %d\n", zero_count);
+ printf("Total numbers recorded: %d\n", positive_count + negative_count + zero_count);
+ printf("====================================\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">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 <stdio.h>
+int main()
+{
+ int choice = 1, num, positive_count = 0, negative_count = 0, zero_count = 0;
+ while (choice == 1)
+ {
+ printf("\nEnter the number (Type any character and press Enter to finish.) : ");
+ choice = scanf("%d", &num); // Checking whether the user has input any characters
+ if (choice == 1)
+ {
+ printf("Number recorded : %d", num);
+ if (num < 0)
+ negative_count++;
+ else if (num > 0)
+ positive_count++;
+ else if (num == 0)
+ zero_count++;
+ }
+ else
+ {
+ // If the user inputs any characters, then choice = 0, it means he doesn't want to give any more input;
+ choice = 0;
+ printf("\nCharacter received. Stopping input...\n");
+ }
+ }
+ // Display the final results
+ printf("\n====================================\n");
+ printf(" Analysis Complete\n");
+ printf("====================================\n");
+ printf("Positive numbers entered: %d\n", positive_count);
+ printf("Negative numbers entered: %d\n", negative_count);
+ printf("Zeroes entered: %d\n", zero_count);
+ printf("Total numbers recorded: %d\n", positive_count + negative_count + zero_count);
+ printf("====================================\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">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 <stdio.h>
+int main()
+{
+ int octal[20], decimal, index = 0, temp, rem;
+ printf("Enter the decimal number : ");
+ scanf("%d", &decimal);
+ temp = decimal;
+ while (temp != 0)
+ {
+ rem = temp % 8;
+ temp = temp / 8;
+ octal[index] = rem;
+ index++;
+ }
+ printf("\nDeciaml %d to octal : ", decimal);
+ while ((index - 1) >= 0)
+ {
+ printf("%d", 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 <stdio.h>
+int main()
+{
+ int choice = 1, set_of_numbers[30], num, index = -1;
+ while (choice == 1)
+ {
+ printf("\nEnter the number (Type any character and press Enter to finish.) : ");
+ choice = scanf("%d", &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't want to give any more input;
+ choice = 0;
+ printf("\nCharacter received. Stopping input...\n");
+ break;
+ }
+ index++;
+ set_of_numbers[index] = num;
+ }
+ int max = set_of_numbers[0], min = set_of_numbers[0];
+ while (index >= 0)
+ {
+ if (max < set_of_numbers[index])
+ max = set_of_numbers[index];
+ if (min > set_of_numbers[index])
+ min = set_of_numbers[index];
+ index--;
+ }
+ int range = max - min;
+ printf("\nBiggest number in the set : %d", max);
+ printf("\nSmallest number in the set : %d", min);
+ printf("\nRange : %d", 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 <stdio.h>
+int main()
+{
+ int i, num, res;
+ printf("Enter the number : ");
+ scanf("%d", &num);
+ printf("\n--- Multiplication Table ---\n");
+ for (i = 1; i <= 10; i++)
+ printf("%d * %d = %d\n", 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 <stdio.h>
+int main()
+{
+ double y, x;
+ printf("\n--- Approximate Intelligence ---\n");
+ for (y = 1; y <= 6; y++)
+ {
+ printf("\tY = %d\n", y);
+ for (x = 5.5; x <= 12.5; x += 0.5)
+ {
+ printf("Y: %g\t X: %.2g\t I: %g\n", y, x, 2 + (y + 0.5 * x));
+ }
+ printf("-----------------------\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">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 & q and calculate the
+corresponding as' */
+/* 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 "https://github.com/notamitgamer/bsc/issues" with the updated code.
+
+#include <stdio.h>
+#include <math.h>
+int main()
+{
+ double interest, principalAmount, interestRate, timeInYears, compoundFactor, totalAmount;
+ int index;
+ for (index = 1; index <= 10; index++)
+ {
+ printf("Enter Principle amount : ");
+ scanf("%lf", &principalAmount);
+ printf("Enter Rate of Interest : ");
+ scanf("%lf", &interestRate);
+ interestRate *= 0.01;
+ printf("Enter the Time (Years) : ");
+ scanf("%lf", &timeInYears);
+ printf("Compound count in one year : ");
+ scanf("%lf", &compoundFactor);
+ totalAmount = (principalAmount * pow((1 + interestRate / compoundFactor), (timeInYears * compoundFactor)));
+ interest = totalAmount - principalAmount;
+ printf("\nInterest : %.2f\nTotal Amount : %.2f\n\n", 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 <stdio.h>
+#include <math.h>
+
+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 <= 7; i++)
+ {
+ result += 0.5 * pow(((x - 1) / x), i);
+ }
+ return result;
+}
+
+int main()
+{
+ double x;
+ printf("Enter the value for x : ");
+ scanf("%lf", &x);
+ printf("\nResult : %g", 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 <stdio.h>
+#include <math.h>
+
+int main()
+{
+ int a, b, c;
+ printf("Pythagorean Triplets with slide length less than or equal to 30 : \n");
+ for (a = 1; a <= 30; a++)
+ {
+ for (b = a; b <= 30; b++)
+ {
+ int c_square = a * a + b * b;
+ for (c = b + 1; c <= 30; c++)
+ {
+ if (c * c == c_square)
+ printf("(%d, %d, %d)\n", 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 <stdio.h>
+int main()
+{
+ int i, population = 100000;
+ printf("Present year : %d\n", population);
+ for (i = 1; i <= 10; i++)
+ {
+ population /= 1.10;
+ printf("%d year ago : %d\n", 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 <stdio.h> // 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 'long long' because cubes (like 47^3) are large and can exceed
+ // the capacity of a standard 'int', 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("Ramanujan Number Finder (a^3 + b^3 = c^3 + d^3)\n");
+ printf("Searching up to %d (Max base value is %d)\n", LIMIT, MAX_BASE_VAL);
+ printf("---------------------------------------------------\n");
+
+ // 5. OUTER LOOPS: Establishing the FIRST SUM (a^3 + b^3 = sum1)
+
+ // Loop for 'a' (the smaller base of the first pair)
+ for (int a = 1; a <= MAX_BASE_VAL; a++)
+ {
+
+ // Loop for 'b' (the larger base of the first pair)
+ // We start 'b' at 'a + 1' to enforce the rule a < b.
+ // This prevents us from checking redundant pairs like (1, 12) and (12, 1).
+ for (int b = a + 1; b <= 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 'long long' type.
+ sum1 = (long long)a * a * a + (long long)b * b * b;
+
+ // Optimization 1: Check if the sum exceeds the global limit.
+ if (sum1 > LIMIT)
+ {
+ // Since 'b' is increasing, any further increase will also be over the limit.
+ // We stop the 'b' loop and move to the next 'a'.
+ break;
+ }
+
+ // Reset the flag for every new sum1.
+ // We start searching for a second way for this new 'sum1', 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 'c' (the smaller base of the second pair)
+ // We start 'c' at 'a + 1' to enforce the rule a < 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 <= MAX_BASE_VAL; c++)
+ {
+
+ // Optimization 2: Check the flag to exit the 'c' loop early.
+ if (found_match)
+ {
+ // If we already found the second way (c, d) in a previous iteration of 'c', stop searching and move to the next (a, b) pair.
+ break;
+ }
+
+ // Loop for 'd' (the larger base of the second pair)
+ // We start 'd' at 'c + 1' to enforce c < d.
+ for (int d = c + 1; d <= 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 > sum1)
+ {
+ // Since 'd' is increasing, any further increase will also be greater than sum1.
+ // We stop the 'd' loop and move to the next 'c'.
+ 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("[%d] %lld = %d^3 + %d^3 = %d^3 + %d^3\n",
+ count, sum1, a, b, c, d);
+
+ // Set the flag to 1, confirming we found the second way.
+ found_match = 1;
+
+ // Stop the 'd' loop immediately, as we found the required second pair.
+ break;
+ }
+ }
+ // If found_match was set to 1, the 'break' in the d loop will execute,
+ // then the 'if (found_match) break;' in the c loop will execute,
+ // and the program will move to the next (a, b) pair.
+ }
+ }
+ }
+
+ // 8. CONCLUSION
+ printf("---------------------------------------------------\n");
+ printf("Search complete. Found %d Ramanujan-type numbers.\n", 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 <stdio.h>
+
+#define limit 100000
+#define max_base 47
+
+int main()
+{
+
+ long long sum1, sum2;
+ int count = 0;
+
+ printf("Ramanujan numbers : \n");
+
+ int found_match;
+
+ for (int a = 1; a <= max_base; a++)
+ {
+ for (int b = a + 1; b <= max_base; b++)
+ {
+ sum1 = (long long)a * a * a + (long long)b * b * b;
+ if (sum1 > limit)
+ {
+ break;
+ }
+
+ found_match = 0;
+
+ for (int c = a + 1; c <= max_base; c++)
+ {
+ if (found_match)
+ {
+ break;
+ }
+ for (int d = c + 1; d <= max_base; d++)
+ {
+ sum2 = (long long)c * c * c + (long long)d * d * d;
+ if (sum2 > sum1)
+ {
+ break;
+ }
+ if (sum1 == sum2)
+ {
+ count++;
+ printf("(%d.) %lld = %d^3 + %d^3 = %d^3 + %d^3\n", count, sum1, a, b, c, d);
+
+ found_match = 1;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ printf("-------------------------------\n");
+ printf("Search complete.");
+
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
+int main()
+{
+ int hour, temp;
+ printf("Time \tSuffix\n");
+ for (int hour = 0; hour <= 23; hour++)
+ {
+ if (hour == 0)
+ printf("12:00\tAM (Midnight)\n");
+ else if (hour == 12)
+ printf("12:00\tPM (Noon)\n");
+ else if (hour >= 1 && hour <= 11)
+ printf("%02d:00\tAM\n", hour);
+ else if (hour >= 13 && hour <= 23)
+ printf("%02d:00\tPM\n", 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 <stdio.h>
+int main()
+{
+ int starter = 1;
+ int tab = 3;
+ printf("The pattern : \n");
+ for (int i = 1; i <= 4; i++)
+ {
+ int count = 0;
+ for (int k = 1; k <= tab; k++)
+ {
+ printf(" ");
+ }
+ tab = tab - 1;
+ for (int j = starter; j <= 10; j++)
+ {
+ if (count >= i)
+ {
+ break;
+ }
+ printf("%d ", j);
+ count++;
+ starter++;
+ }
+ printf("\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">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 <stdio.h>
+
+int main()
+{
+ int studentClass, failedSubjectCount, graceMarks = 0;
+ printf("Class obtained by the student (Enter 1 for First Class, 2 for Second Class, 3 for Third Class): ");
+ scanf("%d", &studentClass);
+ printf("Failed Subject Count: ");
+ scanf("%d", &failedSubjectCount);
+
+ if (failedSubjectCount < 0) {
+ printf("\nFailed subject count cannot be negative.");
+ return 1;
+ }
+
+ switch (studentClass)
+ {
+ case 1:
+ if (failedSubjectCount <= 3)
+ {
+ graceMarks += 5 * failedSubjectCount;
+ }
+ break;
+
+ case 2:
+ if (failedSubjectCount <= 2)
+ {
+ graceMarks += 4 * failedSubjectCount;
+ }
+ break;
+
+ case 3:
+ if (failedSubjectCount <= 1)
+ {
+ graceMarks += 5 * failedSubjectCount;
+ }
+ break;
+
+ default:
+ printf("\nWrong Choice.");
+ return 1;
+ }
+
+ printf("\nStudent will get %d grace marks.", 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 <stdio.h>
+
+int leapYear(int);
+
+int leapYear(int year)
+{
+ if ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0)))
+ return 1;
+ else
+ return 0;
+}
+
+int main()
+{
+ int year;
+ printf("Enter the year : ");
+ scanf("%d", &year);
+ if (leapYear(year))
+ printf("\nYear %d is a Leap Year.", year);
+ else
+ printf("\nYear %d is not a Leap Year.", 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 <stdio.h>
+#include <math.h>
+
+void findPrimeFactors(int n)
+{
+ int temp_n = n;
+
+ if (temp_n == 1)
+ {
+ printf("Prime factors of %d are: None.\n", n);
+ return;
+ }
+
+ printf("Prime factors of %d are:", n);
+
+ while (temp_n % 2 == 0)
+ {
+ printf(" %d", 2);
+ temp_n = temp_n / 2;
+ }
+
+ for (int i = 3; i <= (int)sqrt(temp_n); i = i + 2)
+ {
+ while (temp_n % i == 0)
+ {
+ printf(" %d", i);
+ temp_n = temp_n / i;
+ }
+ }
+
+ if (temp_n > 2)
+ {
+ printf(" %d", temp_n);
+ }
+
+ printf("\n");
+}
+
+int main()
+{
+ int n;
+ printf("Enter a positive integer to get the prime factors: ");
+ if (scanf("%d", &n) != 1)
+ {
+ printf("Error: Invalid input. Please enter an integer.\n");
+ return 1;
+ }
+ if (n <= 0)
+ {
+ printf("Error: Please enter a POSITIVE integer.\n");
+ 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 <stdio.h>
+
+void circularShift(int *, int *, int *);
+
+int main()
+{
+ int x = 5, y = 8, z = 10;
+
+ printf("--- Before Shift ---\n");
+ printf("x: %d, y: %d, z: %d", x, y, z);
+
+ circularShift(&x, &y, &z);
+
+ printf("\n--- After Shift ---\n");
+ printf("x: %d, y: %d, z: %d", 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 <stdio.h>
+
+void convertWeight(double, double *, double *, double *);
+
+int main()
+{
+ double weightGram, weightPound, weightKG, weightTON;
+ printf("Enter the weight of the comodity in Kilogram(s): ");
+ scanf("%lf", &weightKG);
+
+ convertWeight(weightKG, &weightGram, &weightPound, &weightTON);
+ printf("\n%g Kilogram(s) = %.04f Gram(s)"
+ "\n%g Kilogram(s) = %.04f Pound(s)"
+ "\n%g Kilogram(s) = %.04f TON(s)",
+ 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 <stdio.h>
+#include <math.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+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("--- Compute the distance between two points ---\n\n");
+ printf("Enter the co-ordinates of Point 1 (Ex.: 5,6): ");
+ scanf("%lf,%lf", &x1, &y1);
+ printf("Enter the co-ordinates of Point 2 (Ex.: 3,4): ");
+ scanf("%lf,%lf", &x2, &y2);
+
+ distance(x1, y1, x2, y2, &result_Distance);
+ printf("\nDistance between P1(%g, %g) and P2(%g, %g) = %g",
+ 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("\n\n--- Compute the area of a triangle ABC ---\n\n");
+ printf("Enter the co-ordinates of Point A (Ex.: 5,6): ");
+ scanf("%lf,%lf", &x1, &y1);
+ printf("Enter the co-ordinates of Point B (Ex.: 3,4): ");
+ scanf("%lf,%lf", &x2, &y2);
+ printf("Enter the co-ordinates of Point C (Ex.: 6,7): ");
+ scanf("%lf,%lf", &x3, &y3);
+
+ area(x1, y1, x2, y2, x3, y3, &result_Area);
+ printf("\nArea of the A(%g, %g), B(%g, %g), C(%g, %g) = %g",
+ 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("\n\n--- Check if a test point P(x, y) lies strictly inside the triangle ABC ---\n\n");
+ printf("Do you wish to use previous entered triangle?"
+ "\nIf Yes, type 'Y'; If No, type 'N': ");
+ scanf(" %c", &choice);
+ choice = toupper(choice);
+ switch (choice)
+ {
+ case 'Y':
+ break;
+ case 'N':
+ printf("Enter the co-ordinates of Point A (Ex.: 5,6): ");
+ scanf("%lf,%lf", &x1, &y1);
+ printf("Enter the co-ordinates of Point B (Ex.: 3,4): ");
+ scanf("%lf,%lf", &x2, &y2);
+ printf("Enter the co-ordinates of Point C (Ex.: 6,7): ");
+ scanf("%lf,%lf", &x3, &y3);
+ break;
+ default:
+ printf("\nYou entered invalid choice.");
+ break;
+ }
+ printf("Enter the co-ordinates of Test Point (Ex.: 3,5): ");
+ scanf("%lf,%lf", &x, &y);
+
+ if (is_inside(x, y, x1, y1, x2, y2, x3, y3))
+ printf("\nTest Point (%g, %g) is inside ABC.", x, y);
+ else
+ printf("\nTest Point (%g, %g) is not inside ABC.", 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, &ab);
+ distance(x2, y2, x3, y3, &bc);
+ distance(x1, y1, x3, y3, &ac);
+
+ s = (ab + bc + ac) / 2.0;
+ double area_sq = s * (s - ab) * (s - bc) * (s - ac);
+
+ if (area_sq < 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, &area_ABC);
+ area(x, y, x1, y1, x2, y2, &area_PAB);
+ area(x, y, x2, y2, x3, y3, &area_PBC);
+ area(x, y, x1, y1, x3, y3, &area_PAC);
+
+ double sum_of_sub_areas = area_PAB + area_PBC + area_PAC;
+
+ if (fabs(area_ABC - sum_of_sub_areas) < EPSILON)
+ return 1;
+ else
+ return 0;
+}
+
+/*
+ *************** SAMPLE OUTPUT ***************
+
+PS G:\bsc\letusc> ./*.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 'Y'; If No, type 'N': 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 <stdio.h>
+int main()
+{
+ int n, nonotes, temp;
+ printf("Enter the amount : ");
+ scanf("%d", &n);
+ if (n < 1)
+ {
+ printf("\nAmount should be a positive integer.");
+ 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("\nthe smallest number of notes that will combine to give Rs. %d : %d", 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
+&& and || . */
+/* Author - Amit Dutta, Date - 02th OCT, 2025 */
+/* Let Us C, Chap - 4, Page - 64, Problem 4.1 */
+
+#include <stdio.h>
+int main()
+{
+ int year;
+ printf("Enter year : ");
+ scanf("%d", &year);
+ if (year % 4 == 0 && year & 100 != 0 || year % 400 == 0)
+ printf("\nYear %d is a leapyear.", year);
+ else
+ printf("\nYear %d is not a leapyear.", 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 <stdio.h>
+int main()
+{
+ char inp;
+ printf("Enter one character : ");
+ scanf(" %c", &inp);
+ if (inp >= 64 && inp <= 90)
+ printf("\nInput '%c' is a CAPITAL LETTER.", inp);
+ if (inp >= 97 && inp <= 122)
+ printf("\nInput '%c' is a SMALL CASE LETTER.", inp);
+ if (inp >= 48 && inp <= 57)
+ printf("\nInput '%c' is a DIGIT.", inp);
+ if (inp >= 0 && inp <= 47 || inp >= 58 && inp <= 64
+ || inp >= 91 && inp <= 96 || inp >= 123 && inp <= 127)
+ printf("\nInput '%c' is a SPECIAL SYMBOL.", 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 <stdio.h>
+int main()
+{
+ double side1, side2, side3;
+ printf("Enter the length of side1, side2 and side3 of the triangle : ");
+ scanf("%lf %lf %lf", &side1, &side2, &side3);
+ if (side1 <= 0 || side2 <= 0 || side3 <= 0)
+ {
+ printf("\nTriangle sides must be positive.\n");
+ return 1;
+ }
+ if ((side1 + side2 > side3) && (side1 + side3 > side2) && (side2 + side3 > side1))
+ // Triangle Inequality Theorem
+ printf("\nThis triangle is valid.");
+ else
+ printf("\nThis triangle is not valid.");
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
+#include <conio.h>
+int main()
+{
+ int working_hour, i = 1;
+ double pay;
+ while (i <= 10)
+ {
+ printf("Enter the working hour for the employee no. %d : ", i);
+ if (scanf("%d", &working_hour) != 1)
+ {
+ printf("\n\tPlease enter a number as woking hour.\n\n");
+ while (getchar() != '\n')
+ ;
+ // above line discard the input characters untill getchar() reaches the new line character.
+ /* if I do not discard the input, after 'continue;' 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 > 40)
+ {
+ pay = (working_hour - 40) * 120.00;
+ printf("\n\tOvertime working hours of Employee %d : %d", i, (working_hour - 40));
+ printf("\n\tPay of the overtime for Employee %d : Rs. %.2f\n\n", i, pay);
+ }
+ else
+ printf("\n\tEmployee %d did not work any overtime.\n\n", 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 <stdio.h>
+int main()
+{
+ int num, i = 1;
+ long long fact = 1;
+ printf("Enter the number : ");
+ // checking if the input is valid or not
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nPlease enter a number.");
+ return 1;
+ }
+ // result for the negetive input
+ if (num < 0)
+ {
+ printf("\nFactorial of %d : Undefined", num);
+ return 1;
+ }
+ // Hard codded result for input '0' (zero)
+ if (num == 0)
+ {
+ printf("\nFactorial of 0 : 1");
+ return 0;
+ }
+ // calculating result
+ while (i <= num) {
+ fact = fact * i;
+ i++;
+ }
+ printf("\nFactorial of %d : %d", 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 <stdio.h>
+int main()
+{
+ double num, result;
+ int power, i = 1;
+ printf("Enter the numbers in 'num^power' format : ");
+ // checking if the input is valid or not
+ if (scanf("%lf^%d", &num, &power) != 2)
+ {
+ printf("\nPlease enter numbers.");
+ return 1;
+ }
+ // result for the negetive input
+ if (power < 0)
+ {
+ printf("\nPlease use a positive number as power.");
+ return 1;
+ }
+ // Hard codded result for input '0' (zero)
+ if (power == 0)
+ {
+ printf("\n%g to the power of %d is : 1", num, power);
+ return 0;
+ }
+ result = num;
+ while (i <= power - 1)
+ {
+ result = result * num;
+ i++;
+ }
+ printf("\n%g to the power of %d is : %g", 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 <stdio.h>
+#include <math.h>
+#include <stdbool.h>
+
+#define LIMIT 300
+
+int main()
+{
+ printf("Prime numbers from 1 to 300 : 2"); // as 2 is the only even prime number
+ for (int i = 3; i <= LIMIT; i += 2) // skipping all other even number
+ {
+ int n = (int)sqrt(i);
+ bool prime = true;
+
+ for (int j = 3; j <= 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(" %d", 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 <stdio.h>
+#define N 7 // update N here
+
+int main()
+{
+ double sum = 0; int fact = 1;
+ for (int i = 1; i <= N; i++)
+ {
+ fact *= i;
+ sum += (double)i / fact;
+ }
+ printf("Sum of the series : %g", 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 <stdio.h>
+
+// --- 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(" %d", 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 <= 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("Combination of 1, 2 and 3 (1-digit up to 4-digits):\n");
+
+ /* 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 <= 4; noOfDigits++)
+ {
+ printf("\n\n--- %d-DIGIT NUMBERS (%d total) ---\n", noOfDigits, (1 << 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("\n\nTotal permutations generated: 120\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">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 <stdio.h>
+
+int main()
+{
+ printf("Combination of 1, 2 and 3 :");
+
+ // for 1 digit numbers
+ for (int i = 1; i <= 3; i++)
+ {
+ printf(" %d", i);
+ }
+
+ // for 2 digit numbers
+ for (int i = 1; i <= 3; i++)
+ {
+ for (int j = 1; j <= 3; j++)
+ {
+ printf(" %d%d", i, j);
+ }
+ }
+
+ // for 3 digit numbers
+ for (int i = 1; i <= 3; i++)
+ {
+ for (int j = 1; j <= 3; j++)
+ {
+ for (int k = 1; k <= 3; k++)
+ {
+ printf(" %d%d%d", i, j, k);
+ }
+ }
+ }
+
+ // for 4 digit numbers
+ for (int i = 1; i <= 3; i++)
+ {
+ for (int j = 1; j <= 3; j++)
+ {
+ for (int k = 1; k <= 3; k++)
+ {
+ for (int l = 1; l <= 3; l++)
+ {
+ printf(" %d%d%d%d", 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 'Exit' option the program should continue work.
+*/
+/* Author - Amit Dutta, Date - 26th OCT, 2025 */
+/* Let Us C, Chap - 7, Page - 118, Problem 7.1 */
+
+#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
+#include <stdbool.h>
+
+// Function to clear the input buffer after scanf to prevent issues in the next input.
+void clearInputBuffer()
+{
+ int c;
+ while ((c = getchar()) != '\n' && c != EOF)
+ ;
+}
+
+// Calculates the factorial of the input number.
+void factorial(int num)
+{
+ // Factorial is not defined for negative numbers.
+ if (num < 0)
+ {
+ printf("\nFactorial is not defined for negative numbers.");
+ return;
+ }
+ // Checks for input over 20 to prevent long long integer overflow (20! is max safe).
+ if (num > 20)
+ {
+ printf("\nFactorial of %d is too large to calculate (max safe integer factorial is 20!).", num);
+ return;
+ }
+ long long fact = 1;
+ // Calculate factorial iteratively.
+ for (int i = 1; i <= num; i++)
+ {
+ fact *= i;
+ }
+ printf("\nFactorial of %d = %lld", 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("\nInput 1 is NOT a PRIME NUMBER.");
+ return;
+ }
+ else if (num == 2)
+ {
+ printf("\nInput 2 is a PRIME NUMBER. (Fact : 2 is only even prime number)");
+ return;
+ }
+ // Exclude all other even numbers.
+ if (num % 2 == 0)
+ {
+ printf("\nInput %d is NOT a PRIME NUMBER.", 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 <= endCheckDigit; i += 2)
+ {
+ if (num % i == 0)
+ {
+ printf("\nInput %d is NOT a PRIME NUMBER.", num);
+ isPrime = false;
+ break;
+ }
+ }
+ if (isPrime)
+ {
+ printf("\nInput %d is a PRIME NUMBER.", 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("\nInput %d is a EVEN NUMBER.", num);
+ return;
+ }
+ else
+ {
+ printf("\nInput %d is a ODD NUMBER.", 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 'Exit' is chosen.
+ while (1)
+ {
+ // Display menu options.
+ printf("\n\n===== MENU ====="
+ "\n1. Factorial of a number"
+ "\n2. Prime or not"
+ "\n3. Odd or Even"
+ "\n4. Exit");
+ printf("\nEnter your choice : ");
+
+ // Input validation for menu choice.
+ if (scanf("%d", &choice) != 1)
+ {
+ printf("\nPlease enter a number.");
+ clearInputBuffer();
+ continue;
+ }
+ clearInputBuffer();
+
+ // Handle menu selection using switch-case.
+ switch (choice)
+ {
+ case 1:
+ printf("\n=== FACTORIAL OF A NUMBER ===");
+ printf("\nEnter the number : ");
+ // Input validation for the number to be factored.
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nPlease enter a number.");
+ clearInputBuffer();
+ continue;
+ }
+ clearInputBuffer();
+ factorial(num);
+ break;
+ case 2:
+ printf("\n=== PRIME OR NOT ===");
+ printf("\nEnter the number : ");
+ // Input validation for the number to be checked.
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nPlease enter a number.");
+ clearInputBuffer();
+ continue;
+ }
+ clearInputBuffer();
+ // Require a non-negative, non-zero number for prime check.
+ if (num < 0)
+ {
+ printf("\nPlease enter a postive number.");
+ continue;
+ }
+ else if (num == 0)
+ {
+ printf("\nPlease enter a non-zero number.");
+ continue;
+ }
+ prime(num);
+ break;
+ case 3:
+ printf("\n=== ODD OR EVEN ===");
+ printf("\nEnter the number : ");
+ // Input validation for the number to be checked.
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nPlease enter a number.");
+ clearInputBuffer();
+ continue;
+ }
+ clearInputBuffer();
+ oddoreven(num);
+ break;
+ case 4:
+ // Exit the program cleanly.
+ printf("\nExiting the program.\n\nSAYONARA...\n\n");
+ exit(0);
+ default:
+ // Handle invalid menu choice input.
+ printf("\nPlease enter a valid choice.");
+ 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 <stdio.h>
+
+double power(double, int);
+
+double power(double a, int b)
+{
+ if (b == 0)
+ return 1;
+ double res = 1;
+ int i;
+ if (b > 0)
+ for (i = 1; i <= b; i++)
+ res *= a;
+ return res;
+}
+
+int main()
+{
+ double a, result;
+ int b;
+ printf("Enter the value and the power (Format A^B) : ");
+ scanf("%lf^%d", &a, &b);
+ result = power(a, b);
+ printf("Result of %g^%d = %g", 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 <stdio.h>
+
+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[] = {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"};
+ // including the two-character subtractive pairs.
+ int i = 0;
+
+ printf("Year %d = ", year);
+ while (year > 0)
+ {
+ if (year >= values[i])
+ {
+ printf("%s", romanChar[i]);
+ year -= values[i];
+ }
+ else
+ i++;
+ }
+}
+
+int main()
+{
+ int year;
+ printf("Enter the year : ");
+ scanf("%d", &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 <stdio.h>
+#include <math.h>
+
+void stats(double *, double *, double *);
+
+int main()
+{
+ double sum, average, standardDeviation;
+ stats(&sum, &average, &standardDeviation);
+
+ printf("\n--- Stats ---"
+ "\nSum: %g"
+ "\nAverage: %g"
+ "\nStandard Deviation: %g",
+ sum, average, standardDeviation);
+ return 0;
+}
+
+void stats(double *sum, double *average, double *standardDeviation)
+{
+ int n;
+ printf("How many numbers you want to give input: ");
+ scanf("%d", &n);
+
+ double inputNumber[n];
+ int i;
+
+ printf("\n--- Enter Numbers ---\n");
+ for (i = 0; i < n; i++)
+ {
+ printf("Enter number %d: ", i + 1);
+ scanf("%lf", &inputNumber[i]);
+ }
+
+ double tempSum = 0;
+ for (i = 0; i < n; i++)
+ tempSum += inputNumber[i];
+
+ double tempAverage = tempSum / n;
+
+ double tempStandardDeviation = 0.0;
+
+ if (n > 1)
+ {
+ double tempSumation = 0;
+ for (i = 0; i < 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 <stdio.h>
+#include <math.h>
+
+// Function prototype: Using pointers for 'call by reference' 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(&sum, &average, &standardDeviation);
+
+ printf("\n--- Stats ---"
+ "\nSum: %g"
+ "\nAverage: %g"
+ "\nStandard Deviation: %g",
+ 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("How many numbers you want to give input: ");
+
+ if (scanf("%d", &n) == 1)
+ {
+ break;
+ }
+ else
+ {
+ printf("\nPlease enter a valid number.\n");
+ // Clearing input buffer to handle invalid input
+ while (getchar() != '\n' && !feof(stdin))
+ ;
+ }
+ } while (1);
+
+ // Variable-Length Array (VLA) to store the input numbers.
+ double inputNumber[n];
+ int i = 0;
+
+ printf("\n--- Enter Numbers ---\n");
+
+ // Input Loop for numbers
+ while (i < n)
+ {
+ printf("Enter number %d: ", i + 1);
+
+ if (scanf("%lf", &inputNumber[i]) == 1)
+ {
+ // Clearing input buffer after successful read
+ while (getchar() != '\n')
+ ;
+ i++;
+ }
+ else
+ {
+ printf("Invalid input. Only integers are allowed. Please try again.\n");
+ // Clearing input buffer to handle invalid input
+ while (getchar() != '\n' && !feof(stdin))
+ ;
+ }
+ }
+
+ // 1. Sum Calculation
+ double tempSum = 0;
+ for (i = 0; i < 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 > 1)
+ {
+ double tempSumation = 0;
+ // calculating the sum of squared differences from the mean
+ for (i = 0; i < 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 <stdio.h>
+
+void bothPowerFactorial(double, int, int, double *, long long *);
+
+int main()
+{
+ double a, resultPower;
+ int b, factN;
+ long long resultFactorial;
+ printf("Enter a and b for calculating a raised to b: ");
+ scanf("%lf %d", &a, &b);
+ printf("Enter number to calculate the factorial: ");
+ scanf("%d", &factN);
+ if (b < 0 || factN < 0)
+ {
+ printf("\nOnly non-negative integer is allowed as input of b and factorial.");
+ return 1;
+ }
+ bothPowerFactorial(a, b, factN, &resultPower, &resultFactorial);
+ printf("\n%g Raised to %d: %g"
+ "\nFactorial of %d: %lld",
+ 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 <= b; i++)
+ tempResultPower *= a;
+
+ for (i = 1; i <= 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 <stdio.h>
+
+int main()
+{
+ float a = 3.14;
+ float *c = &a;
+ float **b = &c;
+
+ printf("Location 1 (Variable a):\n");
+ printf("Value: %g\n", a);
+ printf("Address: %p\n", (void *)&a);
+ printf("------------------------------\n");
+
+ printf("Location 3 (Variable c: float *):\n");
+ printf("Value (Address stored): %p\n", (void *)c);
+ printf("Address of c itself: %p\n", (void *)&c);
+ printf("Value pointed to (*c): %g\n", *c);
+ printf("------------------------------\n");
+
+ printf("Location 2 (Variable b: float **):\n");
+ printf("Value (Address stored): %p\n", (void *)b);
+ printf("Address of b itself: %p\n", (void *)&b);
+ printf("Value pointed to (*b): %p\n", (void *)*b);
+ printf("Value pointed to (**b): %g\n", **b);
+ printf("------------------------------\n");
+
+ 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 <stdio.h>
+int main()
+{
+ int i, j, num;
+ printf("Enter n : ");
+ scanf("%d", &num);
+ for (i = 1; i <= num; i++)
+ {
+ for (j = 1; j <= i; j++)
+ {
+ printf("%d\t", j);
+ }
+ printf("\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">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 <stdio.h>
+int main()
+{
+ int i, j, n, temp = 1;
+ printf("Enter n : ");
+ scanf("%d", &n);
+ for (i = n; i >= 1; i--)
+ {
+ for (j = 1; j <= i; j++)
+ {
+ printf("%d\t", temp);
+ temp++;
+ }
+ printf("\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">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 <stdio.h>
+int main()
+{
+ int i, j, n;
+ printf("Enter n : ");
+ scanf("%d", &n);
+ for (i = 1; i <= n; i++)
+ {
+ for (j = 1; j <= i; j++)
+ {
+ printf("%d\t", i * j);
+ }
+ printf("\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">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 <stdio.h>
+int main()
+{
+ int i, j, k, n;
+ printf("Enter n : ");
+ scanf("%d", &n);
+ for (i = n; i >= 1; i--)
+ {
+ for (j = 1; j <= i - 1; j++)
+ {
+ printf("\t");
+ }
+ for (k = i; k >= 1; k--)
+ {
+ printf("%d\t", k);
+ }
+ printf("\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">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 <stdio.h>
+int main()
+{
+ int i, j, n;
+ long long temp1 = 0, temp2 = 1, temp3;
+ printf("Enter n : ");
+ scanf("%d", &n);
+ printf("1\n");
+ for (i = 2; i <= n; i++)
+ {
+ for (j = 1; j <= i; j++)
+ {
+ temp3 = temp1 + temp2;
+ printf("%lld\t", temp3);
+ temp1 = temp2;
+ temp2 = temp3;
+ }
+ printf("\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">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 <stdio.h>
+#include <math.h>
+
+int main()
+{
+ int num, i, temp;
+ printf("Enter the number : ");
+ if(scanf("%d", &num) != 1) {
+ printf("Only postive number allowed.");
+ return 1;
+ }
+ if(num <= 0) {
+ printf("\nOnly potive number are allowed.");
+ return 1;
+ }
+ if(num == 1) {
+ printf("\nInput 1 is not a prime number.");
+ return 0;
+ }
+ if(num == 2) {
+ printf("\nInput 2 is a prime number.");
+ return 0;
+ }
+ if(num % 2 == 0) {
+ printf("\nInput %d is not a prime number.", num);
+ return 0;
+ }
+ temp = (int)sqrt(num);
+ for (i = 3; i <= temp; i += 2)
+ {
+ if (num % i == 0)
+ {
+ printf("\nInput %d is not a prime number.", num);
+ return 0;
+ }
+ }
+ printf("\nInput %d is a prime number.", 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 <stdio.h>
+
+int main()
+{
+ int num, temp1, armstrongCheck = 0;
+ printf("Enter a three digit number : ");
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nOnly positive number allowed.");
+ return 1;
+ }
+ if (num < 100 || num > 999)
+ {
+ printf("\nOnly Three digit postive number allowed.");
+ return 1;
+ }
+ temp1 = num;
+ while (temp1 > 0)
+ {
+ armstrongCheck += (temp1 % 10) * (temp1 % 10) * (temp1 % 10);
+ temp1 /= 10;
+ }
+ if (armstrongCheck == num)
+ printf("\nInput %d is a armstrong number.", num);
+ else
+ printf("\nInput %d is not a armstrong number.", 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 <stdio.h>
+
+int main()
+{
+ int n, i;
+ long long fact = 1;
+ printf("Enter n : ");
+ if (scanf("%d", &n) != 1)
+ {
+ printf("\nOnly non-negative number allowed.");
+ return 1;
+ }
+ if (n < 0)
+ {
+ printf("\nOnly non-negative number allowed.");
+ return 1;
+ }
+ if (n == 0)
+ {
+ printf("\nFactorial of 0 : 1");
+ return 0;
+ }
+ for (i = 1; i <= n; i++)
+ fact *= i;
+ printf("\nFactorial of %d : %lld", 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 <stdio.h>
+int main()
+{
+ int num, sumOfDigit = 0, temp;
+ printf("Enter the number : ");
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nOnly a number is allowed.");
+ return 1;
+ }
+ temp = num;
+ while (temp > 0)
+ {
+ sumOfDigit += temp % 10;
+ temp /= 10;
+ }
+ printf("\nSum of the digit %d : %d", 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 <stdio.h>
+int main()
+{
+ int num, temp, rev = 0;
+ printf("\nEnter the number : ");
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nOnly a number is allowed.");
+ return 1;
+ }
+ temp = num;
+ while (temp > 0)
+ {
+ rev = (rev * 10) + (temp % 10);
+ temp /= 10;
+ }
+ printf("\nReverse of the number %d : %d", 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 <stdio.h>
+#define true 1
+#define false 0
+
+int isPalindrome(int num)
+{
+ int temp = num, numRev = 0;
+ while (temp > 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("Enter the Lower Bound and Upper Bound : ");
+ if (scanf("%d %d", &lBound, &uBound) != 2)
+ {
+ printf("\nOnly Integer values are allowed.");
+ return 1;
+ }
+ if (lBound < 0 || uBound < 0 || lBound > uBound)
+ {
+ printf("\nPlease enter appropriate inforamtion.");
+ return 1;
+ }
+ printf("Palindrome Numbers from %d to %d :", lBound, uBound);
+ for (num = lBound; num <= uBound; num++)
+ {
+ if (isPalindrome(num))
+ {
+ printf(" %d", num);
+ palindromeCount++;
+ }
+ }
+ printf("\nTotal Palindrome number found inside the range (%d to %d) : %d", 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<stdio.h>
+int main() {
+ double length, breadth, area, perimeter;
+ printf("Enter the length and breadth of the Rectangle : ");
+ scanf("%lf %lf", &length, &breadth);
+ area = length * breadth;
+ perimeter = 2 * (length + breadth);
+ printf("\nArea of the Rectangle : %g"
+ "\nPerimeter of the Rectangle : %g", 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ double r, area;
+ printf("Enter the radius of the circle : ");
+ scanf("%lf", &r);
+ area = M_PI * pow(r, 2);
+ printf("\nArea of the circle : %g", 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ double dia, side, area, peri;
+ printf("Enter the diagonal of the square : ");
+ scanf("%lf", &dia);
+ side = dia / sqrt(2);
+ area = pow(side, 2);
+ peri = 4 * side;
+ printf("\nArea of the square : %g"
+ "\nPerimeter of the square : %g",
+ 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ double r, area;
+ printf("Enter the area of the circle : ");
+ scanf("%lf", &area);
+ r = sqrt(area / M_PI);
+ printf("\nRadius of the circle : %g", 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 <stdio.h>
+int main()
+{
+ int days, months, years, temp;
+ printf("Enter the No. of days : ");
+ scanf("%d", &days);
+ temp = days;
+ years = days / 365;
+ days = days % 365;
+ months = days / 30;
+ days = days % 30;
+ printf("%d Days = %d Years, %d Months, %d Days", 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 <stdio.h>
+int main()
+{
+ int sec, hours, minutes, temp;
+ printf("Enter the no of seconds : ");
+ scanf("%d", &sec);
+ temp = sec;
+ hours = sec / 3600;
+ sec = sec % 3600;
+ minutes = sec / 60;
+ sec = sec % 60;
+ printf("\n%d Seconds = %d Hours, %d Minutes, %d Seconds.", 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 <stdio.h>
+int main()
+{
+ double bs, gs, ns, da, hra, pf;
+ printf("Enter the basic salary of the employee : ");
+ scanf("%lf", &bs);
+ da = bs * 0.25;
+ hra = bs * 0.125;
+ pf = bs * 0.10;
+ gs = bs + da + hra;
+ ns = gs - pf;
+ printf("\nGross Salary : %g"
+ "\nNet Salary : %g",
+ 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 <stdio.h>
+int main()
+{
+ int num, multi, div;
+ printf("Enter the number : ");
+ scanf("%d", &num);
+ multi = num << 2;
+ div = num >> 2;
+ printf("Multiplication : %d"
+ "\nDivision : %d",
+ 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 <stdio.h>
+int main()
+{
+ int a = 4, b = 6;
+ printf("Before swap : A = %d and B = %d", a, b);
+ a = a ^ b;
+ b = a ^ b;
+ a = a ^ b;
+ printf("\nAfter swap : A = %d and B = %d", 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ double a, b, c, result;
+ printf("Enter the value for a, b and c : ");
+ scanf("%lf %lf %lf", &a, &b, &c);
+ result = (1 / pow(a, 3)) + (1 / pow((b + 2), 3)) + (1 / (pow(c, 4) + sqrt(2)));
+ printf("\nResult = %g", 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 <stdio.h>
+#include <math.h>
+
+int main()
+{
+ int num, temp;
+ printf("Enter the number : ");
+ scanf("%d", &num);
+ if (num < 0)
+ {
+ printf("\nYou entered a negetive number.");
+ return 1;
+ }
+ temp = (int)sqrt(num);
+ if (temp * temp == num)
+ {
+ printf("\nInput %d is a perfect square number.", num);
+ return 0;
+ }
+ else
+ printf("\nInput %d is not a perfect square number.", 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 <stdio.h>
+
+int main()
+{
+ int a, b, c, secondLargest;
+ printf("Enter three number : ");
+ scanf("%d %d %d", &a, &b, &c);
+ if ((a < b && a > c) || (a > b && a < c))
+ secondLargest = a;
+ if ((b < a && b > c) || (b > a && b < c))
+ secondLargest = b;
+ if ((c < b && c > a) || (c > b && c < a))
+ secondLargest = c;
+ printf("\nSecond Largest : %d", 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
+('s' for simple interes, 'c' for compound interest), then calculate and display the earned interest */
+/* Author - Amit Dutta, Date - 31st October, 2025 */
+
+#include <stdio.h>
+#include <math.h>
+#include <ctype.h>
+
+int main()
+{
+ double p, t, r, si, ci;
+ char mode;
+ printf("Enter the Principle, Time (Year) and the Rate of Interest : ");
+ scanf("%lf %lf %lf", &p, &t, &r);
+ printf("Enter the mode of calculation ('s' for simple interest, 'c' for compound interest) : ");
+ scanf(" %c", &mode);
+ mode = tolower(mode);
+ switch (mode)
+ {
+ case 's':
+ si = (p * t * r) / 100;
+ printf("\nSimple Interest : %g", si);
+ return 0;
+ case 'c':
+ ci = (p * pow(1 + (r / 100), t)) - p;
+ printf("\nCompound Interest : %g", ci);
+ return 0;
+ default:
+ printf("\nYou entered a wrong choice.");
+ 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
+ =========== ================
+ <= 180 5.57 %
+ 181 - 364 7.75 %
+ 365 - 500 9.25 %
+ > 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 <stdio.h>
+
+int main()
+{
+ double p, t, r, si;
+ int days;
+ printf("Enter the Principle, Time (Days) : ");
+ scanf("%lf %d", &p, &days);
+ if (days > 0 && days <= 180)
+ r = 5.57;
+ else if (days > 180 && days <= 364)
+ r = 7.75;
+ else if (days > 364 && days <= 500)
+ r = 9.25;
+ else if (days > 500)
+ r = 9.15;
+ si = (p * t * r) / 100;
+ printf("\nMaturity Amount : %d", 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 <stdio.h>
+
+int main()
+{
+ int lb, ub, i;
+ printf("Enter the lb, ub : ");
+ scanf("%d %d", &lb, &ub);
+ printf("\nEnds with 7 :");
+ for (i = lb; i <= ub; i++)
+ {
+ if (i % 10 == 7)
+ {
+ printf(" %d", i);
+ }
+ }
+ printf("\nDivisible by 7 :");
+ for (i = lb; i <= ub; i++)
+ {
+ if (i % 7 == 0)
+ {
+ printf(" %d", 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 <stdio.h>
+
+int main()
+{
+ int num, temp, rev = 0;
+ printf("Enter the number : ");
+ scanf("%d", &num);
+ temp = num;
+ while (temp > 0)
+ {
+ rev = (rev * 10) + (temp % 10);
+ temp /= 10;
+ }
+ if (rev == num)
+ printf("\nInput %d is a palindrome number.", num);
+ else
+ printf("\nInput %d is not a palindrome number.", 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 <stdio.h>
+
+int main()
+{
+ int num, i, divisibleSum = 0;
+ printf("Enter a number : ");
+ scanf("%d", &num);
+ for (i = 1; i <= num / 2; i++)
+ {
+ if (num % i == 0)
+ {
+ divisibleSum += i;
+ }
+ }
+ if (divisibleSum == num)
+ printf("\nInput %d ia a Perfect Number.", num);
+ else
+ printf("\nInput %d is NOT a Perfect Number.", 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 <stdio.h>
+#include <math.h>
+
+int main()
+{
+ int num, square, count = 0, temp, modNum;
+ printf("Enter the number : ");
+ scanf("%d", &num);
+ square = (int)pow(num, 2);
+ temp = num;
+ while (temp > 0)
+ {
+ temp /= 10;
+ count++;
+ }
+ modNum = (int)pow(10, count);
+ temp = square % modNum;
+ if (num == temp)
+ printf("\nInput %d is a Automorphic Number.", num);
+ else
+ printf("\nInput %d is a Automorphic Number.", 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 <stdio.h>
+
+int main()
+{
+ int a, b, temp, temp_a, temp_b;
+ printf("Enter the a and b : ");
+ scanf("%d %d", &a, &b);
+ temp_a = a, temp_b = b;
+ while (b > 0)
+ {
+ temp = a;
+ a = b;
+ b = temp % b;
+ }
+ printf("\nHCF of %d and %d is : %d\n", 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 <stdio.h>
+
+int main()
+{
+ int a, b, temp, temp_a, temp_b;
+ printf("Enter the a and b : ");
+ scanf("%d %d", &a, &b);
+ temp_a = a, temp_b = b;
+ while (b > 0)
+ {
+ temp = a;
+ a = b;
+ b = temp % b;
+ }
+ if (a == 1)
+ printf("\n%d and %d is co-prime\n", temp_a, temp_b);
+ else
+ printf("\n%d and %d is NOT co-prime\n", 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 <stdio.h>
+
+int main()
+{
+ int num, temp, sumOfDigit = 0, productOfDigit = 1;
+ printf("Enter the number to check if it is a special number : ");
+ scanf("%d", &num);
+ temp = num;
+ while (temp > 0)
+ {
+ sumOfDigit += temp % 10;
+ productOfDigit *= temp % 10;
+ temp /= 10;
+ }
+ temp = sumOfDigit + productOfDigit;
+ if (num == temp)
+ printf("\nInput %d is a special number.", num);
+ else
+ printf("\nInput %d is not a special number.", 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 <stdio.h>
+#include <math.h>
+#include <stdbool.h>
+
+bool checkPrime(int num)
+{
+ if (num < 2)
+ return false;
+ if (num == 2)
+ return true;
+ if (num % 2 == 0)
+ return false;
+ int limit = (int)sqrt(num);
+ for (int i = 3; i <= limit; i += 2)
+ if (num % i == 0)
+ return false;
+ return true;
+}
+
+int reverseNumber(int num)
+{
+ int reverse = 0;
+ while (num > 0)
+ {
+ reverse = (reverse * 10) + (num % 10);
+ num /= 10;
+ }
+ return reverse;
+}
+
+int main()
+{
+ int num;
+ printf("Enter the number : ");
+ scanf("%d", &num);
+ if (!checkPrime(num))
+ {
+ printf("\nInput %d is not a prime number.", num);
+ return 0;
+ }
+ if (checkPrime(reverseNumber(num)))
+ printf("\nInput %d is a twisted prime number.", num);
+ else
+ printf("\nInput %d is not a twisted prime number.", 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 <stdio.h>
+#include <stdbool.h>
+
+int main()
+{
+ int n, i, temp = 1;
+ bool isNegative = true;
+ printf("Enter the n : ");
+ scanf("%d", &n);
+ printf("\nPattern A :");
+ for (i = 1; i <= n; i++)
+ {
+ if (!isNegative)
+ {
+ printf(" %d", temp * -1);
+ isNegative = true;
+ }
+ else
+ {
+ printf(" %d", temp);
+ isNegative = false;
+ }
+ temp += 2;
+ }
+ printf("\nPattern B :");
+ for (i = 1; i <= n; i++)
+ {
+ temp = (i * i) - 1;
+ printf(" %d", 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<stdio.h>
+int main() {
+ int n, i, j;
+ printf("Enter the n : ");
+ scanf("%d", &n);
+ for(i = 1; i <= n; i++) {
+ for(j = i; j >= 1; j--) {
+ printf("%d ", j);
+ }
+ printf("\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-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<stdio.h>
+int main() {
+ int n, i, j;
+ printf("Enter the n : ");
+ scanf("%d", &n);
+ for(i = 1; i <= n; i++) {
+ for(j = n; j >= i; j--) {
+ printf("%d ", j);
+ }
+ printf("\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-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<stdio.h>
+int main() {
+ int n, i, j;
+ printf("Enter the n : ");
+ scanf("%d", &n);
+ for(i = n; i >= 1; i--) {
+ for(j = n; j >= i; j--) {
+ printf("%d ", j);
+ }
+ printf("\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-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<stdio.h>
+int main() {
+ int n, i, j;
+ printf("Enter the n : ");
+ scanf("%d", &n);
+ for(i = 1; i <= n; i++) {
+ for(j = i; j <= n; j++) {
+ printf("%d ", j);
+ }
+ printf("\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-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<stdio.h>
+int main() {
+ int n, i, j, temp = 1;
+ printf("Enter the n : ");
+ scanf("%d", &n);
+ for(i = 1; i <= n; i++) {
+ for(j = 1; j <= i; j++) {
+ printf("%d\t", temp);
+ temp++;
+ }
+ printf("\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-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<stdio.h>
+int main() {
+ int n, i, j;
+ printf("Enter the n : ");
+ scanf("%d", &n);
+ for(i = 1; i <= n; i++) {
+ for(j = 1; j <= i; j++) {
+ if(j % 2 == 0) printf("0 ");
+ else printf("1 ");
+ }
+ printf("\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-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<stdio.h>
+int main() {
+ int n, i, j;
+ printf("Enter the n : ");
+ scanf("%d", &n);
+ for(i = 1; i <= n; i++) {
+ for(j = 1; j <= i; j++) {
+ if(i % 2 == 0) printf("@ ");
+ else printf("# ");
+ }
+ printf("\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-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<stdio.h>
+int main() {
+ int n, i, j, temp = 1;
+ printf("Enter the n : ");
+ scanf("%d", &n);
+ for(i = n; i >= 1; i--) {
+ for(j = 1; j <= i; j++) {
+ printf("%d\t", temp);
+ temp++;
+ }
+ printf("\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-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<stdio.h>
+int main() {
+ int n, i, j; char temp = 'A';
+ printf("Enter the n : ");
+ scanf("%d", &n);
+ for(i = 1; i <= n; i++) {
+ for(j = 1; j <= i; j++) {
+ printf("%c\t", temp);
+ }
+ temp++;
+ printf("\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-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 <stdio.h>
+
+int factorial(int);
+
+int factorial(int n)
+{
+ int i, fact = 1;
+ for (i = 1; i <= n; i++)
+ fact *= i;
+ return fact;
+}
+
+int main()
+{
+ int n, temp;
+ printf("Enter the number: ");
+ scanf("%d", &n);
+ if (n < 0)
+ {
+ printf("Only non-negetive number is allowed.");
+ return 1;
+ }
+ temp = n;
+ while (temp > 0)
+ {
+ printf("\nFactorial of %d: %d", 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 <stdio.h>
+#include <math.h>
+
+int isPrime(int);
+
+int isPrime(int n)
+{
+ if (n <= 1)
+ return 0;
+ if (n == 2)
+ return 1;
+ if (n % 2 == 0)
+ return 0;
+ int temp = (int)sqrt(n), i;
+ for (i = 3; i <= temp; i += 2)
+ if (n % i == 0)
+ return 0;
+ return 1;
+}
+
+int main()
+{
+ int lb, ub, i;
+ printf("Enter the lower bound and the upper bound: ");
+ scanf("%d %d", &lb, &ub);
+ printf("\nPrime numbers between %d and %d: ", lb, ub);
+ for (i = lb; i <= ub; i++)
+ if (isPrime(i))
+ printf("%d ", 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 <stdio.h>
+
+int palindromeCheck(int);
+
+int palindromeCheck(int n)
+{
+ int temp = n, rev = 0;
+ while (temp > 0)
+ {
+ rev = (rev * 10) + (temp % 10);
+ temp /= 10;
+ }
+ if (rev == n)
+ return 1;
+ else
+ return 0;
+}
+
+int main()
+{
+ int i;
+ printf("Palindrome number of 3 and 4 digits: ");
+ for (i = 100; i <= 9999; i++)
+ if (palindromeCheck(i))
+ printf("%d ", 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 <stdio.h>
+
+int factorial(int);
+int checkKrishnamurty(int);
+
+int factorial(int n)
+{
+ int i, fact = 1;
+ for (i = 1; i <= n; i++)
+ fact *= i;
+ return fact;
+}
+
+int checkKrishnamurty(int n)
+{
+ int temp1 = n, temp2 = 0;
+ while (temp1 > 0)
+ {
+ temp2 += factorial(temp1 % 10);
+ temp1 /= 10;
+ }
+ if (temp2 == n)
+ return 1;
+ else
+ return 0;
+}
+
+int main()
+{
+ int n;
+ printf("Enter the number: ");
+ scanf("%d", &n);
+ if (checkKrishnamurty(n))
+ printf("\nInput %d is a Krishnamurty number.", n);
+ else
+ printf("\ninput %d is not a Krishnamurty number.", 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 <stdio.h>
+#include <math.h>
+
+#define lowerBound 100
+#define upperBound 999
+
+int isArmstrongNumber(int);
+
+int isArmstrongNumber(int n)
+{
+ int temp = n, sum = 0, count = 0;
+ while (temp > 0)
+ {
+ count++;
+ temp /= 10;
+ }
+ temp = n;
+ while (temp > 0)
+ {
+ sum += (int)pow(temp % 10, count);
+ temp /= 10;
+ }
+ return sum == n;
+}
+
+int main()
+{
+ int n, i, count = 0;
+ printf("Armstrong number between %d and %d are: ", lowerBound, upperBound);
+ for (i = lowerBound; i <= upperBound; i++)
+ if (isArmstrongNumber(i))
+ {
+ printf("%d ", i);
+ count++;
+ }
+ printf("\n\nCount: %d\n", 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 <stdio.h>
+
+int main()
+{
+ printf("Combinations of two two-digit numbers such that the sum of digits of both numbers is equal: ");
+ int i, j, sum1, sum2, count = 0;
+ for (i = 10; i <= 99; i++)
+ {
+ sum1 = (i % 10) + (i / 10);
+ for (j = i + 1; j <= 99; j++)
+ {
+ sum2 = (j % 10) + (j / 10);
+ if (sum1 == sum2)
+ {
+ printf("(%d, %d) ", i, j);
+ count++;
+ }
+ }
+ }
+ printf("\nCount: %d\n", 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 <stdio.h>
+
+int main()
+{
+ printf("a² + b² = c² : ");
+ int i, j, k, sq1, sq2, count = 0;
+ for (i = 1; i <= 30; i++)
+ {
+ sq1 = i * i;
+ for (j = i + 1; j <= 30; j++)
+ {
+ sq2 = j * j;
+ for (k = j + 1; k <= 30; k++)
+ {
+ if (sq1 + sq2 == k * k)
+ {
+ printf("(%d, %d, %d) ", i, j, k);
+ count++;
+ }
+ }
+ }
+ }
+ printf("\n\nCount: %d\n", 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 <stdio.h>
+
+int main()
+{
+ int i, count = 0, n1, n2, n3;
+ printf("Distinct numbers between 100 and 999: ");
+ for (i = 100; i <= 999; i++)
+ {
+ n1 = i / 100;
+ n2 = (i % 100) / 10;
+ n3 = i % 10;
+ if (n1 != n2 && n2 != n3 && n1 != n3)
+ {
+ printf("%d ", i);
+ count++;
+ }
+ }
+ printf("\nCount: %d\n", 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 <stdio.h>
+#include <math.h>
+
+int isPrime(int n)
+{
+ if (n < 2)
+ return 0;
+ if (n == 2)
+ return 1;
+ if (n % 2 == 0)
+ return 0;
+ int i, temp = (int)sqrt(n);
+ for (i = 3; i <= temp; i += 2)
+ if (n % i == 0)
+ return 0;
+ return 1;
+}
+
+int main()
+{
+ int n, i, count = 0;
+ printf("enter the n: ");
+ scanf("%d", &n);
+ printf("\nAll the twin numbers: ");
+ for (i = 1; i <= n - 2; i++)
+ {
+ if (isPrime(i))
+ {
+ if (isPrime(i + 2))
+ {
+ printf("(%d, %d) ", i, i + 2);
+ count++;
+ }
+ }
+ }
+ printf("\nCount; %d", 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<stdio.h>
+int main() {
+ int a = 9, b = 4, c;
+ c = a + b;
+ printf("A + B = %d\n", c);
+ c = a / b;
+ printf("A / B = %d\n", c);
+ c = a % b;
+ printf("A %% B = %d\n", 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<stdio.h>
+int main() {
+ int a = 5, b = 5, c = 10;
+ printf("a = b = %d\n", a == b);
+ printf("a > b = %d\n", a > b);
+ printf("a < b = %d\n", 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-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 <stdio.h>
+int main() {
+ int a = 5, b = 5, c = 10, result;
+
+ result = (a == b) && (c > b);
+ printf("Result is %d\n", result);
+
+ result = (a == b) && (c < b);
+ printf("Result is %d\n", result);
+
+ result = (a != b) || (c < b);
+ printf("Result is %d\n", result);
+
+ result = (a != b) || (c < b);
+ printf("Result is %d\n", result);
+
+ result = !(a != b);
+ printf("Result is %d\n", result);
+
+ result = !(a == b);
+ printf("Result is %d\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">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 <stdio.h>
+#include <conio.h>
+
+void main()
+{
+ clrscr();
+ int x;
+ x = 1;
+ while (x <= 10)
+ {
+ printf("%d ", 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 <stdio.h>
+#include <conio.h>
+
+void main()
+{
+ clrscr();
+ int n, reverse = 0, rem;
+ printf("Enter the numner : ");
+ scanf("%d", &n);
+ while (n != 0)
+ {
+ rem = n % 10;
+ reverse = reverse * 10 + rem;
+ n /= 10;
+ }
+ printf("Reversed Number : %d", 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 <stdio.h>
+#include <conio.h>
+
+void main()
+{
+ clrscr();
+ int a = 5, i = 1, res;
+ while (i <= 10)
+ {
+ res = a * i;
+ printf("%d * %d = %d\n", 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 <stdio.h>
+#include <conio.h>
+
+void main()
+{
+ clrscr();
+ int i, sum = 0;
+ for (i = 1; i <= 10; i++)
+ {
+ sum += i;
+ }
+ printf("\nSum of the first natural number : %d", 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 <stdio.h>
+
+int main()
+{
+ int rows, cols, i, j;
+ printf("Enter the number of rows and columns: ");
+ scanf("%d %d", &rows, &cols);
+
+ int a[rows][cols], b[rows][cols], c[rows][cols];
+
+ printf("Enter the elements of matrix A (%d x %d): \n", rows, cols);
+ for (i = 0; i < rows; i++)
+ for (j = 0; j < cols; j++)
+ {
+ printf("Position %d%d: ", i, j);
+ scanf("%d", &a[i][j]);
+ }
+ printf("\nMatrix A: \n");
+ for (i = 0; i < rows; i++)
+ {
+ for (j = 0; j < cols; j++)
+ printf("%d ", a[i][j]);
+ printf("\n");
+ }
+
+ printf("\nEnter the elements of matrix B(%d x %d): \n", rows, cols);
+ for (i = 0; i < rows; i++)
+ for (j = 0; j < cols; j++)
+ {
+ printf("Position %d%d: ", i, j);
+ scanf("%d", &b[i][j]);
+ }
+ printf("\nMatrix B: \n");
+ for (i = 0; i < rows; i++)
+ {
+ for (j = 0; j < cols; j++)
+ printf("%d ", b[i][j]);
+ printf("\n");
+ }
+
+ for (i = 0; i < rows; i++)
+ for (j = 0; j < cols; j++)
+ c[i][j] = a[i][j] + b[i][j];
+
+ printf("\nResult Matrix: \n");
+ for (i = 0; i < rows; i++)
+ {
+ for (j = 0; j < cols; j++)
+ printf("%d ", c[i][j]);
+ printf("\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-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 <stdio.h>
+
+int main()
+{
+ int i, j, rows, cols;
+ printf("\nEnter the number of rows and columns : ");
+ scanf("%d %d", &rows, &cols);
+
+ if (rows != cols)
+ {
+ printf("Triangular matrix definitions only apply to square matrices (rows == columns).\n");
+ return 1;
+ }
+
+ int matrix[rows][cols];
+
+ printf("Enter the elements of matrix (%d x %d): \n", rows, cols);
+ for (i = 0; i < rows; i++)
+ for (j = 0; j < cols; j++)
+ {
+ printf("Position %d%d: ", i, j);
+ scanf("%d", &matrix[i][j]);
+ }
+ printf("\nMatrix: \n");
+ for (i = 0; i < rows; i++)
+ {
+ for (j = 0; j < cols; j++)
+ printf("%d ", matrix[i][j]);
+ printf("\n");
+ }
+
+ printf("\nUpper triangular of the Matrix: \n");
+ for (i = 0; i < rows; i++)
+ {
+ for (j = 0; j < cols; j++)
+ {
+ if (j >= i)
+ printf("%d ", matrix[i][j]);
+ else
+ printf("~ ");
+ }
+ printf("\n");
+ }
+
+ printf("\nLower triangular of the Matrix: \n");
+ for (i = 0; i < rows; i++)
+ {
+ for (j = 0; j < cols; j++)
+ {
+ if (j <= i)
+ printf("%d ", matrix[i][j]);
+ else
+ printf("~ ");
+ }
+ printf("\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-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 <stdio.h>
+
+int main()
+{
+ int a[8] = {4, 5, 2, 10, 6, 9, 8};
+ int i;
+
+ printf("Elemnts of the array: ");
+ for (i = 0; i <= 6; i++)
+ printf("%d ", a[i]);
+
+ printf("\nMethod 1: ");
+ for (i = 7; i >= 4; i--)
+ a[i] = a[i - 1];
+ a[3] = 7;
+ for (i = 0; i <= 7; i++)
+ printf("%d ", a[i]);
+
+ // another method
+ printf("\nMethod 2: ");
+ int b[8] = {4, 5, 2, 10, 6, 9, 8};
+ int temp1 = 7;
+ for (i = 3; i <= 7; i++)
+ {
+ int temp2 = b[i];
+ b[i] = temp1;
+ temp1 = temp2;
+ }
+ for (i = 0; i <= 7; i++)
+ printf("%d ", 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 <stdio.h>
+
+int main()
+{
+ int elementCount, i, keyElement;
+
+ printf("Enter the number of element you want to add: ");
+ scanf("%d", &elementCount);
+
+ int elements[elementCount];
+
+ for (i = 0; i < elementCount; i++)
+ {
+ printf("Enter Element %d: ", i + 1);
+ scanf("%d", &elements[i]);
+ }
+
+ printf("\nEnter the Key Element you want to search: ");
+ scanf("%d", &keyElement);
+ for (i = 0; i < elementCount; i++)
+ if (elements[i] == keyElement)
+ {
+ printf("\nKey Element %d is found in %d position.", keyElement, i);
+ return 0;
+ }
+ printf("\nKey Element %d is not found.", 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 <stdio.h>
+
+int main()
+{
+ int i, j, row, col, count = 0;
+
+ printf("Enter the number of rows and columns in the matrix: ");
+ scanf("%d %d", &row, &col);
+
+ int matrix[row][col];
+
+ for (i = 0; i < row; i++)
+ for (j = 0; j < col; j++)
+ {
+ printf("Postion %d%d: ", i, j);
+ scanf("%d", &matrix[i][j]);
+ if (matrix[i][j] == 0)
+ count++;
+ }
+
+ printf("\nEntered Matrix: \n");
+ for (i = 0; i < row; i++)
+ {
+ for (j = 0; j < col; j++)
+ printf("%d ", matrix[i][j]);
+ printf("\n");
+ }
+
+ if (count > (row * col) / 2)
+ printf("\nEntered matrix is a Sparx Matrix.");
+ else
+ printf("\nEntered matrix is not a Sparx Matrix");
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
+
+double average(int []);
+
+int main()
+{
+ int marks[10], i;
+ printf("\nEnter 10 numbers: \n");
+ for (i = 0; i <= 9; i++)
+ {
+ printf("Enter number %d: ", i + 1);
+ scanf("%d", &marks[i]);
+ }
+ printf("\nAverage = %g", average(marks));
+ return 0;
+}
+
+double average(int marks[10])
+{
+ int sum = 0;
+ for (int i = 0; i <= 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<stdio.h>
+int main() {
+ int a, b, sum, sub, multi, div, mod;
+ printf("Enter 1st number : ");
+ scanf("%d", &a);
+ printf("Enter 2nd number : ");
+ scanf("%d", &b);
+ sum = a + b;
+ sub = a - b;
+ multi = a * b;
+ div = a / b;
+ mod = a % b;
+ printf("\nSum = %d", sum);
+ printf("\nSubtraction = %d", sub);
+ printf("\nMultiplication = %d", multi);
+ printf("\nDivision = %d", div);
+ printf("\nModulas = %d", 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<stdio.h>
+int main() {
+ int a = 10, b = 20, temp;
+ printf("Before swap A : %d, B : %d", a, b);
+ temp = a;
+ a = b;
+ b = temp;
+ printf("\nAfter swap A : %d, B : %d", 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 '&' */
+
+#include<stdio.h>
+int main() {
+ unsigned int a = 4, b = 5, c = 6;
+ unsigned int x, y;
+ x = a & b;
+ y = b & c;
+ printf("x = %u y = %u", 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<stdio.h>
+int main() {
+ int x = 25, y = 19, z;
+ z = x - y;
+ z = z & x ;
+ printf("Z = %d", 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 '|' */
+
+#include<stdio.h>
+int main() {
+ int x = 12, y = 14, z = 10, res;
+ x++;
+ z++;
+ x = x + y + z;
+ res = x | y;
+ z = res | z;
+ printf("x = %d y = %d z = %d res = %d", 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 '~' */
+
+#include<stdio.h>
+int main() {
+ int x = 12, y = 15, z = 21;
+ int res, res1, res2;
+ res = x > 10;
+ res1 = ~res;
+ res2 = ~x;
+ printf("REs = %d, Res1 = %d, Res2 = %d", 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<stdio.h>
+int main() {
+ int x, res = 1;
+ printf("Enter a number : ");
+ scanf("%d", &x);
+ res = res & x;
+ if (res == 0) {
+ printf("\nInput %d is a even number.", x);
+ }
+ else {
+ printf("\nInput %d is a odd number.", 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<stdio.h>
+#include<math.h>
+int main() {
+ double r, area;
+ printf("Enter the radius of circle : ");
+ scanf("%lf", &r);
+ area = M_PI * r * r;
+ printf("\nArea : %lf", 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<stdio.h>
+int main() {
+ printf("Hello world");
+ return 0;
+}
+</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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<stdio.h>
+int main() {
+ printf("Hello\nworld");
+ return 0;
+}
+</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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<stdio.h>
+int main() {
+ int a, b, sum, multi;
+ printf("Enter the 1st number : ");
+ scanf("%d",&a);
+ printf("Enter the 2nd number : ");
+ scanf("%d",&b);
+ sum = a + b;
+ multi = a * b;
+ printf("\nSum = %d"
+ "\nMultiplication = %d",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<stdio.h>
+int main() {
+ double x =5, result;
+ result = ((x + 3) / 4) - ((2 * x + 4) / 3);
+ printf("Result = %lf",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<stdio.h>
+int main() {
+ int daily_wage = 455, fine = 150, present, absent, income;
+ printf("No of days present : ");
+ scanf("%d", &present);
+ absent = 30 - present;
+ income = (present * 455) - (absent * 150);
+ printf("\nIncome : %d",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<stdio.h>
+int main() {
+ double f = 98.6, c;
+ c = ((f - 32) * 5) / 9;
+ printf("Temperature in Celcius is : %lf",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<stdio.h>
+int main() {
+ double mrp, final_price, temp;
+ printf("Enter the printed price : ");
+ scanf("%lf", &mrp);
+ temp = mrp * 0.90;
+ final_price = temp * 1.06;
+ printf("\nCustomer have to pay : %lf", 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<stdio.h>
+int main() {
+ double mrp, shop1, shop2, temp;
+ printf("Enter the price : ");
+ scanf("%lf", &mrp);
+ shop1 = mrp * 0.70;
+ temp = mrp * 0.80;
+ shop2 = temp * 0.90;
+ printf("\nShopkeeper 1 price : %lf"
+ "\nShopkeeper 2 price : %lf",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<stdio.h>
+int main() {
+ double bs, da, hra, pf, gs, ns;
+ printf("Enter the Basic Salary : ");
+ scanf("%lf", &bs);
+ da = bs * 0.3;
+ hra = bs * 0.2;
+ pf = bs * 0.125;
+ gs = bs + da + hra;
+ ns = gs - pf;
+ printf("\nGross Salary : %lf"
+ "\nNet Salary : %lf", 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<stdio.h>
+#include<math.h>
+int main() {
+ double p, r, t, si, a, ci, dif;
+ printf("Enter the principle amount, rate of interest, time in year : ");
+ scanf("%lf %lf %lf", &p, &r, &t);
+ si = (p * r * t) / 100;
+ a = p * pow((1 + (r / 100)), t);
+ ci = a - p;
+ dif = ci - si;
+ printf("\nSimple Interest : %lf"
+ "\nCompound Interest : %lf"
+ "\nInterest Difference : %lf", 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<stdio.h>
+#include<math.h>
+int main() {
+ double l, g, t;
+ printf("Enter the Length and Gravity measures : ");
+ scanf("%lf %lf", &l, &g);
+ t = 2 * M_PI * sqrt(l / g);
+ // using M_PI variable for PI value from math.h header file
+ printf("\nTime Period : %lf", 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<stdio.h>
+int main() {
+ int a = 4, b = 6;
+ printf("Before Swap : A = %d, B = %d", a, b);
+ a = a + b;
+ b = a - b;
+ a = a - b;
+ printf("\nAfter Swap : A = %d, B = %d", 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<stdio.h>
+#include<math.h>
+int main() {
+ int a = 4, b = 6;
+ printf("Before Swap : A = %d, B = %d", a, b);
+ a = a ^ b;
+ b = a ^ b;
+ a = a ^ b;
+ printf("\nAfter Swap : A = %d, B = %d", 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<stdio.h>
+#include<math.h>
+int main() {
+ double d, side, area, per;
+ printf("Enter the diagonal : ");
+ scanf("%lf", &d);
+ side = d / sqrt (2);
+ area = side * side;
+ per = 4 * side;
+ printf("\nArea of the Square : %lf"
+ "\nPerimeter of the Square : %lf", 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<stdio.h>
+int main() {
+ int day, month, year, temp;
+ printf("Enter the number of days : ");
+ scanf("%d", &day);
+ temp = day;
+ year = day / 365;
+ day = day % 365;
+ month = day / 30;
+ day = day % 30;
+ printf("\n%d Days = %d Years %d Months %d Days", 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<stdio.h>
+#include<math.h>
+int main() {
+ double area, r;
+ printf("Enter the area of a circle : ");
+ scanf("%lf", &area);
+ r = sqrt((7 * area) / 22);
+ printf("\nRadius : %lf", 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 <stdio.h>
+int main()
+{
+ int a, b, c, max;
+ printf("Enter the value for a, b, c : ");
+ scanf("%d %d %d", &a, &b, &c);
+ max = a;
+ if (max < b)
+ max = b;
+ if (max < c)
+ max = c;
+ printf("Maximum : %d", 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 <stdio.h>
+int main()
+{
+ double cost, sell, pro, prop, loss, lossp;
+ printf("Enter the cost and selling price : ");
+ scanf("%lf %lf", &cost, &sell);
+ if (sell > cost)
+ {
+ pro = sell - cost;
+ prop = (pro / cost) * 100;
+ printf("Profit : RS %g, Profit Percentage : %g", pro, prop);
+ }
+ else if (sell < cost)
+ {
+ loss = cost - sell;
+ lossp = (loss / cost) * 100;
+ printf("Loss : RS %g, Loss Percentage : %g", loss, lossp);
+ }
+ else
+ printf("Neither loss nor Profit.");
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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
+ =<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 <stdio.h>
+int main()
+{
+ double dis, amt;
+ printf("Enter the distance : ");
+ scanf("%lf", &dis);
+ if (dis <= 5.0)
+ amt = 90.0;
+ else if (dis > 5.0 && dis <= 15.0)
+ amt = 90.0 + (dis - 5.0) * 20;
+ else if (dis > 15.0 && dis <= 25.0)
+ amt = 90.0 + 200.0 + (dis - 15.0) * 10;
+ else if (dis > 25.0)
+ amt = 90.0 + 200.0 + 100.0 + (dis - 25.0) * 9;
+ printf("\nAmount to be paid : %g", 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 <stdio.h>
+int main()
+{
+ double nod, amt, s, i;
+ printf("Enter the amount and the time in days : ");
+ scanf("%lf %lf", &s, &nod);
+ if (nod <= 180)
+ i = (s * 5.5 * (nod / 365)) / 100;
+ else if (nod > 180.0 && nod <= 364.0)
+ i = (s * 7.5 * (nod / 365)) / 100;
+ else if (nod == 365.0)
+ i = (s * 9.0 * 1) / 100;
+ else if (nod > 365.0)
+ i = (s * 8.5 * (nod / 365)) / 100;
+ amt = s + i;
+ printf("Amount to be paid : %g", 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 <stdio.h>
+#include <math.h>
+int main()
+{
+ int n, temp;
+ double sr;
+ printf("Enter the number : ");
+ scanf("%d", &n);
+ sr = sqrt(n);
+ temp = (int)sr;
+ if (temp * temp == n)
+ printf("\nThis is a perfect square.");
+ else
+ printf("\nThis is not a perfect square.");
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
+int main()
+{
+ int a, b, c, min;
+ printf("Enter three number : ");
+ scanf("%d %d %d", &a, &b, &c);
+ min = (a < b && a < c) ? a : (b < a && b < c) ? b
+ : c;
+ printf("Minimum = %d", 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 <stdio.h>
+int main()
+{
+ double cost, amt;
+ printf("Enter the total cost : ");
+ scanf("%lf", &cost);
+ if (cost <= 2000)
+ amt = cost * 0.94;
+ else if (cost > 2000 && cost <= 5000)
+ amt = cost * 0.9;
+ else if (cost > 5000 && cost <= 10000)
+ amt = cost * 0.85;
+ else if (cost > 10000)
+ amt = cost * 0.8;
+ printf("\nAmount to be paid : %g", 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 <stdio.h>
+int main()
+{
+ int year;
+ printf("Enter the year : ");
+ scanf("%d", &year);
+ if (year % 4 == 0 && year % 100 != 0)
+ printf("\nYear %d is a leapyear.", year);
+ else if (year % 400 == 0)
+ printf("\nYear %d is a leapyear (Century).", year);
+ else
+ printf("\nYear %d is not a leapyear.", 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 <stdio.h>
+int main()
+{
+ double unit, amt;
+ printf("Enter the electricity consp(unit) : ");
+ scanf("%lf", &amt);
+ if (unit <= 50)
+ amt = unit * 0.50;
+ else if (unit > 50 && unit <= 50)
+ amt = 25 + ((unit - 50) * 0.75);
+ else if (unit > 150 && unit <= 250)
+ amt = 25 + 75 + ((unit - 150) * 1.20);
+ else if (unit > 250)
+ amt = 25 + 75 + 120 + ((unit - 250) * 1.50);
+ amt = amt * 1.20;
+ printf("\nAmount to be paid : %g", 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
+('s' for simple interest amd 'c' 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 <stdio.h>
+#include <math.h>
+#include <ctype.h>
+int main()
+{
+ double principalAmount, rateOfInterest, timePeriod, simpleInterest, compoundInterest;
+ char mode;
+ printf("Enter the principle amount, Rate of interest, Time : ");
+ scanf("%lf %lf %lf", &principalAmount, &rateOfInterest, &timePeriod);
+ printf("\nEnter the mode ('s' : simple interest, 'c' : compound interest) : ");
+ scanf(" %c", &mode);
+ mode = tolower(mode);
+ switch (mode)
+ {
+ case 's':
+ simpleInterest = (principalAmount * rateOfInterest * timePeriod) / 100;
+ printf("\nSimple Interest : %g", simpleInterest);
+ break;
+ case 'c':
+ compoundInterest = principalAmount * (pow((1 + rateOfInterest / 100), timePeriod) - 1);
+ printf("\nCompound Interest : %g", compoundInterest);
+ break;
+ default:
+ printf("\nInvalid Input");
+ 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 ('L' : laptop, 'D' : 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 <stdio.h>
+#include <ctype.h>
+int main()
+{
+ double principal_amount, desktop_discount, laptop_discount, discount_amount, discounted_price;
+ char choice;
+ printf("Enter the purchase amount : ");
+ scanf("%lf", &principal_amount);
+ printf("Type of purchase ('L' : Laptop, 'D' : Desktop) : ");
+ scanf(" %c", &choice);
+ choice = toupper(choice);
+ if (principal_amount <= 20000)
+ {
+ laptop_discount = 0.03;
+ desktop_discount = 0.05;
+ }
+ else if (principal_amount > 20000 && principal_amount <= 50000)
+ {
+ laptop_discount = 0.05;
+ desktop_discount = 0.075;
+ }
+ else if (principal_amount > 50000 && principal_amount <= 75000)
+ {
+ laptop_discount = 0.075;
+ desktop_discount = 0.105;
+ }
+ else if (principal_amount > 75000)
+ {
+ laptop_discount = 0.1;
+ desktop_discount = 0.15;
+ }
+ switch (choice)
+ {
+ case 'L':
+ discount_amount = principal_amount * laptop_discount;
+ discounted_price = principal_amount - discount_amount;
+ printf("\nDiscount Amount : %g"
+ "\nDiscounted Price : %g",
+ discount_amount, discounted_price);
+ break;
+ case 'D':
+ discount_amount = principal_amount * desktop_discount;
+ discounted_price = principal_amount - discount_amount;
+ printf("\nDiscount Amount : %g"
+ "\nDiscounted Price : %g",
+ discount_amount, discounted_price);
+ break;
+ default:
+ printf("\nInvalid Input.");
+ 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 <stdio.h>
+int main()
+{
+ int i = 1, num, fact = 1;
+ printf("Enter the number : ");
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nPlease enter a number.");
+ return 1;
+ }
+ if (num == 0)
+ {
+ printf("\nFactorial of 0 : 1");
+ return 0;
+ }
+ if (num < 0)
+ {
+ printf("\nFactorial of %d : UNDEFINED", num);
+ return 0;
+ }
+ while (i <= num)
+ {
+ fact = fact * i;
+ i++;
+ }
+ printf("Factorial of %d : %d", 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 <stdio.h>
+int main()
+{
+ int num, i = 0, result = 0;
+ printf("Enter the value for n : ");
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nPlease enter a number.");
+ return 1;
+ }
+ if (num < 1)
+ {
+ printf("\nPlease enter a positive number.");
+ return 1;
+ }
+ while (i <= num)
+ {
+ result = result + i;
+ i++;
+ }
+ printf("\nResult : %d", 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 <stdio.h>
+#include <math.h>
+
+int main()
+{
+ int i, r;
+
+ // 3, 6, 9, 12, ...
+ {
+ i = 3, r = 0;
+ printf("Series 1 (3, 6, 9, 12, ...) :");
+ while (i <= 15)
+ {
+ r = r + 3;
+ printf(" %d", r);
+ i++;
+ }
+ }
+
+ // 1, 4, 9, 16, ...
+ {
+ i = 1;
+ printf("\nSeries 2 (1, 4, 9, 16, ...) :");
+ while (i <= 15)
+ {
+ printf(" %d", i * i);
+ i++;
+ }
+ }
+
+ // 4, 8, 16, 32, ...
+ {
+ i = 1, r = 2;
+ printf("\nSeries 3 (4, 8, 16, 32, ...) :");
+ while (i <= 15)
+ {
+ r = r * 2;
+ printf(" %d", r);
+ i++;
+ }
+ }
+
+ // 0, 7, 26, ...
+ {
+ i = 1, r;
+ printf("\nSeries 4 (0, 7, 26, ...) :");
+ while (i <= 15)
+ {
+ r = (int)pow(i, 3) - 1;
+ printf(" %d", 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 <stdio.h>
+#include <math.h>
+
+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("--- s = (a ^ 2) + (a ^ 2 / 2) + (a ^ 2 / 3) + ... + (a ^ 2 / 10) ---");
+ printf("\nEnter the number : ");
+ scanf("%lf", &a);
+ while (i <= 10)
+ {
+ res = res + ((a * a) / i);
+ i++;
+ }
+ printf("S = %g", res);
+ }
+
+ // s = 1 + (2 ^ 2 / a) + (3 ^ 3 / a ^ 2) + ... + n
+ {
+ res = 0, i = 0;
+ printf("\n--- // s = 1 + (2 ^ 2 / a) + (3 ^ 3 / a ^ 2) + ... + n ---");
+ printf("\nEnter the value for a and n : ");
+ scanf(" %lf %lf", &a, &n);
+ while (i <= n - 1)
+ {
+ res = res + (pow(i + 1, i + 1) / pow(a, i));
+ i++;
+ }
+ printf("S = %g", 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 <stdio.h>
+int main()
+{
+ int n, temp, sod = 0;
+ printf("Enter the number : ");
+ scanf("%d", &n);
+ temp = n;
+ while (temp > 0)
+ {
+ sod = sod + (temp % 10);
+ temp = temp / 10;
+ }
+ if (n % sod == 0)
+ printf("\nIt is Niven number.");
+ else
+ printf("\nIt is not a Niven number.");
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
+int main()
+{
+ int inp, odd = 0, even = 0, temp;
+ printf("Enter the number : ");
+ scanf("%d", &inp);
+ temp = inp;
+ while (temp > 0)
+ {
+ if ((temp % 10) % 2 == 0)
+ even += temp % 10;
+ else
+ odd += temp % 10;
+ temp /= 10;
+ }
+ printf("\nSum of even : %d"
+ "\nSum of odd : %d",
+ 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 <stdio.h>
+int main()
+{
+ int inp, temp, index = 1, even = 0, odd = 0;
+ printf("Enter the numebr : ");
+ scanf("%d", &inp);
+ temp = inp;
+ while (temp > 0)
+ {
+ if (index % 2 == 0)
+ even += temp % 10;
+ else
+ odd += temp % 10;
+ temp /= 10;
+ index++;
+ }
+ printf("\nSum of even position digits : %d"
+ "\nSum of odd position digits : %d",
+ 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 <stdio.h>
+#include <stdbool.h>
+int main()
+{
+ int n, res = 1, temp;
+ bool status = false;
+ printf("Enter the number : ");
+ scanf("%d", &n);
+ temp = n;
+ while (temp > 0)
+ {
+ if ((temp % 10) % 2 == 0)
+ {
+ res *= (temp % 10) + 1;
+ status = true;
+ }
+ temp /= 10;
+ }
+ if (!status)
+ printf("\nThere is no even digits.");
+ else
+ printf("\nThe product of the successors of even digits of the number %d is : %d", 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 <stdio.h>
+#include <math.h>
+
+int main()
+{
+ double a, sum = 0;
+ int n, i;
+ printf("Enter value for a and n : ");
+ scanf("%lf %d", &a, &n);
+ for (i = 1; i <= n; i++)
+ sum += pow(a, i) / i;
+ printf("\nSum = %g", 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 <stdio.h>
+
+int main()
+{
+ double sum = 0, temp1 = 0, temp2 = 1;
+ int n, i;
+ printf("Enter value for n : ");
+ scanf("%d", &n);
+ for (i = 1; i <= n; i++)
+ {
+ temp1 += i;
+ temp2 *= i;
+ sum += temp1 / temp2;
+ }
+ printf("\nSum = %g", 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 <stdio.h>
+#include <math.h>
+#include <stdbool.h>
+
+int main()
+{
+ int num, i, endCheckDigit;
+ bool isPrime = true;
+ printf("Enter the number : ");
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nOnly a number is allowed, not a character.");
+ return 1;
+ }
+ if (num <= 0)
+ {
+ printf("\nOnly postive number is allowed.");
+ return 1;
+ }
+ if (num == 1)
+ {
+ printf("\nInput 1 is not a prime number."
+ "\nHas only one positive divisor (itself), not exactly two."
+ "\nRule: Prime number should have exactly two distinct positive divisors: 1 and itself");
+ return 0;
+ }
+ if (num == 2)
+ {
+ printf("\nInput 2 is a prime number."
+ "\n(Note: 2 is only Even Prime Number)");
+ return 0;
+ }
+ if (num % 2 == 0)
+ {
+ printf("\nInput %d is not a prime number.", num);
+ return 0;
+ }
+ endCheckDigit = sqrt(num);
+ for (i = 3; i <= endCheckDigit; i += 2)
+ {
+ if (num % i == 0)
+ {
+ isPrime = false;
+ printf("\nInput %d is not prime number.", num);
+ return 0;
+ }
+ }
+ if (isPrime)
+ {
+ printf("\nInput %d is a prime number.", 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 <stdio.h>
+
+int main()
+{
+ int num, i;
+ printf("Enter a number : ");
+ scanf("%d", &num);
+ printf("\nFactors of %d : ", num);
+ for (i = 1; i <= num / 2; i++)
+ {
+ if (num % i == 0)
+ {
+ printf(" %d", 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 <stdio.h>
+int main()
+{
+ int a, b, temp;
+ printf("Enter two number : ");
+ scanf("%d %d", &a, &b);
+ while (b > 0)
+ {
+ temp = a;
+ a = b;
+ b = temp % b;
+ }
+ printf("HCF = %d", 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 <stdio.h>
+int main()
+{
+ int a, b, temp, temp_a, temp_b;
+ printf("Enter two number : ");
+ scanf("%d %d", &a, &b);
+ temp_a = a;
+ temp_b = b;
+ while (b > 0)
+ {
+ temp = a;
+ a = b;
+ b = temp % b;
+ }
+ if (a == 1)
+ {
+ printf("\n(%d, %d) is co-prime.", temp_a, temp_b);
+ }
+ else
+ {
+ printf("\n(%d, %d) is not co-prime.", 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 <stdio.h>
+#include <math.h>
+
+int main()
+{
+ int n, t, i, r, rev, prime = 1;
+ printf("Enter the number : ");
+ scanf("%d", &n);
+ for (i = 2; i <= (int)sqrt(n); i++)
+ {
+ if (n % i == 0)
+ {
+ prime = 0;
+ break;
+ }
+ }
+ if (prime)
+ {
+ printf("%d is a prime number.", n);
+ t = n;
+ rev = 0;
+ prime = 1;
+ while (t > 0)
+ {
+ r = t % 10;
+ rev = rev * 10 + r;
+ t = t / 10;
+ }
+ for (i = 2; i <= (int)sqrt(rev); i++)
+ {
+ if (rev % i == 0)
+ {
+ prime = 0;
+ break;
+ }
+ }
+ if (prime)
+ {
+ printf("\n%d and %d are prime numbers.. TWISTED PRIME", n, rev);
+ }
+ else
+ {
+ printf("\n%d is non prime", rev);
+ }
+ }
+ else
+ {
+ printf("\n%d is non prime.", 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 <stdio.h>
+int main()
+{
+ int num, temp, rev;
+ printf("Enter the number : ");
+ scanf("%d", &num);
+ temp = num;
+ rev = 0;
+ while (temp > 0)
+ {
+ rev = (rev * 10) + (temp % 10);
+ temp /= 10;
+ }
+ if (num == rev)
+ {
+ printf("%d is a palindrome number.", num);
+ }
+ else
+ {
+ printf("%d is not a palindrome number.", 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 <stdio.h>
+#include <math.h>
+#include <stdbool.h>
+
+int main()
+{
+ int num, iterationIndex;
+ bool isPronic = false;
+ printf("Enter the number : ");
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nYou have to enter a number, not an character or symbol.");
+ return 1;
+ }
+ if (num < 1)
+ {
+ printf("\nOnly postive number is allowed.");
+ return 1;
+ }
+ for (iterationIndex = 1; iterationIndex <= num / 2; iterationIndex++)
+ {
+ if (iterationIndex * (iterationIndex + 1) == num)
+ {
+ printf("\nInput %d is a Pronic Number.", num);
+ isPronic = true;
+ break;
+ }
+ }
+ if(!isPronic)
+ {
+ printf("\nInput %d is not a Pronic Number.", num);
+ }
+ return 0;
+}
+*/
+
+// using direct return method (more efficient and generally preferred)...
+
+#include <stdio.h>
+#include <math.h>
+
+int main()
+{
+ int num, iterationIndex, iterationLimit;
+ printf("Enter the number : ");
+ if (scanf("%d", &num) != 1)
+ {
+ printf("\nYou have to enter a number, not an character or symbol.");
+ return 1;
+ }
+ if (num < 1)
+ {
+ printf("\nOnly postive number is allowed.");
+ return 1;
+ }
+ iterationLimit = (int)sqrt(num);
+ for (iterationIndex = 1; iterationIndex <= iterationLimit; iterationIndex++)
+ {
+ if (iterationIndex * (iterationIndex + 1) == num)
+ {
+ printf("\nInput %d is a Pronic Number.", num);
+ return 0;
+ }
+ }
+ printf("\nInput %d is not a Pronic Number.", 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 <stdio.h>
+
+int main()
+{
+ int i, j, n;
+ printf("Enter n : ");
+ scanf("%d", &n);
+ for (i = 1; i <= n; i++)
+ {
+ for (j = 1; j <= i; j++)
+ {
+ printf("%d\t", j);
+ }
+ printf("\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">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 <stdio.h>
+
+int main()
+{
+ int i, j, n;
+ printf("Enter n : ");
+ scanf("%d", &n);
+ for (i = 1; i <= n; i++)
+ {
+ for (j = i; j >= 1; j--)
+ {
+ printf("%d\t", j);
+ }
+ printf("\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">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 <stdio.h>
+
+int main()
+{
+ int i, j, n;
+ printf("Enter n : ");
+ scanf("%d", &n);
+ for (i = n; i >= 1; i--)
+ {
+ for (j = n; j >= i; j--)
+ {
+ printf("%d\t", j);
+ }
+ printf("\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">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 <stdio.h>
+
+int main()
+{
+ int i, j, n, temp = 1;
+ printf("Enter row number : ");
+ scanf("%d", &n);
+ for (i = 1; i <= n; i++)
+ {
+ for (j = 1; j <= i; j++)
+ {
+ printf("%d\t", temp);
+ temp++;
+ }
+ printf("\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">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 <stdio.h>
+
+int main()
+{
+ int i, j, n;
+ char a = '#', b = '@';
+ printf("Enter row number : ");
+ scanf("%d", &n);
+ for (i = 1; i <= n; i++)
+ {
+ for (j = 1; j <= i; j++)
+ {
+ if (i % 2 == 0)
+ printf("%c\t", b);
+ else
+ printf("%c\t", a);
+ }
+ printf("\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">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 <stdio.h>
+#include <math.h>
+
+int main()
+{
+ int num;
+ printf("Enter the number : ");
+ scanf("%d", &num);
+ int position = printf("%d", num);
+ int temp = num;
+ int res = 0;
+ while (temp > 0)
+ {
+ res += (int)pow(temp % 10, position);
+ position--;
+ temp /= 10;
+ }
+ if (res == num)
+ printf(" is a Disarium Number.");
+ else
+ printf(" is Not a Disarium Number.");
+ return 0;
+}</code></pre>
+ </div>
+ </li>
+
+ <li>
+ <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200">
+ <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.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 <stdio.h>
+#include <math.h>
+
+int main()
+{
+ int num, res = 0, temp, position = 0;
+ printf("Enter the number : ");
+ scanf("%d", &num);
+ temp = num;
+ while (temp > 0)
+ {
+ position++;
+ temp /= 10;
+ }
+ temp = num;
+ while (temp > 0)
+ {
+ res += (int)pow(temp % 10, position);
+ position--;
+ temp /= 10;
+ }
+ if (res == num)
+ printf("\nInput %d is a Disarium Number.", num);
+ else
+ printf("\nInput %d is Not a Disarium Number.", 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 <stdio.h>
+
+int main()
+{
+ int a, b, i, sa = 0, sb = 0;
+ printf("Enter two number : ");
+ scanf("%d %d", &a, &b);
+ for (i = 1; i <= a / 2; i++)
+ if (a % i == 0)
+ sa += i;
+ for (i = 1; i <= b / 2; i++)
+ if (b % i == 0)
+ sb += i;
+ if (sa == b && sb == a)
+ printf("\nInput %d and %d is Amicable Pair.", a, b);
+ else
+ printf("\nInput %d and %d is Not Amicable Pair.", 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 <stdio.h>
+
+int main()
+{
+ int n, sum = 0, temp = 0, i;
+ printf("Enter the n : ");
+ scanf("%d", &n);
+ for (i = 1; i <= n; i++)
+ {
+ temp += i;
+ sum += temp;
+ }
+ printf("%d", 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 <stdio.h>
+
+int main()
+{
+ int i, j, temp;
+
+ printf("\n\nPattern 1 : \n\n");
+ /*
+ 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 <= 5; i++)
+ {
+ for (j = 1; j <= 5; j++)
+ {
+ printf("%d ", temp);
+ }
+ printf("\n");
+ temp -= 2;
+ }
+
+ // Another method print above pattern
+ printf("\n\nPattern 1 : \n\n");
+ for (i = 9; i >= 1; i -= 2)
+ {
+ for (j = 1; j <= 5; j++)
+ {
+ printf("%d ", i);
+ }
+ printf("\n");
+ }
+
+ printf("\n\nPattern 2 : \n\n");
+ /*
+ 1 2 3 4 5
+ 1 2 3 4 5
+ 1 2 3 4 5
+ */
+ for (i = 1; i <= 3; i++)
+ {
+ for (j = 1; j <= 5; j++)
+ {
+ printf("%d ", j);
+ }
+ printf("\n");
+ }
+
+ printf("\n\nPattern 3 : \n\n");
+ /*
+ 5 4 3 2 1
+ 5 4 3 2 1
+ */
+ for (i = 1; i <= 2; i++)
+ {
+ for (j = 5; j >= 1; j--)
+ {
+ printf("%d ", j);
+ }
+ printf("\n");
+ }
+
+ printf("\n\nPattern 4 : \n\n");
+ /*
+ 1 2 3 4
+ 5 6 7 8
+ 9 10 11 12
+ */
+ temp = 1;
+ for (i = 1; i <= 3; i++)
+ {
+ for (j = 1; j <= 4; j++)
+ {
+ printf("%d ", temp);
+ temp++;
+ }
+ printf("\n");
+ }
+
+ printf("\n\nPattern 5 : \n\n");
+ /*
+ 1 2 3 4
+ 4 8 12 16
+ 1 2 3 4
+ 4 8 12 16
+ 1 2 3 4
+ */
+ for (i = 1; i <= 5; i++)
+ {
+ for (j = 1; j <= 4; j++)
+ {
+ if (i % 2 == 0)
+ printf("%d ", j * 4);
+ else
+ printf("%d ", j);
+ }
+ printf("\n");
+ }
+
+ printf("\n\nPattern 6 : \n\n");
+ /*
+ 1
+ 2 4
+ 3 5 7
+ 6 8 10 12
+ 9 11 13 15 17
+ */
+ int odd = 1, even = 2;
+ for (i = 1; i <= 5; i++)
+ {
+ for (j = 1; j <= i; j++)
+ {
+ if (i % 2 == 0)
+ {
+ printf("%d ", even);
+ even += 2;
+ }
+ else
+ {
+ printf("%d ", odd);
+ odd += 2;
+ }
+ }
+ printf("\n");
+ }
+
+ printf("\n\nPattern 7 : \n\n");
+ /*
+ 1 2 3 4 5
+ 6 7 8 9
+ 10 11 12
+ 13 14
+ 15
+ */
+ temp = 1;
+ for (i = 5; i >= 1; i--)
+ {
+ for (j = 1; j <= i; j++)
+ {
+ printf("%d ", temp);
+ temp++;
+ }
+ printf("\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">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 <stdio.h>
+
+int fact(int);
+int isKrishnamurty(int);
+
+int fact(int n)
+{
+ int fact = 1, i;
+ for (i = 1; i <= n; i++)
+ fact *= i;
+ return fact;
+}
+
+int isKrishnamurty(int n)
+{
+ int temp = n, sum = 0;
+ while (temp > 0)
+ {
+ sum += fact(temp % 10);
+ temp /= 10;
+ }
+ return n == sum;
+}
+
+int main()
+{
+ int n;
+ printf("Enter the number : ");
+ scanf("%d", &n);
+ if (isKrishnamurty(n))
+ printf("\nInput %d is a Krishnamurty Number.", n);
+ else
+ printf("\nInput %d is not a Krishnamurty number.", 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 <stdio.h>
+
+void printFibonacci(int);
+
+void printFibonacci(int n)
+{
+ int val1 = 0, val2 = 1, val3, i;
+ printf("\nFibonacci series upto %d terms :", n);
+ if (n < 0)
+ printf(" N/A");
+ if (n == 0)
+ printf(" %d", val1);
+ if (n > 0)
+ printf(" %d %d", val1, val2);
+ for (i = 2; i <= n; i++)
+ {
+ val3 = val1 + val2;
+ printf(" %d", val3);
+ val1 = val2;
+ val2 = val3;
+ }
+}
+
+int main()
+{
+ int n;
+ printf("Enter the n : ");
+ scanf("%d", &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 <stdio.h>
+
+void swap(int *a, int *b)
+{
+ int temp = *a;
+ *a = *b;
+ *b = temp;
+}
+
+int main()
+{
+ int a, b;
+ printf("Enter A and B: ");
+ scanf("%d %d", &a, &b);
+ printf("\nBefore swap A: %d, B: %d", a, b);
+ swap(&a, &b);
+ printf("\nAfter swap A: %d, B: %d", 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 <stdio.h>
+
+void series(int n)
+{
+ int i;
+ printf("\nSeries: ");
+ for (i = 1; i <= n; i++)
+ printf("%d ", (i * i * i) - 1);
+}
+
+int main()
+{
+ int n;
+ printf("Enter n: ");
+ scanf("%d", &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 <stdio.h>
+
+void displayASCII()
+{
+ int i;
+ printf("ASCII Code\t\tCharacter");
+ for (i = 'A'; i <= 'Z'; i++)
+ printf("\n%c\t\t%d", 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"
+ >
+ ×
+ </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
+ )} — <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>