diff --git a/assets/p310.png b/assets/p310.png new file mode 100644 index 0000000..29dd871 Binary files /dev/null and b/assets/p310.png differ diff --git a/assets/p311.png b/assets/p311.png new file mode 100644 index 0000000..d5c67b0 Binary files /dev/null and b/assets/p311.png differ diff --git a/document.yaml b/document.yaml index 9f2b6df..e96eb7a 100644 --- a/document.yaml +++ b/document.yaml @@ -32,4 +32,6 @@ paper_config: sections: - { path: 'section/introduction.tex', newpg: true } + - { path: 'section/p310.tex', newpg: true } + - { path: 'section/p311.tex', newpg: true } diff --git a/main.tex b/main.tex new file mode 100644 index 0000000..6183329 --- /dev/null +++ b/main.tex @@ -0,0 +1,33 @@ +\documentclass{class/nitreport} + +\reporttitle{第9回課題} +\reportauthor{柴田 健琉} +\studentid{2024D14} +\seatingnum{15} +\reportdate{令和7年}{05月}{21日} +\turnindate{令和7年}{06月}{23日} +\schoolname{岐阜工業高等専門学校} +\department{電子制御工学科} +\subject{情報処理I} +\professor{岡崎 憲一} + +\pagenumbering{roman} + +\begin{document} + \coverpage + + \tableofcontents + \newpage + \pagenumbering{arabic} + + \input{section/introduction.tex} + \newpage + + \input{section/p310.tex} + \newpage + + \input{section/p311.tex} + \newpage + + \compiledTime +\end{document} diff --git a/output/main.pdf b/output/main.pdf new file mode 100644 index 0000000..fbf392f Binary files /dev/null and b/output/main.pdf differ diff --git a/programs/p310/main b/programs/p310/main index 01c065b..0e66f5e 100755 Binary files a/programs/p310/main and b/programs/p310/main differ diff --git a/programs/p310/main.c b/programs/p310/main.c index 39b8e3e..a9d88bc 100644 --- a/programs/p310/main.c +++ b/programs/p310/main.c @@ -1,9 +1,5 @@ #include -#define NON_EQUAL 0 -#define ONE_EQUAL 1 -#define ALL_EQUAL 2 - #ifndef USE_ALT int main(void) { @@ -35,6 +31,10 @@ int main(void) { #ifdef USE_ALT +#define NON_EQUAL 0 +#define ONE_EQUAL 1 +#define ALL_EQUAL 2 + // alternetive answer int main(void) { int flag = 0; // remember, boolean in C is just integer diff --git a/section/p310.tex b/section/p310.tex new file mode 100644 index 0000000..d92e200 --- /dev/null +++ b/section/p310.tex @@ -0,0 +1,18 @@ +\section{演習 3-10} + +\vspace{-0.25cm} + +3つの整数値の等価検証プログラム。 + +\subsection{コードリスティング} + +\vspace{-0.75cm} + +\defaultlistingstyle +\lstinputlisting[language=C,title={演習 3-10}]{../programs/p310/main.c} + +\subsection{実行結果} + +\begin{center} + \includegraphics[width=\textwidth]{./assets/p310.png} +\end{center} diff --git a/section/p311.tex b/section/p311.tex new file mode 100644 index 0000000..d87b33c --- /dev/null +++ b/section/p311.tex @@ -0,0 +1,14 @@ +\section{演習 3-11} + +論理OR演算子を使用して2つの整数値の差が10以下であるか、11以上であるかを検証するプログラム。 + +\subsection{コードリスティング} + +\defaultlistingstyle +\lstinputlisting[language=C,title={演習 3-11}]{../programs/p311/main.c} + +\subsection{実行結果} + +\begin{center} + \includegraphics[width=\textwidth]{./assets/p311.png} +\end{center}