latex 语法如何写?

Blade 未结 0 727
bbbbbb
bbbbbb 剑童 2019-07-31 16:36

\subsection{Java}

\begin{lstlisting}[language={java}]

class HelloWorldApp {

  public static void main(String[] args) {

    System.out.println("Hello World!"); // Display the string.

    for (int i = 0; i < 100; ++i) {

      System.out.println(i);

    }

  }

}

\end{lstlisting}


\subsection{Python}

\begin{lstlisting}[language=python]

def hello():

    print "Hello, World"

    for i in range(10):

      print i

\end{lstlisting}



回答
  • 消灭零回复
提交回复