\section{\texttt{double}型と\texttt{printf}関数・\texttt{scanf}関数の書式}

\defaultlistingstyle
\lstinputlisting[language=C, title={変更元のソースコード}]{../programs/printf-formats/main.c}

上記のソースコードについて、\texttt{printf}関数と\texttt{scanf}関数の書式を次のように変更していく：

\begin{itemize}
    \item 第一の\texttt{printf}関数の書式を\texttt{\%f}にする
    \item 第一の\texttt{printf}関数の書式を\texttt{\%lf}にする
    \item 第二の\texttt{printf}関数の書式を\texttt{\%d}にする
    \item 第二の\texttt{printf}関数の書式を\texttt{\%lf}にする
    \item 第一の\texttt{scanf}関数の書式を\texttt{\%f}にする
    \item 第一の\texttt{scanf}関数の書式を\texttt{\%lf}にする
    \item 第二の\texttt{scanf}関数の書式を\texttt{\%d}にする
    \item 第二の\texttt{scanf}関数の書式を\texttt{\%f}にする
\end{itemize}

\subsection{\texttt{main-p1-f}}

\begin{center}
    \includegraphics[width=\textwidth]{./assets/printf-formats/main-p1-f}
\end{center}

\subsection{\texttt{main-p1-lf}}

\begin{center}
    \includegraphics[width=\textwidth]{./assets/printf-formats/main-p1-lf}
\end{center}

\subsection{\texttt{main-p2-d}}

\begin{center}
    \includegraphics[width=\textwidth]{./assets/printf-formats/main-p2-d}
\end{center}

\subsection{\texttt{main-p2-lf}}

\begin{center}
    \includegraphics[width=\textwidth]{./assets/printf-formats/main-p2-lf}
\end{center}

\subsection{\texttt{main-s1-f}}

\begin{center}
    \includegraphics[width=\textwidth]{./assets/printf-formats/main-p3-f}
\end{center}

\subsection{\texttt{main-s1-lf}}

\begin{center}
    \includegraphics[width=\textwidth]{./assets/printf-formats/main-p3-lf}
\end{center}

\subsection{\texttt{main-s2-d}}

\begin{center}
    \includegraphics[width=\textwidth]{./assets/printf-formats/main-p4-d}
\end{center}

\subsection{\texttt{main-s2-f}}

\begin{center}
    \includegraphics[width=\textwidth]{./assets/printf-formats/main-p4-f}
\end{center}
