Calculator Program in C#.NET
Upcoming SlideShare
Loading in...5
×
 

Calculator Program in C#.NET

on

  • 420 views

Calculator Program in C#.NET Which can Perform Additon , Subtraction , Multiplication , Divison

Calculator Program in C#.NET Which can Perform Additon , Subtraction , Multiplication , Divison

Statistics

Views

Total Views
420
Views on SlideShare
410
Embed Views
10

Actions

Likes
0
Downloads
4
Comments
0

1 Embed 10

http://www.slideee.com 10

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Calculator Program in C#.NET Calculator Program in C#.NET Document Transcript

    • (1) Write a C# Program for Basic Calculator which can handle addition, subtraction, multiplication, and division. Source Code: using using using using using using using using using System; System.Collections.Generic; System.ComponentModel; System.Data; System.Drawing; System.Linq; System.Text; System.Threading.Tasks; System.Windows.Forms; namespace Calc { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void pictureBox1_Click(object sender, EventArgs e) { } private void Form1_Load(object sender, EventArgs e) { } float number1 , number2 , add , sub , mul ,div; private void button1_Click(object sender, EventArgs e) { number1 = Convert.ToInt32(textBox1.Text); number2 = Convert.ToInt32(textBox2.Text); add = number1 + number2; textBox3.Text = add.ToString(); }
    • private void button2_Click(object sender, EventArgs e) { number1 = Convert.ToInt32(textBox1.Text); number2 = Convert.ToInt32(textBox2.Text); sub = number1 - number2; textBox3.Text = sub.ToString(); } private void button3_Click(object sender, EventArgs e) { number1 = Convert.ToInt32(textBox1.Text); number2 = Convert.ToInt32(textBox2.Text); mul = number1 * number2; textBox3.Text = mul.ToString(); } private void button4_Click(object sender, EventArgs e) { number1 = Convert.ToInt32(textBox1.Text); number2 = Convert.ToInt32(textBox2.Text); div = number1 / number2; textBox3.Text = div.ToString(); } } } Output: