Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
points on,inside circle
!gfortran, gcc version 7.4.0 program hello implicit none real::cx=0,cy=0,dis,r=4.0,xSym,ySym real::x(4),y(4) integer::i,j,k write(*,*)'inside the circle' do i=floor(cx-r),floor(r-cx) do j=floor(cy-r),floor(r-cy) if ((i - cx)*(i - cx) + (j - cy)*(j - cy) < r*r) then xSym = cx - (i - cx); ySym = cy - (j- cy); end if ! write(*,*)i,j ! write(*,*)i,xSym write(*,*)xSym,ySym ! write(*,*)j,ySym end do end do write(*,*)'on the circle' do i=floor(cx-r),floor(r-cx) do j=floor(cy-r),floor(r-cy) if ((i - cx)*(i - cx) + (j - cy)*(j - cy) == r*r) then xSym = cx - (i - cx); ySym = cy - (j- cy); end if ! write(*,*)i,j ! write(*,*)i,xSym write(*,*)xSym,ySym !rite(*,*)j,ySym end do end do end program hello
run
|
edit
|
history
|
help
0
A_01 BISECTION METHOD
Adams-Bashforth Method for four step
Practice 2(I)
8
A_01 QN:3
Fyyh
Fhhjhh
4
Y
Characteristics polynomial