2nd test case is going wrong
Max value in array
Arrays are initialized & assigned differently. Please read more about arrays too. To start with, I updated the code & added some comments.
If you have any other query, please feel free to ask.
is the second test case is about the array the thing which is different in my code i that i didnt use array instead i input a number and directly compare and store the bigger number
No, it is not about the array thing. You used to loop to solve the problem but we want you to implement arrays in the question so you get the better idea about them as well.