Skip to content

TanzeelaFatima492/if-else-condition-in-c-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

If-Else-If Condition in C

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.

📝 Program Overview

  • Takes user input.
  • Evaluates conditions using the if-else-if statement.
  • Displays output based on the given conditions.

🚀 How to Run

Option 1: Compile and Run the Code

  1. Clone this repository:
    git clone https://github.com/Fatima-progmmer/if-else-condition-in-c-.git
  2. Navigate to the directory:
    cd if-else-condition-in-c-
  3. Compile the program:
    gcc program.c -o program
  4. Run the executable:
    ./program

Option 2: Run the Pre-Compiled .exe File (Windows)

  1. Download the program.exe file from this repository.
  2. Double-click to run it.
  3. Follow the on-screen instructions.

📌 Explanation

  • 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.

🤝 Contributing

Feel free to fork this repository and contribute improvements!

📜 License

This project is open-source and free to use.


About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages