Quantcast
Channel: PTC Community : All Content - PTC Mathcad
Viewing all articles
Browse latest Browse all 3331

Writing Pseudocode in MATHCAD

$
0
0

I wrote pseudocode but don't know how to write it in Macthcad

Can you guys show me how would you write this in MATHCAD?

 

IF a>0 THEN

tol = 10^-5

x=a/2

DO

   y=(x+a/x)/2

   e=(y-x)/y

   x=y

   IF e<tol EXIT

END DO

SquareRoot=x

ELSE

SquareRoot=0

END IF


Viewing all articles
Browse latest Browse all 3331

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>