Alpha-Count

This program was another interactive assignment we had in ICS 212 also written in C. The user can type as many characters as they want, or input a file through the command line, and the program will return the amount of letters used in the passage and the total characters typed. Text files are also able to be input through the command line.

Here is a sample a run:


 
This program will count the letters of the alphabet.
Type several sentences, or use input redirection to input a file.
To exit program, enter EOF (end of File) by pressing Enter then Ctrl-D.
NARRATOR:     
(Black screen with text; The sound of buzzing bees can be heard)
According to all known laws
of aviation,
 :
there is no way a bee
should be able to fly.
 :
Its wings are too small to get
its fat little body off the ground.
 :
The bee, of course, flies anyway
 :
because bees don't care
what humans think is impossible.
BARRY BENSON:
(Barry is picking out a shirt)
Yellow, black. Yellow, black.
Yellow, black. Yellow, black.
 :
Ooh, black and yellow!
Let's shake it up a little.
JANET BENSON:
Barry! Breakfast is ready!
BARRY:
Coming!
 :
Hang on a second.
(Barry uses his antenna like a phone)
 :
Hello?

Character:    Count:
        a        45
        b        25
        c        16
        d        10
        e        48
        f         9
        g         8
        h        17
        i        25
        j         1
        k        12
        l        34
        m         4
        n        31
        o        36
        p         4
        q         0
        r        24
        s        30
        t        31
        u        10
        v         1
        w        12
        x         1
        y        16
        z         2

Total Character Count: 452


See more at github.com/kailibenavente/alpha-count.