# L-28 MCS 260 Wed 16 Mar 2016 : 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)
