Square Root - Forum

Forum Navigation
You need to log in to create posts and topics.

Square Root

Hello,
Does anyone know if it is possible to calculate the square root of a number in Visualneo? 
Is there a function or plugin for this? Thank you

@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.
danito

Thank You !