Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 Metoder1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- int tal1;
- int tal2;
- int sum;
- private void btnKnap_Click(object sender, EventArgs e)
- {
- ReadNumbers();
- AddUp();
- WriteOut();
- }
- void ReadNumbers()
- {
- tal1 = int.Parse(txtInput1.Text);
- tal2 = int.Parse(txtInput2.Text);
- }
- void AddUp()
- {
- sum = tal1 + tal2;
- }
- void WriteOut()
- {
- lblUd.Text = sum.ToString();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment