
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Practica_8_prob_8_W
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
int N, P = 1, C;
N = int.Parse(textBox1.Text);
label2.Text = "El producto de los numeros es:";
for (C = 1; C <= N; C = C + 2)
{
P = P * C;
}
label2.Text = label2.Text + P.ToString();
}
private void button3_Click(object sender, EventArgs e)
{
textBox1.Clear();
label2.Text = ("");
}
private void button4_Click(object sender, EventArgs e)
{
Close();
}
}
}

No hay comentarios:
Publicar un comentario