Anda di halaman 1dari 6

Form Design

Coding:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ArithmeticOperations1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
txtresult.Enabled = false;
}

private void btnadd_Click(object sender, EventArgs e)


{
int first;
int second;
int output;
first= Convert.ToInt32(txtfirst.Text);
second=Convert.ToInt32(txtsecond.Text);
output = first + second;
txtresult.Text = output.ToString();
}

private void btnsub_Click(object sender, EventArgs e)


{
int first;
int second;
int output;
first=Convert.ToInt32(txtfirst.Text);
second=Convert.ToInt32(txtsecond.Text);
output = first - second;
txtresult.Text = output.ToString() ;
}

private void btnclear_Click(object sender, EventArgs e)


{
txtfirst.Text = "";
txtsecond.Text = "";
txtresult.Text = "";
}
}
}

Output Form:

Addition
Subtraction:

WEBSITE:
SUBTRACTION:

FORM DESIGN:
ADIITIOJN LAST:

SUBTRACTION LAST:
FORM DESIGN LAST: