
PSEUDOCODIGO
int N1, N2;
int suma()
{
return N1 + N2;
}
int multiplica()
{
return N1 * N2;
}
{
READ N1
READ N2
int R1 = suma();
int R2 = multiplica();
PRINT "Suma:" + R1
PRINT "Multiplicacion:" + R2
}
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 DATOS_W
{
public partial class Form1 : Form
{
int N1, N2;
int suma()
{
return N1 + N2;
}
int multiplica()
{
return N1 * N2;
}
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
N1 = int.Parse(D1.Text);
N2 = int.Parse(D2.Text);
int R1 = suma();
int R2 = multiplica();
listBox1.Items.Add("Suma:" + R1);
listBox1.Items.Add("Multiplicacion:" + R2);
}
private void button2_Click(object sender, EventArgs e)
{
D1.Clear();
D2.Clear();
listBox1.Items.Clear();
}
private void button3_Click(object sender, EventArgs e)
{
Close();
}
}
}

No hay comentarios:
Publicar un comentario