\listfiles
\documentclass{jarticle}
\usepackage{algorithmic}
\usepackage[boxed]{algorithm}

\makeatletter
  \renewcommand{\thealgorithm}{%
  \thesection.\arabic{algorithm}}
  \@addtoreset{algorithm}{section}
\makeatother
\begin{document}

\section{aaa}

\verb|\usepackage[boxed]{algorithm}|

\begin{algorithm}
\caption{試験}
\begin{algorithmic}
\IF{明日晴れ}
\STATE 畑を耕す。
\ELSIF{雨}
\STATE 本を読む。
\ENDIF
\end{algorithmic}
\end{algorithm}

\begin{algorithm}
\caption{試験}
\begin{algorithmic}[1]
\IF{$n < 0$}
\STATE $X \leftarrow 1 / x$
\STATE $N \leftarrow -n$
\ELSE
\STATE $X \leftarrow x$
\STATE $N \leftarrow n$
\ENDIF
\end{algorithmic}
\end{algorithm}

\end{document}
