Why if doesn’t work?
In my code , if ( x<1000) doesn’t work using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { int totalPrice = Convert.ToInt32(Console.ReadLine()); //call the method Console.WriteLine(Discount(totalPrice)); } //complete the method declaration static double Discount(int x) { //complete the method body double price; if(x < 1000) { price = Convert.ToDouble(x); } else { price = Convert.ToDouble(x-x*0.2); } return price; } } }