⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sajid.for

📁 newton raphson method in fortran
💻 FOR
字号:


      real x0,E
	write(*,*)'enter the values of x0,E'
	read(*,*) x0,E

	fx0=((x0*x0*x0)-155)
	Dfx0=(3*x0*x0)
	if(abs(fx0).lt.E)then
	write(*,*)'x0 is the root',x0
	goto 2
	endif
	
	do n=0,10
	x1=x0-(fx0/Dfx0)
	fx1=((x1*x1*x1)-155)
	dfx1=3*x1*x1
	if(abs(fx1).lt.E)then
	write(*,*)'x1 is the root' ,x1
	goto 2
	else 
	x0=x1
	fx0=fx1
	dfx0=dfx1
      end if  
	end do
	write(*,*)'process does not converge for given x0 and E values'
2	stop
	end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -