what did wrong? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what did wrong?

i've done a roblem with arrays(an easy one) and i can't fix it.I need some help with it https://code.sololearn.com/cCjHQwUavCBF/?ref=app https://code.sololearn.com/cCjHQwUavCBF/?ref=app

12th May 2018, 4:45 PM
Thr3at
2 Answers
+ 4
int check(v[1000]) this function signature isn't valid. int check(int x) may be a better signature for what you need. You should name the local parameter variable something other than 'v' so as not to create a conflict with your global variable. Also, you should name your variables what they are to improve readability. a=max b=min as a comment is generally a bad practice. Just go ahead and name those variables min and max etc. You'll find that giving them appropriate names will make your code better in the long run instead of trying to make it shorter by using obfuscating identifiers.
12th May 2018, 5:24 PM
ChaoticDawg
ChaoticDawg - avatar
0
Than ks! I'll give it a try and hope it works😉🙏
13th May 2018, 3:52 PM
Thr3at