Diseñar un algoritmo que muestre la siguiente serie
*
**
***
****
*****
Codigo Fuente en Visual Basic
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cad As String = "" Dim n As Integer n = TextBox1.Text For y As Integer = 1 To n For w As Integer = 1 To y cad = cad + "*" Next w cad = cad & vbCrLf Next y TextBox2.Text = cad End Sub End Class
buen ejercicio, gracias por conpartir
ResponderEliminar