commit a9c53a0067912b3a3b490e21cc78d65a6efb3c0a
parent 91bf9e5dfb414f59f2d6cc5f74a2bc927532db7b
Author: Amit Dutta <amitdutta4255@gmail.com>
Date: Mon, 20 Oct 2025 18:39:31 +0530
new code, index
Diffstat:
4 files changed, 209 insertions(+), 1 deletion(-)
diff --git a/docs/index.html b/docs/index.html
@@ -720,7 +720,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">letusc</span>
- <span class="ml-2 text-sm text-gray-500">(42 files)</span>
+ <span class="ml-2 text-sm text-gray-500">(45 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">
@@ -2459,6 +2459,131 @@ 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">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">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">
diff --git a/letusc/luc034.c b/letusc/luc034.c
@@ -0,0 +1,20 @@
+/* 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;
+}+
\ No newline at end of file
diff --git a/letusc/luc035.c b/letusc/luc035.c
@@ -0,0 +1,25 @@
+/* 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;
+}+
\ No newline at end of file
diff --git a/letusc/luc036.c b/letusc/luc036.c
@@ -0,0 +1,35 @@
+/* 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;
+}+
\ No newline at end of file