Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1. private void button1_Click(object sender, EventArgs e)
  2.         {
  3.  
  4.             string a = textBox1.Text;
  5.             string b = textBox2.Text;
  6.             string c = textBox3.Text;
  7.             string d = textBox4.Text;
  8.  
  9.             if (a != "" && b != "" && c != "" && d != "")
  10.             {
  11.                 label1.Text = "Nezadány všechny údaje";
  12.             }
  13.             else
  14.             {
  15.  
  16.                 int h = int.Parse(a);
  17.                 int j = int.Parse(b);
  18.                 int k = int.Parse(c);
  19.                 int l = int.Parse(d);
  20.  
  21.                 else if (j == 0 && l == 0)
  22.                 {
  23.                     label1.Text = "Nelze dělit nulou";
  24.                 }
  25.                 else if ((h / j) < (k / l))
  26.                 {
  27.                     label1.Text = "<";
  28.                 }  
  29.                 else if ((h / j) > (k / l))
  30.                 {
  31.                     label1.Text = ">";
  32.                 }
  33.             }
  34.              
  35.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement