Problem description:
In at least C++ and Java, the output is broken.
Expected behavior:
For example, using a standard competitive programming input with the first line being the number of test cases, and then the following lines being test cases, the code should print out a result for each of the test cases.
Actual behavior:
The code does not print out the last lest case result. It also does not put the first test case on a new line (it leaves it on the last line of the input instead). This is a change from just 8 days ago, when a previous program (I wrote) worked for the competitive programming problem. Now it does not because of the output issues mentioned.
Steps to reproduce:
- Create a program in C++ or Java
- Create 1 variable that stores the inputted number of test cases (I use cin for C++ and Scanner(System.in) for Java)
- Create a variable to take input
- Create a for-loop that runs from 0 to number of test cases
- Inside the for-loop, take input and store it in the variable from step 3
- Inside the for-loop, print the variable
- Run the program and paste (shift + ctrl + v) in this input:
5
zero
one
two
three
four
- Notice how “four” isn’t printed
Bug appears at this link:
https://replit.com/@Illuminara34/Discovering-Planets-CodeQuest#Main.java
Input:
4
13.81 true true 0.0167
-12.51 true true 0.6124
53.4 false true 0.5116
23.1 true true 0.7234
Expected Output (output as of 09/16/2023):
The planet is habitable.
The planet is too cold.
The planet has no water.
The planet's orbit is not ideal.
Actual Output (output as of 09/24/2023):
The planet is habitable.
The planet is too cold.
The planet has no water.
This bug shows up on both iPadOS and Windows 11 computer
Browser: Safari & Chrome
OS: Windows 11
Device (Android, iOS, NA leave blank): iOS
Desktop app version (Avatar menu->“Version”) or NA: NA
Plan (Free, Hacker, Pro Plan): Free