program main implicit none integer :: n,n1,i,s,j,r print*,"how many digit" read*, j print*,"enter the digit" read*, n n1 = 0 r = 10**(j-1) do i = 1,j n1 = n1 + (mod(n,10))*r n =n/10 r = r/10 end do if (s==n1) then print*,"palindrome" else print*, "not palindrome" end if end program main
To embed this project on your website, copy the following code and paste it into your website's HTML: