Skip to content

[OTHER]style: Remove interactive console input from extended_euclid_algorithm.cpp to fix CI compatibility #3190

Description

@2501200112-Kunal

What would you like to share?

Description of the Issue

While reviewing files within the math/ directory to verify alignment with the repository's strict automation standards, I found that math/extended_euclid_algorithm.cpp contains interactive console stream dependencies (std::cin >> a >> b;) inside its main() block.

According to the repository's official contributing documentation, interactive prompt controls are explicitly restricted because headless continuous integration (CI) environments cannot simulate human keystrokes during pipeline validation passes. All active codebase additions must rely exclusively on deterministic self-contained assertions.

Proposed Refactoring Blueprint

  1. Extract and eliminate all std::cin parameter capture statements from the runtime thread.
  2. Structure a dedicated, non-interactive static void test() function incorporating explicit test matrix scenarios for the extendedEuclid routine.
  3. Establish verification points using standard <cassert> (assert()) macros to confirm core algorithmic correctness dynamically.
  4. Execute test() within main() to complete programmatic execution silently and cleanly.

Academic Verification Notice

This contribution is being submitted as part of a formal university open-source evaluation requirement. I have fully formulated and tested this exact structural adjustment locally against the C++11 standard and am ready to submit a clean, compilation-verified Pull Request immediately upon assignment.

Please assign this tracking issue to my account. Thank you!

Additional information

This task addresses explicit code cleanup to aid automated workspace pipelines. The requested adjustments do not alter the underlying logic of the Extended Euclidean calculation, but optimize the file interface to seamlessly support non-interactive test runs.

Metadata

Metadata

Labels

awaiting triageAwaiting triage from a maintainer

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions