The fact that you are a professional actually supports my point. It should have been dead easy for you to find how to check for parameters. Homework needs not be assigned by a school. It can be self-assigned, as it should have been in this case. Sounds like you could use a refresher.

There was no malice in my reply. The idea was to influence others not to give an outright answer in order to influence the poster to actually do his own homework.

Comment on Re^3: How to write a program to read stdin or command line?