sort the array and print the last element in array
my solution in cpp
but i think this question wants only highest number so why we need to short
my code is already giving the highest number
If you’re doing in C, then create a macro for MAX and then run a loop while taking input and finding the MAX for the next input, hope this clears your doubt!
1 Like
Leave a new line after printing answer. Your solution is correct otherwise.
2 Likes
yes ,thanks a lot! for helping its correct now!
sorry for making it confusing. Yes @k_purushottam you are right you while you are printing it just add “\n” then it will get correct.
I have change your code
1 Like