commit 80d1bf6828c64ea8b5b595b4ad7c889715d895a1
parent 9cd07e8e30cd0db0322039278274510e3a02b43b
Author: Amit Dutta <amitdutta4255@gmail.com>
Date: Tue, 2 Jun 2026 14:35:00 +0530
new automation
Diffstat:
10 files changed, 106 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
@@ -4,12 +4,10 @@ on:
push:
branches:
- main
- # Crucial: This prevents an infinite loop when the bot pushes the new docs folder
paths-ignore:
- 'docs/**'
- workflow_dispatch: # Allows you to run this manually from the Actions tab
+ workflow_dispatch:
-# Grants the action permission to push commits back to the repo
permissions:
contents: write
@@ -30,9 +28,10 @@ jobs:
pip install zensical
pip install mkdocs-awesome-pages-plugin
- # Uncomment the next two lines if your Python script needs to run BEFORE Zensical builds
- # - name: Run Python Generator Script
- # run: python md.py
+ - name: Run Python Generator Scripts
+ run: |
+ python list.py
+ python md.py
- name: Delete old docs folder
run: rm -rf docs
@@ -45,18 +44,15 @@ jobs:
- name: Commit and Push changes
run: |
- # Set up the bot's git identity
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- # Stage the new docs folder
git add docs/
-
- # Only commit and push if there are actual changes
+
if ! git diff-index --quiet HEAD; then
git commit -m "chore: auto-generate GitHub Pages docs"
git push
echo "Successfully built and pushed new docs folder."
else
echo "No changes to docs detected, skipping commit."
- fi
+ fi+
\ No newline at end of file
diff --git a/utils/list.py b/list.py
diff --git a/utils/md.py b/md.py
diff --git a/semester_1/assignment-primary/front_page1.docx b/semester_1/assignment-primary/front_page1.docx
Binary files differ.
diff --git a/semester_1/practice-c/external_1.c b/semester_1/practice-c/external_1.c
@@ -0,0 +1,33 @@
+// 1. Write a program to print the sum and product of digits of an integer.
+
+#include<stdio.h>
+
+int sum(int);
+int product(int);
+
+int main() {
+ int num;
+ printf("Enter a positive integer: ");
+ scanf("%d", &num);
+ printf("\nSum of the integer is %d", sum(num));
+ printf("\nProduct of the integer is %d", product(num));
+ return 0;
+}
+
+int sum(int num) {
+ int s = 0;
+ while (num != 0) {
+ s += num % 10;
+ num = num / 10;
+ }
+ return s;
+}
+
+int product(int num) {
+ int pro = 1;
+ while(num != 0) {
+ pro *= num % 10;
+ num /= 10;
+ }
+ return pro;
+}
diff --git a/semester_1/practice-c/external_1.exe b/semester_1/practice-c/external_1.exe
Binary files differ.
diff --git a/semester_1/practice-c/external_2.c b/semester_1/practice-c/external_2.c
@@ -0,0 +1,23 @@
+// 2. Write a program to reverse a non-negative integer.
+
+#include<stdio.h>
+
+int reverse(int);
+
+int main() {
+ int num;
+ printf("\nEnter a non-negative integer: ");
+ scanf("%d", &num);
+ if(num < 0) num = -num;
+ printf("\nReverse number: %d", reverse(num));
+ return 0;
+}
+
+int reverse(int num) {
+ int rev = 0;
+ while(num > 0) {
+ rev = (rev * 10) + num % 10;
+ num/= 10;
+ }
+ return rev;
+}
diff --git a/semester_1/practice-c/external_2.exe b/semester_1/practice-c/external_2.exe
Binary files differ.
diff --git a/university_files/front_page1.pdf b/university_files/front_page1.pdf
Binary files differ.
diff --git a/university_files/questons b/university_files/questons
@@ -0,0 +1,41 @@
+1. Write a program to print the sum and product of digits of an integer.
+2. Write a program to reverse a non-negative integer.
+3. Write a program to compute the sum of the first n terms of: S = 1 - 2 + 3 - 4 + 5…
+4. Write a function to find whether a given number is prime or not. Use it to generate prime numbers less than 100.
+5. Write a function that checks whether a given string is a Palindrome or not.
+6. Write a program to compute the factors of a given number.
+7. Write a program to swap two numbers using a macro.
+8. Write a program to print a triangle of stars (take number of lines from user).
+9. Write a program to perform the following actions on a user-entered array:
+ - Print even-valued elements
+ - Print odd-valued elements
+ - Calculate sum and average
+ - Print maximum and minimum element
+ - Remove duplicates
+ - Print array in reverse order
+10. Write a program that prints a table of occurrences of each alphabet in text entered as command line arguments.
+11. Write a program that swaps two numbers using pointers.
+12. Write a program where a function passes the address of two variables and alters their contents.
+13. Write a program that takes the radius of a circle as input, passes it to a function that computes area and circumference, and displays the values from main().
+14. Write a program to find the sum of n elements entered by the user using dynamic memory allocation (malloc/calloc or new).
+15. Write a menu-driven program to perform the following string operations:
+ - Show address of each character
+ - Concatenate two strings without strcat
+ - Concatenate two strings using strcat
+ - Compare two strings
+ - Calculate length using pointers
+ - Convert to uppercase
+ - Convert to lowercase
+ - Count vowels
+ - Reverse the string
+16. Given two ordered arrays of integers, write a program to merge them into an ordered array.
+17. Write a program to display Fibonacci series (i) using recursion, (ii) using iteration.
+18. Write a program to calculate Factorial (i) using recursion, (ii) using iteration.
+19. Write a program to calculate GCD of two numbers (i) with recursion, (ii) without recursion.
+20. Write a menu-driven program for Matrix operations: a) Sum b) Difference c) Product d) Transpose.
+21. Copy contents of one text file to another after removing all whitespaces.
+22. Write a function that reverses elements of an array in place, accepting only one pointer value and returning void.
+23. Write a program that reads 10 integers into an array (implemented using pointers) and prints elements in ascending and descending order.
+24. Add two distances in a meter-kilometer system using structures.
+25. Add two complex numbers using structures.
+26. Calculate the difference between two time periods using structures.+
\ No newline at end of file