draft
This commit is contained in:
@@ -1,70 +1,12 @@
|
||||
\section{はじめに}
|
||||
|
||||
Start Writing!
|
||||
\subsection{実行環境}
|
||||
|
||||
Use lualatex + biber to compile.
|
||||
この課題のプログラムは以下の環境で動作することが確認されている:
|
||||
|
||||
Test Bib\cite{example}
|
||||
|
||||
いろはにほへと ちりぬるを
|
||||
|
||||
{\gtfamily \sffamily \LaTeX で自由な組版を。}
|
||||
|
||||
{\gtfamily \sffamily Write freely with \LaTeX{}.}
|
||||
|
||||
{\ttfamily LaTeX shall be free forever!}
|
||||
|
||||
\noindent
|
||||
この行のテキストは四十二字です。ああああああああああああああああああああああああああいいいい
|
||||
|
||||
\defaultlistingstyle
|
||||
|
||||
\begin{lstlisting}[language=C, caption=Basic Hello World]
|
||||
#include <stdlib.h>
|
||||
|
||||
int square(int n) {
|
||||
return n*n;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
char* msg = "Hello World";
|
||||
int x = 3;
|
||||
int y = square(x);
|
||||
printf("%s\n", msg);
|
||||
printf("f(x) = x^2; x: %d, y: %d\n", x, y);
|
||||
return 0;
|
||||
}
|
||||
\end{lstlisting}
|
||||
|
||||
\begin{displaymath}
|
||||
\int_{a}^{b} f(x) \,dx = F(b)-F(a)
|
||||
\end{displaymath}
|
||||
|
||||
\begin{itemize}
|
||||
\item C
|
||||
\item Python
|
||||
\item Javascript
|
||||
\item Rust
|
||||
\item Haskell
|
||||
\item OS: Arch Linux
|
||||
\item CPU アーキテクチャ: \texttt{x86\_64}
|
||||
\item C コンパイラ: \texttt{gcc バージョン 14.2.1 20250322 (GCC)}
|
||||
\item C コンパイラオプション: \texttt{-Wall}
|
||||
\end{itemize}
|
||||
|
||||
\begin{enumerate}
|
||||
\item lualatex <filename>.tex
|
||||
\item biber <filename>
|
||||
\item lualatex <filename>.tex
|
||||
\item lualatex <filename>.tex
|
||||
\end{enumerate}
|
||||
|
||||
\newpage
|
||||
|
||||
\section{Section}
|
||||
|
||||
section
|
||||
|
||||
\subsection{Sub Section}
|
||||
|
||||
sub section
|
||||
|
||||
\paragraph{Paragraph}
|
||||
|
||||
paragraph
|
||||
|
||||
13
section/p41.tex
Normal file
13
section/p41.tex
Normal file
@@ -0,0 +1,13 @@
|
||||
\section{課題1}
|
||||
|
||||
教科書の演習4ー1の解答
|
||||
|
||||
\subsection{コードリスティング}
|
||||
|
||||
\lstinputlisting[language=C,title={課題1}]{../programs/p41/main.c}
|
||||
|
||||
\subsection{実行結果}
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=\textwidth]{./assets/p41.png}
|
||||
\end{center}
|
||||
13
section/p42.tex
Normal file
13
section/p42.tex
Normal file
@@ -0,0 +1,13 @@
|
||||
\section{課題2}
|
||||
|
||||
教科書の演習4ー2の解答
|
||||
|
||||
\subsection{コードリスティング}
|
||||
|
||||
\lstinputlisting[language=C,title={課題2}]{../programs/p42/main.c}
|
||||
|
||||
\subsection{実行結果}
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=\textwidth]{./assets/p42.png}
|
||||
\end{center}
|
||||
13
section/p43.tex
Normal file
13
section/p43.tex
Normal file
@@ -0,0 +1,13 @@
|
||||
\section{課題3}
|
||||
|
||||
教科書の演習4ー3の解答
|
||||
|
||||
\subsection{コードリスティング}
|
||||
|
||||
\lstinputlisting[language=C,title={課題3}]{../programs/p43/main.c}
|
||||
|
||||
\subsection{実行結果}
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=\textwidth]{./assets/p43.png}
|
||||
\end{center}
|
||||
13
section/p44.tex
Normal file
13
section/p44.tex
Normal file
@@ -0,0 +1,13 @@
|
||||
\section{課題4}
|
||||
|
||||
教科書の演習4ー4の解答
|
||||
|
||||
\subsection{コードリスティング}
|
||||
|
||||
\lstinputlisting[language=C,title={課題4}]{../programs/p44/main.c}
|
||||
|
||||
\subsection{実行結果}
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=\textwidth]{./assets/p44.png}
|
||||
\end{center}
|
||||
12
section/syntax.tex
Normal file
12
section/syntax.tex
Normal file
@@ -0,0 +1,12 @@
|
||||
\section{今回の構文}
|
||||
|
||||
\subsection{\texttt{while}文}
|
||||
|
||||
繰り返しを記述する構文の一つで、こちらはループ内の処理を行う前に条件式を評価する。
|
||||
|
||||
\defaultlistingstyle
|
||||
\begin{lstlisting}[language=C,title={\texttt{while}文}]
|
||||
while (<条件式>) {
|
||||
文...;
|
||||
}
|
||||
\end{lstlisting}
|
||||
Reference in New Issue
Block a user