On UNIX systems, when you type a command, the shell looks through a list of possible command locations to figure out what program it should run.  This list is stored in the PATH environment variable, which you can see by typing:
echo $PATH

This should return a couple of lines' worth of directories separated by colons.  By default, for security reasons, the current working directory '.' is not in your 'path', so the shell doesn't look there for the program you're trying to run.  It looks in all the system locations in the PATH, doesn't find it, and returns an error.Also, when you compile a Fortran, C, C++, or Pascal program without specifying an output file, an executable file called a.out is created in the current working directory.  So, assuming your program is now called a.out, to run the program you would need to explicitly specify to look in the current directory by typing './' before the program name, like so: