Here any number of inputs can be taken from input and displaying them all in reverse order
Read this post on testedcodes.net