occurrence of one particular digit

Write a program to count the occurrence of one particular digit in numbers in a given range, inclusive of the first and the last element in that range. Program should accept the user input using command line arguments. In case of a bad input, program should output appropriate message as mentioned in output specification below.

//