C# Auction problem | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

C# Auction problem

https://code.sololearn.com/cIsjhaYEXKfs/?ref=app Any pointers in the right direction would be appreciated.

16th Oct 2020, 2:30 PM
Nick Thomas
Nick Thomas - avatar
8 Respostas
+ 1
while(true) not works here on Playground. The input for data here has to be finally and at the beginning before calculate.
16th Oct 2020, 2:33 PM
JaScript
JaScript - avatar
+ 3
This is how it works: while(true) { int bid = Convert.ToInt32(Console.ReadLine()); if(bid >= maxBid) { Console.WriteLine("Sold: {0}", bid); break; } }
24th Jan 2021, 12:44 PM
Manuel
+ 1
it doesnā€™t work on the code coach either?
16th Oct 2020, 2:35 PM
Nick Thomas
Nick Thomas - avatar
+ 1
It also donā€˜t work on the code coach.
16th Oct 2020, 2:39 PM
JaScript
JaScript - avatar
+ 1
Thank you for letting me know, it is frustrating that it is included if it cannot be completed! I have spent hours trying to figure out what Iā€™m doing wrong. From reading the code, do you know if it would be correct? Or could you inform me of how to write it correctly? I appreciate your help.
16th Oct 2020, 2:42 PM
Nick Thomas
Nick Thomas - avatar
+ 1
I have figured this out and have updated the code, it did work in code coach.
16th Oct 2020, 3:07 PM
Nick Thomas
Nick Thomas - avatar
0
https://www.sololearn.com/learn/CSharp/2585/ Just use either the Readline Method multiple times or one line with a separators and split ...
16th Oct 2020, 3:44 PM
JaScript
JaScript - avatar
- 3
Can i get your number here
18th Oct 2020, 11:46 AM
Oyelola Pamilerin Kabir