Pseudocodigo


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_6._2_Windows
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
double n, I, S = 0.0;
n = double.Parse(N.Text);
label2.Text = "La suma de sus numeros Impares es: ";
for (I = 1; I <= n; I = I + 2)
{
S = S + I;
}
label2.Text = label2.Text + S.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
N.Clear();
label2.Text = " ";
}
private void button3_Click(object sender, EventArgs e)
{
Close();
}
}
}

No hay comentarios:
Publicar un comentario