This project provides simple implementations of a multiplication table generator in Java, Python, and C. Users can input a number and view its multiplication table. The C program is newly added to the repository to enhance functionality and broaden the scope of implementations.
- Input Validation: Ensures user inputs are valid numbers.
- Error Handling:
- Prevents calculating the table for 0.
- Prompts the user if invalid input is detected.
- Iterative Display: Continuously prompts users to input numbers until manually terminated.
- Java (requires JDK 8 or higher)
- Python (requires Python 3 or higher)
- C (requires GCC or compatible compiler)
Ensure you have the following installed:
- Java: Download and Install JDK
- Python: Download Python
- C Compiler: GCC or any compatible compiler (Download GCC)
- Clone the repository or download the Python script.
- Open a terminal and navigate to the script's directory.
- Run the script with the command:
python multiplication_table.py
- Enter a number when prompted, and the multiplication table will be displayed.
- Clone the repository or download the Java file.
- Navigate to the file's directory via terminal or command prompt.
- Compile the Java file with:
javac multiplication_table.java
- Run the compiled file with:
java multiplication_table
- Enter a number when prompted, and the multiplication table will be displayed.
- Clone the repository or download the C file.
- Open a terminal and navigate to the file's directory.
- Compile the program using GCC:
gcc multiplication_table.c -o multiplication_table
- Run the compiled executable:
./multiplication_table
- Enter a number when prompted, and the multiplication table will be displayed.
Table of: 5
Multiplication table
---------------------
1 × 5 = 5
2 × 5 = 10
...
10 × 5 = 50
Contributions are welcome! If you have suggestions for improvements, feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
/~https://github.com/godwin-binoy