diff options
Diffstat (limited to 'macros/latex/contrib/pygmentex/pygmentex_demo_2.tex')
-rw-r--r-- | macros/latex/contrib/pygmentex/pygmentex_demo_2.tex | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/macros/latex/contrib/pygmentex/pygmentex_demo_2.tex b/macros/latex/contrib/pygmentex/pygmentex_demo_2.tex new file mode 100644 index 0000000000..fc684fa615 --- /dev/null +++ b/macros/latex/contrib/pygmentex/pygmentex_demo_2.tex @@ -0,0 +1,23 @@ +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage[scaled=0.85]{beramono} +\usepackage[force]{pygmentex} + +\begin{document} + +This is my C program: + +\begin{pygmented}[lang=c] +#include <stdio.h> +int main(void) +{ + int a, b, c; + printf("Enter two numbers to add: "); + scanf("%d%d", &a, &b); + c = a + b; + printf("Sum of entered numbers = %d\n", c); + return 0; +} +\end{pygmented} + +\end{document} |