program t implicit none integer::N integer::i,j read*,N do i=1,10 do j=1,10 if(i+j==N)then print"(I0,A,i0)",i," ",j endif end do end do end program t