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);
3 odpowiedzi
+ 3
Hibatul Ashraf
Sololearn requires all inputs to be placed before running the code.
Your external IDE allows real time input as required
+ 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);"
0
maxBid = int(input())
while True:
bid = int(input())
if bid > maxBid:
print ("Sold: " + str(bid))
break