I'm trying to use for loop.
If the input is 3, the result going to be:
1**
*2*
**3
So I used this code
void button1_Click(object sender, EventArgs e) {
string message = " ";
int value = numericUpDown1.Value;
for(int count = 0; count < value; count++) {
for(int m = -2; m < value; m++) {
message += "*";
}
message += "\r\n";
}
MessageBox.Show(message);
}
I used the two for-loops but i could not fix it to show the number, but it give me
***
***
***