Advertisement
punidota

Untitled

Sep 11th, 2015
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace kdamultipl
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         double a;
  16.         double b;
  17.         double sum;
  18.        
  19.         public Form1()
  20.         {
  21.             InitializeComponent();
  22.          
  23.         }
  24.  
  25.         private void textBox1_TextChanged(object sender, EventArgs e)
  26.         {
  27.             a = Convert.ToInt32(Console.ReadLine());
  28.         }
  29.  
  30.         private void textBox2_TextChanged(object sender, EventArgs e)
  31.         {
  32.  
  33.             b = Convert.ToInt32(Console.ReadLine());
  34.         }
  35.  
  36.         private void Form1_Load(object sender, EventArgs e)
  37.         {
  38.          
  39.          
  40.            
  41.         }
  42.         private void textBox3_TextChanged(object sender, EventArgs e)
  43.         {
  44.            
  45.         }
  46.         private void button1_Click(object sender, EventArgs e)
  47.         {
  48.  
  49.             a = Double.Parse(textBox1.Text);
  50.             b = Double.Parse(textBox2.Text);
  51.             sum = (a + b) / 2;
  52.             textBox3.Text = (sum).ToString();
  53.            
  54.            
  55.         }
  56.  
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement