A collection of simple yet fundamental programs written in C, showcasing basic programming concepts like loops, functions, and user input handling. These projects are great for beginners who want to explore C programming.
- Description: Calculates the factorial of a given number using loops or recursion.
- How to Run:
- Compile the program:
gcc factorial.c -o factorial
- Run the executable:
./factorial
- Enter a number to calculate its factorial.
- Compile the program:
- Description: Prints the Fibonacci sequence up to a given number of terms.
- How to Run:
- Compile the program:
gcc fibonacci.c -o fibonacci
- Run the executable:
./fibonacci
- Enter the number of terms to generate the sequence.
- Compile the program:
- Description: A simple game where the user guesses a random number generated by the computer.
- How to Run:
- Compile the program:
gcc number_guess.c -o number_guess
- Run the executable:
./number_guess
- Follow the prompts to guess the number.
- Compile the program:
- Description: A basic calculator that performs addition, subtraction, multiplication, and division.
- How to Run:
- Compile the program:
gcc calculator.c -o calculator
- Run the executable:
./calculator
- Enter two numbers and choose an operation.
- Compile the program:
- GCC compiler or any other C compiler.
- Compatible with Linux, Windows, or MacOS.