Using Using Using Using Using Namespace Public Partial Class Public
Using Using Using Using Using Namespace Public Partial Class Public
Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace form1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void BtS_Click(object sender, EventArgs e)
{
this.Close();
}
private void BtC_Click(object sender, EventArgs e)
{
int vnum=Convert.ToInt32(TbN.Text);
int vsum = vnum * (1 + vnum) / 2;
TbS.Text = vsum.ToString();
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
}
}
MONTO
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 form1
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
}
private void cal_Click(object sender, EventArgs e)
{
double c = Convert.ToDouble(C.Text);
double i = Convert.ToDouble(In.Text);
double t = Convert.ToDouble(P.Text);
double m = c * (Math.Pow((1 + i), t));
M.Text = m.ToString();
}
private void sal_Click(object sender, EventArgs e)
{
}
}
}