Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how to input my program to see the result

+8 votes
asked Jun 12, 2025 by Melody Annoh (200 points)

3 Answers

0 votes
answered Jun 20, 2025 by Peter Minarik (101,340 points)

You can get input for the console most of the time. Of course, you could get user input from other sources as well, such as the mouse, the microphone, various game controllers, and whatnot. Online GDB runs on a remote server, so we're limited to console (standard input).

You have various functions in various languages. For instance, in Python, you'd use input(). In C, you'd use scanf().

What's your language?

0 votes
answered Feb 18 by gta6isnotfree (430 points)

Simply use your language's built-in input function in your code, then when you click Run, type your input directly into the console at the bottom of the screen and press Enter.

+1 vote
answered Feb 20 by Haadi Mohiuddin (160 points)

Simply type your input code (for Python, use input(), for Java, import java.util.Scanner; then define Scanner variable_name_here = new Scanner). No matter the language, there will be a cursor blinking, indicating a place to type. Click there, type your input and watch your code run!

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...