C Program to find whether a number is perfect square or not
write(*,*)'Enter the number:'
read(*,*)x
y=sqrt(x)
if (x.eq.y**2)then
write(*,*)'The number is a perfect square.'
else
write(*,*)'The number is not a perfect square.'
endif
end
write(*,*)'Enter the number:'
read(*,*)x
y=sqrt(x)
if (x.eq.y**2)then
write(*,*)'The number is a perfect square.'
else
write(*,*)'The number is not a perfect square.'
endif
end
Comments
Post a Comment