Help with Interactive / Non Interactive Shell script

Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines.
It then prompts for deletion of the file.
If user supplies arguments with the script , then it works on those files only.

                      • -- - - - - - - - - - - - - - -

The main problem Im facing with this question is how to make the program pick up a C program in case no arguments are specified .

Code :

ls -lrt *.C

Please elaborate it .

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

Double post of:

http://www.unix.com/shell-programming-scripting/117001-how-write-script-behaves-both-interactive-non-interactive-mode.html\#post302344434

The UNIX and Linux Forums.