Created
February 17, 2018 20:32
-
-
Save paulohenriquesn/5daaa1bd7bd086f42e630b1c9c140f60 to your computer and use it in GitHub Desktop.
Calculator in Braintwo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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