1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | !write a fortran program to examine the point x1,y1 lies inside/outside/on circle !Author: mannaf program area_circle implicit none real::x,y,x1,y1,h,k,r,s print*,'enter the value of x,y' read*,x,y print*,'enter the value of h,k' read*,h,k print*,'enter the value of x1,y1' read*,x1,y1 r=sqrt((x-h)**2+(y-k)**2) s=sqrt((x1-h)**2+(y1-k)**2) if(r==s) then print*,'the point lies on the circle' elseif(r>s) then print*,'the point lies inside of the circle' else print*,'the point lies outside of the circle' end if end program area_circle |
Sunday, May 17, 2015
write a fortran program to examine the point x1,y1 lies inside/outside/on circle
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment