RosettaCodeData/Task/A+B/Amazing-Hopper/a+b-2.hopper
2023-07-01 13:44:08 -04:00

20 lines
516 B
Text

#include <hbasic.h>
#import lib/input.bas.lib
#include include/input.h
#define getValueOf(__X__) Token(__X__),Val(Token$(msg))
#define-a »»(__X__) ;Move to(__X__)
Begin
Token Init
Cls
Locate(5,1),Print(Utf8$("Ingrese dos números, separados por espacio: "))
msg=""
LocCol(45),Let( msg := ReadString(msg))
Token Sep(" ")
A=0, get Value Of(1)»»(A), CLamp(-1000,1000,A)
B=0, get Value Of(2)»»(B), CLamp(-1000,1000,B)
Print("Suma : ")
Take(A, B), and Add It; then Print It with a Newl
End