Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
} Expected error file form1.cs Line 43 column2 sales_discountwith_IF
trying to write a C# program if total sales greater than 1000 then the customer will get 10% discount otherwise the custer get a 5% discount.
I tried to run the program to test it but have this little red swiggle line on the last bracket. Don't know what it means. I am trying to do a if then else program.
here is my code.
public partial class Form1 : Form
private void button1_Click(object sender, EventArgs e)
double totalSales, discountRate, NetPay;
totalSales = double.Parse(textBox1.Text);
myMsg = "Thank you";
discountRate = .1;
myMsg = "thank you very much!";
} On this last bracket I have a little red swiggle line.