Skip to content

Newbie on C#.net

Arnie Mateo

Asked Oct 19, 2006, 4:16 PM EDT1 answer
Share
LinkedInX
I have created a sample program that will add the 4 numbers and it will divide it to 4. Theres no error on the code but the output is wrong. . . i can't figure out what is worong. So please help meh. This is my code: private void btnCalculateGrade_Click(object sender, System.EventArgs e) { double a; a = double.Parse(this.txt1stgrading.Text) + double.Parse(this.txt2ndgrading.Text) + double.Parse(this.txt3rdgarding.Text) + double.Parse(this.txt4thgrading.Text) / 4; this.lblTotal.Text = a.ToString(); }

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0

    You should add "("and ")".
    like as (a+b+C+d)/4.

    0