Cloud Stack Ninja

    private void btnShow_Click(object sender, EventArgs e)
        int Multiplication = Convert.ToInt32(txtMultiplication.Text);
        int Fnum = Convert.ToInt32(txtFnum.Text);
        int Tnum = Convert.ToInt32(txtTnum.Text);

        txtOutput.Text = "";
        for (Multiplication = 0; Fnum <= Tnum; Fnum++)
            output = output + Multiplication;
            res = Multiplication * Fnum;
            if (Fnum <= Tnum)
        } // while Fnum <= Tnum

        txtOutput.Text = output;
    } // end method

I have 3 textboxes in layout. First, I change textbox string to interger. Second, I need to make loop(Fnum to Tnum). The question is I do not know how to make loop in this question.

Read more here:

Content Attribution

This content was originally published by user14437637 at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: