First we create the design of the form as shown below :
The components in the form above is:
- Label with the text property: High Pyramid
- NumericUpDown with minimum properties: 2
- Button with text property: Show and Exit
- TextBox with multiline property is True, also in order to set the font to Courier New property
Now double-click the button with the text property Show, and enter the following code:
Next, double-click the button with the text property "Exit", then type the following code:
end
If so, please press F5 to run the program, when the program runs, the results are as below:
Sign up here with your email