bsc

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

commit 2af35081ce1f6d306b300952c6cc85796a0eb59b
parent 37ccf121bb5b08e6c7089e726763ae7d1210fc00
Author: Amit Dutta <amitdutta4255@gmail.com>
Date:   Thu,  6 Nov 2025 20:53:14 +0530

new -06112025 _APC-PRAC-015 to _APC-PRAC-018

Diffstat:
MREADME.md | 2+-
Mdocs/index.html | 182++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Atuition-c/APC-PRAC-015.c | 35+++++++++++++++++++++++++++++++++++
Atuition-c/APC-PRAC-016.c | 28++++++++++++++++++++++++++++
Atuition-c/APC-PRAC-017.c | 29+++++++++++++++++++++++++++++
Atuition-c/APC-PRAC-018.c | 32++++++++++++++++++++++++++++++++
6 files changed, 306 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md @@ -4,7 +4,7 @@ This project is licensed under the MIT License – see the [LICENSE](LICENSE) fi --- 🔗 **Website** For better viewing experience: -👉 [https://aranag.site/bsc](https://aranag.site/bsc) or [https://notamitgamer.github.io/bsc](https://notamitgamer.github.io/bsc) +👉 [https://aranag.site/bsc](https://aranag.site/bsc) or [https://notamitgamer.github.io/bsc](https://notamitgamer.github.io/bsc) (Synced) --- diff --git a/docs/index.html b/docs/index.html @@ -4349,7 +4349,7 @@ int main() <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">(78 files)</span> + <span class="ml-2 text-sm text-gray-500">(82 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"> @@ -4862,6 +4862,186 @@ int main() <li> <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-015.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-015.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-015_c', 'APC-PRAC-015.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-015_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-015.c"> + <pre><code class="language-c">/* Write a program to display all numbers between lb (lower bound) and up (upper bound) +which ends with digit 7 or divisible by 7. */ +/* Author - Amit Dutta, Date - 06th November, 2025 */ +// File Name - amit0611202501.c (LAB), APC-PRAC-015.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int lb, ub, i; + printf(&quot;Enter the lb, ub : &quot;); + scanf(&quot;%d %d&quot;, &amp;lb, &amp;ub); + printf(&quot;\nEnds with 7 :&quot;); + for (i = lb; i &lt;= ub; i++) + { + if (i % 10 == 7) + { + printf(&quot; %d&quot;, i); + } + } + printf(&quot;\nDivisible by 7 :&quot;); + for (i = lb; i &lt;= ub; i++) + { + if (i % 7 == 0) + { + printf(&quot; %d&quot;, i); + } + } + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-016.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-016.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-016_c', 'APC-PRAC-016.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-016_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-016.c"> + <pre><code class="language-c">/* Write a program to check palindrome number. */ +/* Author - Amit Dutta, Date - 06th November, 2025 */ +// File Name - amit0611202502.c (LAB), APC-PRAC-016.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int num, temp, rev = 0; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + temp = num; + while (temp &gt; 0) + { + rev = (rev * 10) + (temp % 10); + temp /= 10; + } + if (rev == num) + printf(&quot;\nInput %d is a palindrome number.&quot;, num); + else + printf(&quot;\nInput %d is not a palindrome number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-017.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-017.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-017_c', 'APC-PRAC-017.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-017_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-017.c"> + <pre><code class="language-c">/* Write a program to check perfect number. */ +/* Author - Amit Dutta, Date - 06th November, 2025 */ +// File Name - amit0611202503.c (LAB), APC-PRAC-017.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; + +int main() +{ + int num, i, divisibleSum = 0; + printf(&quot;Enter a number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + for (i = 1; i &lt;= num / 2; i++) + { + if (num % i == 0) + { + divisibleSum += i; + } + } + if (divisibleSum == num) + printf(&quot;\nInput %d ia a Perfect Number.&quot;, num); + else + printf(&quot;\nInput %d is NOT a Perfect Number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> + <span class="text-gray-700">APC-PRAC-018.c</span> + <div class="ml-auto flex items-center space-x-4"> + <a href="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-018.c" target="_blank" class="p-1 rounded-full text-gray-500 hover:bg-gray-200 hover:text-gray-800 transition-colors" title="View file on GitHub"> + <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.168 6.839 9.492.5.092.682-.217.682-.482 0-.237-.009-.868-.014-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.031-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.03 1.595 1.03 2.688 0 3.848-2.338 4.695-4.566 4.942.359.308.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.001 10.001 0 0022 12c0-5.523-4.477-10-10-10z" clip-rule="evenodd"></path></svg> + </a> + <button onclick="showCode('code-tuition-c-APC-PRAC-018_c', 'APC-PRAC-018.c')" class="text-green-600 font-semibold text-sm hover:underline">View Code</button> + </div> + </div> + <div id="code-tuition-c-APC-PRAC-018_c" class="hidden" data-github-url="https://github.com/notamitgamer/bsc/blob/main/tuition-c/APC-PRAC-018.c"> + <pre><code class="language-c">/* Write a program to check Automorphic Number. */ +/* Author - Amit Dutta, Date - 06th November, 2025 */ +// File Name - amit0611202504.c (LAB), APC-PRAC-018.c (Local) + +// This code has not been compiled. +// If you find any issues, please create a new issue on GitHub regarding them. +// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues + +#include &lt;stdio.h&gt; +#include &lt;math.h&gt; + +int main() +{ + int num, square, count = 0, temp, modNum; + printf(&quot;Enter the number : &quot;); + scanf(&quot;%d&quot;, &amp;num); + square = (int)pow(num, 2); + temp = num; + while (temp &gt; 0) + { + temp /= 10; + count++; + } + modNum = (int)pow(10, count); + temp = square % modNum; + if (num == temp) + printf(&quot;\nInput %d is a Automorphic Number.&quot;, num); + else + printf(&quot;\nInput %d is a Automorphic Number.&quot;, num); + return 0; +}</code></pre> + </div> + </li> + + <li> + <div class="flex items-center p-3 pl-8 hover:bg-gray-50 transition-colors duration-200"> + <svg class="w-6 h-6 text-green-500 mr-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg> <span class="text-gray-700">APC-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"> diff --git a/tuition-c/APC-PRAC-015.c b/tuition-c/APC-PRAC-015.c @@ -0,0 +1,34 @@ +/* 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; +}+ \ No newline at end of file diff --git a/tuition-c/APC-PRAC-016.c b/tuition-c/APC-PRAC-016.c @@ -0,0 +1,27 @@ +/* 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; +}+ \ No newline at end of file diff --git a/tuition-c/APC-PRAC-017.c b/tuition-c/APC-PRAC-017.c @@ -0,0 +1,28 @@ +/* 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; +}+ \ No newline at end of file diff --git a/tuition-c/APC-PRAC-018.c b/tuition-c/APC-PRAC-018.c @@ -0,0 +1,31 @@ +/* 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; +}+ \ No newline at end of file
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror