Advertisement
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 Project9
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void richTextBox2_TextChanged(object sender, EventArgs e)
- {
- }
- private void label2_Click(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- string a = richTextBox1.Text;
- string b = richTextBox2.Text;
- string[] am = a.Split(' ');
- string[] bm = b.Split(' ');
- int[] amas = new int[6];
- int[] bmas = new int[6];
- int[] smas = new int[6];
- string[] res = new string[6];
- richTextBox3.Text = "Результат: ";
- for (int i = 0; i<6; i++)
- {
- amas[i] = int.Parse(am[i]);
- bmas[i] = int.Parse(bm[i]);
- smas[i] = amas[i] + bmas[i];
- res[i] = smas[i].ToString();
- richTextBox3.Text = richTextBox3.Text + res[i] + " ";
- }
- }
- private void richTextBox1_TextChanged(object sender, EventArgs e)
- {
- }
- private void richTextBox3_TextChanged(object sender, EventArgs e)
- {
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement