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 Triangulo_XIII_Forms
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text += "1" + "\r\n";
for (int r = 2; r <= 20; r++)
{
for (int c = 1; c <= r; c++)
{
if (c == r)
{
textBox1.Text += (r.ToString());
}
else
{
textBox1.Text += "0";
}
}
textBox1.Text += "\r\n";
}
}
}
}
No hay comentarios:
Publicar un comentario
Nota: solo los miembros de este blog pueden publicar comentarios.