Made by : Sara Walid - Khadija Eshra - Shawky Ebrahim
Requested by: Dr. Mohammed El-Ramly in Structured Programming course.
This program is a simple rational number calculator that performs basic arithmetic operations on rational numbers. It allows you to input a rational number expression and calculates the result. The rational numbers are represented as pairs of integers, where the first integer represents the numerator and the second integer represents the denominator.
- make_variables(): Clears all variables and prepares for a new input.
- take_input(): Takes user input for the rational number expression.
- is_valid(): Validates the input expression for any invalid characters or syntax errors.
- solve(): Breaks down the expression into individual blocks and performs the arithmetic operations.
- print_solution(): Prints the final simplified result of the expression.
- start(): Starts the calculation process by calling the necessary functions based on user input.
The code uses the C++ Standard Template Library (STL) and requires the <bits/stdc++.h> header, which may not be available in all C++ compilers.