Skip to content

nguyenlamminhhoa/Lab-1_Large_Integer_Arithmetic_Expression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Large Integer Arithmetic Expression - ADS Lab 1

Overview

This repository contains the implementation for Lab 1 of the Advanced Data Structures (ADS) course: Large Integer Arithmetic Expression. The main goal of this project is to compute arithmetic expressions involving large integers that exceed the default data types' capacity in most programming languages.

Features

  • Support for Large Integers: Handles arithmetic operations for integers larger than standard data types (int, long, etc.).
  • Expression Evaluation: Parses and evaluates arithmetic expressions including addition, subtraction, multiplication, and division.
  • Input Validation: Checks for valid input expressions and provides error messages for invalid syntax or unsupported operations.
  • Efficient Algorithms: Utilizes efficient data structures and algorithms to optimize computation for large numbers.

Getting Started

Prerequisites

  • A C++ compiler (e.g., GCC, Clang, MSVC)
  • Basic knowledge of C++ programming
  • C++ Standard Library

Installation

  1. Compile the source code:

    g++ 10422030.cpp -o 10422030
  2. Run the program:

    ./10422030 tests.txt output_10422030.txt
  • If you want to change the ID, you shoud change the code in .cpp file

Usage

  • Input: Enter arithmetic expressions with large integers (e.g., 12345678901234567890 + 98765432109876543210).
  • Output: The program will display the computed result.

Example:

Input: 99999999999999999999 * 88888888888888888888
Output: 8888888888888888888711111111111111111112

Algorithms

  • BigInteger Class: Implements addition, subtraction, multiplication, and division for large integers using arrays or vectors to store digits.
  • Expression Parsing: Uses stack-based parsing or recursive descent to evaluate arithmetic expressions.

License

This project is licensed under the Attribution-ShareAlike 4.0 International License.

Author

  • Author: Nguyen Lam Minh Hoa
  • Instructor: Dr. Bui Van Thach

Acknowledgements

  • Advanced Data Structures course materials
  • Open-source C++ resources and tutorials

Citation

If you use this work, please cite:

Nguyen Lam Minh Hoa. (2025). Lab-1: Large Integer Arithmetic Expression (Software) [Version 1.0.1]. Zenodo. https://doi.org/10.5281/zenodo.1234567

DOI

About

This is the Complete Lab 1 from the Algorithms and Data Structure course

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages