Here i did names(N-1) then sout(N)
after doing this output is 1 , 2 , 3, 4 instead it should be 4, 3 ,2 ,1.
when I move the names function that is name(N-1) below the sout(N).
then it gives output: 4,3,2,1 which is excatly vice versa of the above
New contributor
Vishal Aggarwal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.