This repository contains a C program that takes user input for multiple values and applies the following mathematical formulas:
- Formula 1:
a + (b - c / d) + ++num
- Formula 2:
num1 + num2 / num3 + num + num2++
- Formula 3:
(m + n) / (p + amount)
- Compile the program using a C compiler (e.g.,
gcc
). - Run the executable file.
- Enter values when prompted.
- The program will display the results of each formula.
gcc formula_calculations.c -o formula_calculations
./formula_calculations
- Formula 3 handles division by zero by checking if the denominator is zero before performing the operation.
- Ensure valid inputs to avoid unexpected behavior.