Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 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 Project9
  12. {
  13. public partial class Form1 : Form
  14. {
  15. public Form1()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20. private void richTextBox2_TextChanged(object sender, EventArgs e)
  21. {
  22.  
  23. }
  24.  
  25. private void label2_Click(object sender, EventArgs e)
  26. {
  27.  
  28. }
  29.  
  30. private void button1_Click(object sender, EventArgs e)
  31. {
  32. string a = richTextBox1.Text;
  33. string b = richTextBox2.Text;
  34. string[] am = a.Split(' ');
  35. string[] bm = b.Split(' ');
  36. int[] amas = new int[6];
  37. int[] bmas = new int[6];
  38. int[] smas = new int[6];
  39. string[] res = new string[6];
  40. richTextBox3.Text = "Результат: ";
  41. for (int i = 0; i<6; i++)
  42. {
  43. amas[i] = int.Parse(am[i]);
  44. bmas[i] = int.Parse(bm[i]);
  45. smas[i] = amas[i] + bmas[i];
  46. res[i] = smas[i].ToString();
  47. richTextBox3.Text = richTextBox3.Text + res[i] + " ";
  48. }
  49.  
  50.  
  51. }
  52.  
  53. private void richTextBox1_TextChanged(object sender, EventArgs e)
  54. {
  55.  
  56. }
  57.  
  58. private void richTextBox3_TextChanged(object sender, EventArgs e)
  59. {
  60.  
  61. }
  62.  
  63. private void Form1_Load(object sender, EventArgs e)
  64. {
  65.  
  66. }
  67. }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement