Pls check my code

max and min values are not comming

hello @harshita.rathee the comparison is perfectly right but you are not taking the input to apply this comparison upon .
like you should take numbers till n is valid or you should take input by array and then apply this comparison on array only .
Happy Learning !!


i have made changes in your code and now it is giving the correct output .

thank you…

but it does not work in my command prompt.
while it does work in the coding blocks IDE.
any specific reason for that?

@harshita.rathee i use online coding blocks ide only .
so here i dont have any idea about why it is now working .

but is it that this does work in the ide cause they require a separate input and output file.

in text editors yes it is like that .
for example in sublime first you have to build your program by pressing ctrl +b and after that yo have to execute .exe file of your code .
this can be done by using ctrl +t .

if you use sublime then cb.lk/install can help you setting the environment properly .
hope this helps .
Happy Learning !!

ok…

thank you…

@harshita.rathee please mark this doubt as resolved .