Quote from
emo on April 21, 2025, 4:39 pm
@ubirajara-fernandes-valladares
. Get the number entered by the user
SetVar "[Number]" "[TextEntry1]"
. Check if the number is valid and non-negative
If "[Number]" "<" "0"
AlertBox "Error" "The number cannot be negative."
Return
EndIf
. Calculate the square root using the ^ operator
Math "[Number] ^ 0.5" "2" "[Result]"
. Display the result
AlertBox "Result" "The square root of [Number] is [Result]"
@ubirajara-fernandes-valladares
. Get the number entered by the user
SetVar "[Number]" "[TextEntry1]"
. Check if the number is valid and non-negative
If "[Number]" "<" "0"
AlertBox "Error" "The number cannot be negative."
Return
EndIf
. Calculate the square root using the ^ operator
Math "[Number] ^ 0.5" "2" "[Result]"
. Display the result
AlertBox "Result" "The square root of [Number] is [Result]"
Uploaded files:- You need to login to have access to uploads.
danito has reacted to this post.