-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.f90
43 lines (32 loc) · 954 Bytes
/
main.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
! Last Updated on 19th Nov.
! By Ataur Rahman
! M.Sc. Physics (Computational Physics)
! Central University of Punjab, Bathinda
program main
use xfind
implicit none
integer :: i, n
real :: a1, a2, err, rt
! write(*, *) " Enter the function:"
! read(*, *)
write(*, *) " Enter a number to choose a method: "
write(*, *) " Bisection method: 1"
write(*, *) " Newton-Raphson method: 2"
write(*, *) " Regula-Falsi method: 3"
write(*, *) " Secant method: 4"
write(*, *) "------------------------------------------------------------------------------"
read(*, *) i
select case(i)
case (1)
call bisection()
case(2)
call newton(rt)
case(3)
call regula()
case(4)
call secant()
case default
write(*, *) "Enter a valid number."
write(*, *) "------------------------------------------------------------------------------"
end select
end program main