summaryrefslogtreecommitdiffstats
path: root/ascii.c
blob: eb24ba5899e0c9d55aff01a0eb00297569b2db8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("\tASCII Table\n");

    int i, j;

    for (j = 0, i = 1; i < 128 + 1; i++)
    {
        if (!(j < 32) && j != 127)
            printf("%3d %c", j, j);
        else
            printf("%3d  ", j);            

        j += 32;
         
        if (i % 4 == 0)
        {
            j = (i / 4);
            printf("\n");
        }
        else
            printf("\t");
    }
    puts("");

    return 0;
}