Welcome to the Loops and Decisions Statement in C repository! This repository contains C programs demonstrating different types of loops and decision-making statements, essential for control flow in C programming.
This repository provides examples of:
✅ Loops: for
, while
, do-while
✅ Decision Statements: if-else
, switch-case
✅ Nested Loops & Conditional Statements
1️⃣ For Loop – Used for a known number of iterations.
2️⃣ While Loop – Repeats until a condition becomes false.
3️⃣ Do-While Loop – Executes at least once before checking the condition.
✔ Using one loop inside another to handle patterns and complex iterations.
✔ If-Else – Executes a block of code based on conditions.
✔ Switch-Case – Replaces multiple if-else
for better readability.
✔ Ternary Operator – A shorthand for simple conditional expressions.
1️⃣ Clone the Repository
git clone https://github.com/Fatima-progmmer/Loops-and-decisions-statement-in-c-
2️⃣ Navigate to the Folder
cd Loops-and-decisions-statement-in-c
Feel free to contribute by improving code, adding comments, or sharing optimized versions.
- Fork the repository
- Make changes and commit
- Submit a pull request 🚀