#Test case
1 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @tranquil quail! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
perhaps the tester is providing input in a different format than what you're giving in console?
im not sure because why is it able to print everything else but once it gets to the println statment to enter the name, it just is not appearing?
because the tester might be giving a different format...
if it gives everything on a single line, then your code will hang waiting for input
read the problem description of how the input will be given
This is what the question says:
The program should print out information about the name of the trader, how many glarbs of each element the trader can afford given input about the cost of Qbitium and Nvidiam and how many total GPUs will be offered in the trade. You may assume the user will enter only whole number values less than or equal to 100,000 for the number of GPUs to trade. You may assume the user will enter only appropriate whole number values for the price of Qbitium and Nvidiam. And the sample runs of the program show: Sample runs of the program(the numbers typed in by the user are shown in bold)
Enter the number of GPU(s) to trade:
1234
Enter the number of GPUs to purchase 1 glarb of Qbitium://(NO WHITESPACE HERE!!)
50
Enter the number of GPUs to purchase 1 glarb of Nvidiam://(NO WHITESPACE HERE!!)
8
Enter the first and last name of the trader://(NO WHITESPACE HERE!!)
Spacey Cadet
Spacey Cadet traded 1234 GPU(s) for://(NO WHITESPACE HERE!!)
24 glarb(s) of Qbitium, 4 glarb(s) of Nvidiam, 0 glarb(s) of Vegiam, and 1 glarb(s) of Cryptodium
Spacey Cadet will have 0 GPU(s) leftover.
for debugging, try capturing what the plain in.nextLine() and printing it out
its still not working. Just not printing anything in the test case past the number of nvidam no matter what i add under.
Before your post will be closed, would you like to express your gratitude to any of the people who helped you? When you're done, click I'm done here. Close this post!.