0

Going once going twice Sold!

Hi, Im having problem with this code i made. It seems running fine in my visual studios but not in solo learn. The output im having in my visual studios is the same as what sololearn wants but somehow in sololearn im getting output error. Can somebody explain to me what i did wrong here in my code? Code: int maxBid = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Max bid:" + maxBid); int bid; while(true) { bid = Convert.ToInt32(Console.ReadLine()); if (bid >= maxBid) break; } Console.WriteLine("Sold:" + bid);

8th Jun 2022, 7:20 AM
Hibatul Ashraf
Hibatul Ashraf - avatar
3 Respuestas
+ 3
Hibatul Ashraf Sololearn requires all inputs to be placed before running the code. Your external IDE allows real time input as required
8th Jun 2022, 8:08 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Yeah. I just found out that I have to exactly with what sololearn wants without additional input such as "Console.WriteLine("Max bid:" + maxBid);"
8th Jun 2022, 8:30 AM
Hibatul Ashraf
Hibatul Ashraf - avatar
0
maxBid = int(input()) while True: bid = int(input()) if bid > maxBid: print ("Sold: " + str(bid)) break
21st Feb 2023, 8:18 PM
Mohd Muzammil Moose Memon
Mohd Muzammil Moose Memon - avatar