generated from kenryuS/report-temp
52 lines
1.5 KiB
TeX
52 lines
1.5 KiB
TeX
\documentclass[xelatex,a4paper,11pt,ja=standard]{bxjsarticle}
|
|
|
|
\usepackage{tex/preamble}
|
|
\usepackage{tex/simple-title}
|
|
|
|
\reportauthor{柴田健琉}
|
|
\reporttitle{情報処理2 - 前期第6回課題}
|
|
\reportdate{2026年}{05月}{25日}
|
|
\turnindate{2026年}{05月}{25日}
|
|
|
|
\begin{document}
|
|
\simpletitle
|
|
|
|
\section{はじめに}
|
|
|
|
この課題のプログラムは以下の環境での動作が確認されている:
|
|
|
|
\begin{itemize}
|
|
\item {OS: NixOS 25.11 Xantusia, Linux 7.0.9 x86\_64}
|
|
\item {CC: GCC 15.2.0}
|
|
\item {CFLAGS: \texttt{-g -O1 -Wall -Wpedantic}}
|
|
\end{itemize}
|
|
|
|
\section{課題1}
|
|
|
|
入力した文字列\texttt{s}内に特定の文字\texttt{c}の出現回数を返す関数\texttt{str\_chnum}を作成する.
|
|
|
|
\lstinputlisting[language=C,title={課題1のプログラム}]{./src/cls06/a1.c}
|
|
|
|
\subsection{実行結果}
|
|
|
|
\begin{figure}[tbh]
|
|
\centering
|
|
\includegraphics[width=12cm]{./assets/cls06-a1.png}
|
|
\caption{課題1の実行結果}
|
|
\end{figure}
|
|
|
|
\section{課題2}
|
|
|
|
入力した文字列\texttt{s}を\texttt{n}回連続で出力するサブルーティーン\texttt{put\_stringn}を作成する.
|
|
|
|
\lstinputlisting[language=C,title={課題2のプログラム}]{./src/cls06/a2.c}
|
|
|
|
\subsection{実行結果}
|
|
|
|
\begin{figure}[tbh]
|
|
\centering
|
|
\includegraphics[width=12cm]{./assets/cls06-a2.png}
|
|
\caption{課題2の実行結果}
|
|
\end{figure}
|
|
\end{document}
|