0% found this document useful (0 votes)
20 views

Using Using Using Using Using Namespace Public Partial Class Public

This document contains code for two .NET Windows Forms applications. The first form allows a user to enter a number and calculates the sum from 1 to that number. The second form calculates compound interest by allowing the user to enter principal, interest rate, and time, and displays the final amount. Both forms include event handler methods for buttons and text boxes.

Uploaded by

Jafet At
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Using Using Using Using Using Namespace Public Partial Class Public

This document contains code for two .NET Windows Forms applications. The first form allows a user to enter a number and calculates the sum from 1 to that number. The second form calculates compound interest by allowing the user to enter principal, interest rate, and time, and displays the final amount. Both forms include event handler methods for buttons and text boxes.

Uploaded by

Jafet At
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

using System.

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)
{

}
}
}

You might also like