Files
2025-05-04 23:11:10 +09:00

23 lines
575 B
TeX
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

\section{今回の構文}
\subsection{四則演算}
C言語での四則演算は以下の通りである
\defaultlistingstyle
\begin{lstlisting}[language=C, title={四則演算}]
a + b; // 加算
a - b; // 減算
a * b; // 乗算
a / b; // 除算 a、b共に整数型だと演算結果は小数点以下切り捨てられた値となる
\end{lstlisting}
\subsection{剰余演算}
aをbで割った余りを求める剰余演算は以下の通りである
\defaultlistingstyle
\begin{lstlisting}[language=C, title={剰余演算}]
a % b; // 剰余
\end{lstlisting}