Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
A_01 QN:1(I) BISECTION METHOD
PROGRAM BISECTION_METHOD IMPLICIT NONE REAL::A,B,X,X1,TOL CALL BM(X1,TOL) END PROGRAM BISECTION_METHOD SUBROUTINE BM(X1,TOL) PRINT*,'ENTER THE VALUE OF A & B:' READ*,A,B PRINT*,'ENTER THE VALUE OF TOL=' READ*,TOL IF (F(A)*F(B)<0) THEN 30 X1=(A+B)/2 PRINT*,ABS(F(X1)),X1 IF (F(X1)==0) THEN WRITE(*,20)X1 20 FORMAT('THE ROOT IS:',F6.4) ELSEIF (F(A)*F(X1)<0) THEN B=X1 ELSEIF (F(B)*F(X1)<0) THEN A=X1 END IF ELSE PRINT *, "ROOT DOESN'T EXIST IN THESE INTERVAL" END IF IF(ABS(B-A)<TOL)THEN WRITE(*,21)X1 21 FORMAT('THE REAL ROOT IS:',F6.4) ELSE GOTO 30 END IF END SUBROUTINE BM REAL FUNCTION F(X) IMPLICIT NONE REAL::X F=X**3-2*X-5 END FUNCTION
run
|
edit
|
history
|
help
0
first
fucugigugug
gauss seidel and jacobi
y
Q1
A_02 GUASSIAN_ELIMINATION METHOD
Summation of 1 to 100 square integer namber
A program to calculate potential energy.
A_04 SHOOTING METHOD
hello world