+ 1
What is wrong with this code
int numbersold = Console.ReadLine(); int cost = 21,000,000; int numbersoldprice = numbersold * 3,000,000; if(numbersoldprice > cost ) { Console.WriteLine("Profit") ; } else if (numbersoldprice == cost) { Console.WriteLine("Broke even"); } else { Console.WriteLine("Loss"); }
1 Antwort
+ 5
Line 1: you should convert the input from string to int
https://code.sololearn.com/cPTM3QszIepA/?ref=app