Depends on how the program produces output. The simplest way would be through a file.