This repository contains a C program demonstrating the if-else-if conditional statement. The if-else-if ladder is used when multiple conditions need to be checked sequentially.
- The program takes user input.
- It evaluates conditions using the if-else-if statement.
- It prints different outputs based on the given conditions.
- Clone this repository:
git clone https://github.com/Fatima-progmmer/If-else-if-condition-in-C.git
- Navigate to the directory:
cd If-else-if-condition-in-C
- Compile the program:
gcc program.c -o program
- Run the executable:
./program
- if (num > 0) → Executes if the number is positive.
- else if (num < 0) → Executes if the number is negative.
- else → Executes when the number is zero.
Feel free to fork this repository and contribute improvements!
This project is open-source and free to use.