Page 1 of 1
how to print and display name and age?
Posted: Thu Oct 13, 2022 2:46 pm
by samxxx
Code: Select all
EnableExplicit
EnableGraphicalConsole(#True)
Global Aname.s
OpenConsole()
PrintN(" ")
PrintN (" Enter your name?")
Aname.s = Input()
ClearConsole()
;--------------------------
PrintN (" Enter your age?")
b = Val(Input())
Input()
// Added Code-Tags (Kiffi)
Re: how to print and display name and age?
Posted: Thu Oct 13, 2022 2:58 pm
by Olli
Code: Select all
EnableExplicit
EnableGraphicalConsole(#True)
Define Aname.s
Define Age.i
OpenConsole()
PrintN(" ")
PrintN (" Enter your name?")
Aname = Input()
ClearConsole()
;--------------------------
Print(" Enter your age?")
Age = Val(Input())
PrintN("So " + Aname + " is " + Str(Age) + " year(s) old.")
Input()