This repository contains a C program demonstrating the if-else-if conditional statement. The if-else-if ladder is used to evaluate multiple conditions sequentially.
- Takes user input.
- Evaluates conditions using the if-else-if statement.
- Displays output based on the given conditions.
- Clone this repository:
git clone https://github.com/Fatima-progmmer/if-else-condition-in-c-.git
- Navigate to the directory:
cd if-else-condition-in-c-
- Compile the program:
gcc program.c -o program
- Run the executable:
./program
- Download the
program.exe
file from this repository. - Double-click to run it.
- Follow the on-screen instructions.
- 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.