Skip to content

Instantly share code, notes, and snippets.

@ivan-pi
Created January 27, 2025 23:52
Show Gist options
  • Save ivan-pi/3a334a95eb9718c6680b97309d68af15 to your computer and use it in GitHub Desktop.
Save ivan-pi/3a334a95eb9718c6680b97309d68af15 to your computer and use it in GitHub Desktop.
C BERECHNUNG EINER QUADRATWURZEL
1 READ(*,100) Z
100 FORMAT(F9.3)
WRITE(*,101)
101 FORMAT(6X,13HQUADRATWURZEL)
WRITE(*,102)
102 FORMAT(//6X,1HZ,11X,1HW)
2 WN=1.0
3 WN1=0.5*(WN + Z/WN)
WRITE(*,300) WN1
300 FORMAT(24X,F9.3,2X,9HITERATION)
4 IF(0.001-ABS(WN1-WN))5,5,6
5 WN=WN1
GOTO 3
6 WRITE(*,600) Z,WN1
600 FORMAT(1X,F9.3,3X,F9.3)
7 END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment