Hey guys Iam quite new at programming
I was making a conversor of Celsius to Fahrenheint , then i got a lot of errors
i don`t know if my logic is wrong or just the code
could someone help me ??
I was making a conversor of Celsius to Fahrenheint , then i got a lot of errors
i don`t know if my logic is wrong or just the code
could someone help me ??
Code:
private void button1_Click(object sender, EventArgs e) { double celsius, fare = 0; if (txtCelsius.Text == "") ; { celsius = (Convert.ToDouble(txtFahrenheint.Text) / 1.8) + 32; txtCelsius.Text = Convert.ToString(celsius); } else if (txtFahrenheint.Text == ""); { fare = (Convert.ToDouble(txtCelsius.Text) * 1.8) + 32; txtFahrenheint.Text = Convert.ToString(fare); } else; { Console.WriteLine ("Valor incorreto"); } }
Comment