added program to demonstrate the use of ranges
added program to demonstrate the use of methods