🔵 Day 42 of #100DaysOfCode Today I built a simple yet powerful C program that calculates the missing properties of a circle—radius, circumference, or area—based on user input. 💡 The program uses: fgets() for safer string input switch-case for clean decision logic math.h for square root calculations A custom-defined PI constant for precision 🧮 Whether you input the radius, circumference, or area, the program computes the other two values instantly. It’s a neat way to reinforce geometry concepts while practicing input handling and conditional logic in C. ✅ Feeling more confident with user-driven logic and modular design. Let’s keep the momentum going! #CProgramming #CodeNewbie #LearnToCode #CodingJourney kirti singh
More Relevant Posts
-
🌀 Day 48 of #100DaysOfCode Today I tackled a visually satisfying challenge—generating a Spiral Matrix in C! The program dynamically fills an n x n matrix in a clockwise spiral pattern using boundary pointers (top, bottom, left, right) and a value counter. It’s a great exercise in mastering loop control and matrix traversal. ✨ Highlights: Clean logic using layered loops Dynamic matrix filling without recursion Output beautifully formatted for clarity 🔢 Input: Matrix size n (1–20) 📤 Output: Spiral matrix printed with aligned values 📌 Perfect for practicing: Array manipulation Loop boundaries Visual formatting in C #CProgramming #Day48 #CodingChallenge #LearnByDoing #VisualAlgorithms #CodeCraft
To view or add a comment, sign in
-
I solved Matrix Multiplication using 2D Arrays in C! 💻 It was a big and challenging code, but I enjoyed solving it and improving my understanding of arrays and loops. Step by step, I’m getting better at problem-solving and logic building. 🚀enter the 1th matrix row and column: 3 enter the 1th matrix column: 3 enter the elements 1th matrix: 1 2 3 4 5 6 7 8 9 enter the 2th matrix row: 3 enter the 2th matrix column: 3 enter the elements 2th matrix: 9 8 7 6 5 4 8 9 7 the result of matrices: 45 45 36 114 111 90 183 177 144 #CProgramming #Arrays #CodingJourney #LearningEveryday
To view or add a comment, sign in
-
🎯 Day 9 of my #120DaysCodingChallenge 💡 Problem: Palindrome Number (LeetCode – Easy) Given an integer x, the task is to determine whether it reads the same backward as forward. For example: 121 → ✅ Palindrome -121 → ❌ Not a palindrome 10 → ❌ Not a palindrome 🧠 My Approach: I solved this problem using the string conversion method in C for clarity and simplicity. 🔹 First, I handled negative numbers since they can’t be palindromes. 🔹 Then, I converted the integer into a string using sprintf(). 🔹 Using two-pointer logic, I compared characters from the start and end of the string — moving inward until all pairs matched. 🔹 If all corresponding digits matched, the number was a palindrome. ⚙️ Time Complexity: O(n) ⚙️ Space Complexity: O(n) 💬 Takeaway: This problem reinforced how string manipulation and two-pointer logic can simplify palindrome checks. In future, I’ll explore the mathematical approach (without converting to string) for better space efficiency. #Day9 #CodingChallenge #LeetCode #CProgramming #PalindromeNumber #100DaysOfCode #LearningInPublic #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Avoid Unnecessary Value Copies in Go Programming When performance and memory efficiency matter, Go’s pointer feature shines! Instead of passing values around and creating extra copies, use pointers to mutate values directly in memory. This simple shift improves both speed and memory usage, while keeping Go’s safety and simplicity intact. func addition2(a *int) { *a = *a + 18 } 📝 Note: Performing arithmetic operations directly on a pointer variable is not possible in Go — it’s designed to prevent unsafe memory access. ✅ No redundant copies ✅ Direct memory access ✅ Clean, efficient, and idiomatic Go Leverage pointers — not for complexity, but for clarity and performance.
To view or add a comment, sign in
-
🔥𝐅𝐫𝐨𝐦 𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐭𝐨 𝐑𝐞𝐚𝐥𝐢𝐭𝐲: Watch a Digital Twin in Action! This demo video showcases a complete end-to-end workflow for implementing a digital twin, starting with a 3D mechanical FEA model, transforming it into a Reduced Order Model (ROM), connecting it to real hardware, and deploying the final solution as a lightweight Python web application using PyTwin. 💡A powerful example of how physics-based modeling and real-time data integration drive smarter engineering decisions.
To view or add a comment, sign in
-
📅 Day 63 of #100DaysOfCode Today’s challenge was all about matrix manipulation in C! I built a simple yet powerful program that: ✅ Accepts a 3×3 matrix from user input ✅ Displays the original matrix in formatted output ✅ Computes and prints its transpose by swapping rows and columns This exercise reinforced my understanding of 2D arrays, nested loops, and matrix operations—core concepts in both math and programming. It’s a great stepping stone toward more advanced topics like matrix multiplication and determinants. Let’s keep the momentum going! 🚀 #CProgramming #MatrixTranspose #CodeNewbie #LearnToCode #DailyCoding #CodingChallenge #TechJourney #100DaysChallenge #CodeWithAnmol #VisualCoding #2DArrays #TransposeMatrix #Day63
To view or add a comment, sign in
-
💡Curious how a digital twin goes from a detailed FEA simulation to a deployed, hardware-connected web app? 👇 🔹 Start with a Mechanical model 🔹 Build a Reduced Order Model (ROM) 🔹 Connect to real hardware 🔹 Deploy with PyTwin in a simple Python web interface This is an example of how simulation, reduced-order modeling, and real-time data come together to power engineering decisions at the speed of innovation. #DigitalTwin #Ansys #EngineeringInnovation #ROM #PyTwin
To view or add a comment, sign in
-
🎯 Day 49 - DSA Update 🌟 🔢 Problem Solved: Matrix Diagonal Sum Today I solved the Matrix Diagonal Sum problem — a simple yet insightful challenge to practice working with 2D arrays and index patterns in square matrices. ✅ Approach 1- The matrix is square, so rows = columns = n. 2- Initialize three variables: sumDiagonal1 = 0 sumDiagonal2 = 0 totalSum = 0 3- Traverse the matrix with one loop i from 0 to n-1: => Primary diagonal: sumDiagonal1 += matrix[i][i] => Secondary diagonal: sumDiagonal2 += matrix[i][n - i - 1] 4- Add both diagonals: => totalSum = sumDiagonal1 + sumDiagonal2 5- If n is odd, the center element gets counted twice. => Adjust by subtracting it once: totalSum -= matrix[n/2][n/2] => Used bitwise check (n & 1) instead of modulus for efficiency. ⚙️ Complexity Time Complexity: O(n) Space Complexity: O(1) 💡 Key Insight A neat example of combining logic, pattern observation, and optimization — especially using bitwise operations instead of modulus. #DSA #Coding #ProblemSolving #Algorithms #LearningEveryday #Programming #LogicBuilding
To view or add a comment, sign in
-
-
🧠 Day 52 of #100DaysOfCode Today I built a Magic Square Generator in C! ✨ Given an odd number n\geq 3, the program constructs an n\times n grid where the sum of every row, column, and diagonal equals the magic constant. Used the Siamese method to place numbers smartly—moving up and right, wrapping around, and stepping down when blocked. Loved the clean logic and the satisfying symmetry in the final output. Perfect for showcasing matrix manipulation and modular arithmetic! 🔢 Magic Constant: n(n^2+1)/2 📐 Output is neatly formatted for visual clarity. #CProgramming #CodeSymmetry #100DaysOfCode #Day52 #CodingChallenge #LearnByBuilding
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
Good going Dear, keep it up!!