!This program was change on November 18.
print*, "Enter the limit of hypotenuse"
print*, "The following numbers are all primitive Pythagorean triples with hypotenuse no longer than",N
do i= 2,N
c = i
do j = 1, N
a = j
b = sqrt(real(c**2-a**2))
if (b==real(int(b)) .and. b/=0 .and. real(a)<=b ) then
judge = .true.
do k =2,int(b)
if (mod(a,k)==0 .and. mod(int(b),k)==0) then
judge = .false.
if ( judge ) then
t = t + 1
print*, "The total number of primitive Pythagorean triplese is",t
end program report7