using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Asteriscos_V
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
int numero;
private void button2_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
numero = int.Parse(textBox2.Text);
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text += "*" + "\r\n";
for (int r = 1; r <= numero; r++)
{
textBox1.Text += "*";
for (int sp = 1; sp < r; sp++)
{
textBox1.Text += " ";
}
textBox1.Text += "*" + "\r\n";
}
for (int j = 1; j <= numero - 1; j++)
{
textBox1.Text += "*";
}
}
}
}
No hay comentarios:
Publicar un comentario
Nota: solo los miembros de este blog pueden publicar comentarios.