# Is an inputless program redundant?

Are there useful programs that don't take inputs from a user, environment etc. such as key input, or the current time?

A program that computed/printed out predefined data could be turned into a file, right?

• Calculate any defined problem, hardcoded for oprimisation purposes, run and wait for results. Calculate Pi or other expansions. Yes, if a program always return the same result it can be just stored as the file. Sorry I am not sure how this is the Computer Science (maybe I an wrong and it is perfectly ok). And the usefulness is a subjective term. Someone may want to perform heating test on hardware so the program producing random numbers that doesn't bother to print them anywhere becomes useful. – Evil Mar 11 '17 at 22:54
• How is this a computer science question? Also, please define "useful". Would for i = 1 to infty { print i-th prime } qualify? – Raphael Mar 11 '17 at 23:06
• Program that wakes me up at 8am every day is pretty useful. – Eugene Mar 12 '17 at 4:14
• A program that wakes you up every day at 8 a.m. takes input, namely the current time and the time you wish to be woken up. Just because the task is repetitive and requires minimal input does not make it inputless. I think you will find that, at the very least, any program or algorithm that does not take some form of input does not produce meaningful output (and therefore is useless or redundant as the OP puts it). – DeBunkeD Mar 12 '17 at 17:21
• Emm, poor software design skills guys. My program takes no input. It just runs a lot of nops and then signals the alarm. The number of nops is calibrated to be equal exactly 24 hours on my machine. – Eugene Mar 12 '17 at 19:35