# L-15.5 MCS 260 Mon 21 July 2014 : cntrlc.py

"""
The following program shows the handling
of the keyboard interrupt: cntrl+c.
"""

COUNT = 0
print 'hold ctrl and c to stop...'
try:
    while True:
        COUNT = COUNT + 1
except KeyboardInterrupt:
    print 'counted ' , COUNT
