Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 KB | None | 0 0
  1. private void Comprobar(int numero)
  2.         {
  3.             if (primerN == -1)
  4.             {
  5.                 primerN = numero;
  6.                 pantalla.Text = numero.ToString();
  7.             }
  8.             else if (primerN != -1 && segundoN == -1)
  9.             {
  10.                 primerN = Convert.ToInt32(primerN.ToString() + numero.ToString());
  11.                 pantalla.Text = numero.ToString();
  12.             }
  13.             else if (primerN != -1 && operador != "" && segundoN == -1)
  14.             {
  15.                 segundoN = numero;
  16.                 pantalla.Text = primerN.ToString() + operador + numero.ToString();
  17.             }
  18.             else if (segundoN != -1)
  19.             {
  20.                 segundoN = Convert.ToInt32(segundoN.ToString() + numero.ToString());
  21.                 pantalla.Text = numero.ToString();
  22.             }
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement