summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pygmentex/pygmentex_demo_2.tex
blob: fc684fa615e85f2e5562d270995b35b34f9e8120 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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}