Skip to content

Instantly share code, notes, and snippets.

@paulohenriquesn
Created February 17, 2018 20:32
Show Gist options
  • Save paulohenriquesn/5daaa1bd7bd086f42e630b1c9c140f60 to your computer and use it in GitHub Desktop.
Save paulohenriquesn/5daaa1bd7bd086f42e630b1c9c140f60 to your computer and use it in GitHub Desktop.
Calculator in Braintwo
int pos = 0;
Console.Write("Insira o valor primario: ");
bt.Interpreter(@",.0");
Console.Write("\nInsira o segundo valor: ");
bt.Interpreter(@",.0");
try
{
pos = int.Parse(bt.Output[0].ToString());
}
catch { pos = 0; }
for (int i = 0; i < pos; i++)
{
bt.Interpreter("+");
}
bt.Interpreter("]>");
try
{
pos = int.Parse(bt.Output[1].ToString());
}
catch { pos = 0; }
for (int i = 0; i < pos; i++)
{
bt.Interpreter("+");
}
Console.Write("\n\nResultado: ");
bt.Interpreter("]|;@<[&");
Console.ReadLine();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment