The structured program theorem is a theorem in programming and computer science. A computer program can be split into pieces of code that do a certain task. According to the structured program theorem, these smaller tasks can be combined in only three ways to get any larger task done.