write a c++ program to find the largest and smalest element of an array int arrMark[]={50,20,15,85,20,10}; | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 3

write a c++ program to find the largest and smalest element of an array int arrMark[]={50,20,15,85,20,10};

22nd Jun 2017, 7:59 PM
Jack
1 Answer
+ 2
Use a for loop and compare every element to a temporary max/min until you find the real max/min.
22nd Jun 2017, 11:26 PM
Rrestoring faith
Rrestoring faith - avatar