Receiving 5 volts as an input, and then sending 5 volts as an Output

"will not work" conveys no useful information. The code does something, what does it do?

Look at that statement very carefully comparing it to the syntax for the analogRead() function and the if structure. Note, especially, the placements of the parenthesis.

Read the forum guidelines to see how to properly post code and some hints on how to get the most from this forum.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.