Program Input And Output — Fixed And Improved
Programs that read input (a name, a number, a password) could show wrong results in the old compiler. Today's update fixes that and makes input work like a real terminal.
Open the CONNECT SRMAP Compiler: https://oursrmap.purlyedit.in/compiler/index.php
1. Input Asked Only When Needed
You do not fill anything in before you run.
Press Run.
When the program asks a question, a box appears in the Output tab right under that question.
Type your answer and press Enter.
The program runs again with your answers, and each answer appears after its question.
Press Done to close the box.
An amber Input needed status means the program is waiting for you. It is not an error.
The Input tab is still there if you want to prepare several values in advance, one per line.
2. The Wrong-Output Bug Is Fixed
Typed input could previously reach the program with a hidden extra character at the end of every line. A correct program could then give a wrong answer. For example, a login program comparing your input with "nani" would never match and always print "Invalid user!".
Input now reaches your program exactly as typed, for every language.
3. Java Now Works With Your Code
Your class can have any name. The compiler takes care of the main-class requirement.
Programs that read input with
Scannernow wait for your input instead of showing a red failure with a stack trace.Several classes in one file work.
Java is compiled before it runs, so it can take a little longer than other languages.
4. Python Input Handling
Programs that read input with
input()now get the input box at the right moment, even when your code usestry / exceptaround the input.Your typed answers appear right after each question.
5. C, C++ and PHP
These languages show the input box when the program appears to need input. A small Input used line under the output lists what was sent.
6. Easier-to-Read Results
A green Finished successfully banner or a red Exited with code banner closes each run.
Error lines are clickable and jump to the exact line.
Use Copy to copy the output, and the bin icon to clear it.
Frequently Asked Questions
Q1. Why does my program start again after each answer?
Each answer is sent together with the earlier ones, and the program runs again from the start. The typed answers are shown in the output, so it reads like one session.
Q2. The input box did not appear.
Open the Input tab, type your values one per line, and press Run. This always works.
Q3. What does "Input needed" mean?
Your program reached a question and is waiting. Type your answer in the box under the output.
Q4. My old program printed wrong results before. Is it fixed?
Yes. Run it again. If it still looks wrong, check the Input tab to see what was sent.
Need Help?
Email: connectsrmap@purlyedit.in
Help Center: https://oursrmap.purlyedit.in/guide/help_center
PAGE URL: https://oursrmap.purlyedit.in/guide/help_center