Skip to content

23BCNB04 #18

@Ctrl-arbox

Description

@Ctrl-arbox

The program successfully adds two integers and prints the result. However, the absence of getch(); causes the console window to close immediately in some environments, preventing users from seeing the output.

Why the Issue Needs to Be Fixed: Without getch();, users may not be able to view the program’s output before the window closes, especially when using Turbo C or similar compilers. Adding getch(); ensures the output remains visible until the user presses a key.

How to Reproduce (For Bugs):
-Compile and run the program using Turbo C or Dev-C++.

-Observe that the console window closes immediately after execution.

Other Notes & Environmental Info
OS: Windows

Compiler: Turbo C / Dev-C++

Version: Any version that supports conio.h

Suggested Fix: Add getch(); before the closing } to keep the output window open.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions