Accepts input variables and prints the output accd to specs