Java DSA Day 10: Loops & Conditional Logic with Divisibility

🚀 Day 10 / 180 – DSA with Java 🚀 📘 Topic Covered: Loops & Conditional Logic 🧩 Problem Solved: Sum of Multiples Problem: Given an integer n, calculate the sum of all numbers from 1 to n that are divisible by 3, 5, or 7. Approach: Iterated from 1 to n and checked divisibility conditions. If a number was divisible by 3, 5, or 7, added it to the running sum. Key Learning: ✔️ Strengthening fundamentals with loops and conditions ✔️ Writing clean and readable logic ✔️ Importance of handling multiple conditions efficiently If you’re also preparing for DSA, let’s connect and learn together 🤝 #DSA #Java #180DaysOfCode #LearningInPublic #ProblemSolving #Consistency 

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories