+ 2

Need help

how to write a program to reads a value of N and then computes the third smallest number ?

24th May 2017, 3:38 PM
dinusha
6 Réponses
+ 5
To do that you world need to sort your array from lowest to highest. Then you would need to index the third value.
24th May 2017, 4:41 PM
Manual
Manual - avatar
+ 4
I would like to know the answer as well. How do you like C++ so far?
24th May 2017, 3:50 PM
Manual
Manual - avatar
+ 2
value of N in some sort of a function or just Any N?
24th May 2017, 7:17 PM
Luyanda
Luyanda - avatar
+ 2
@Luyanda I think to sort numbers by value. I have been checking out some stuff online to do it on my downtime.
24th May 2017, 7:39 PM
Manual
Manual - avatar
+ 2
I have been reading this to sort an array http://mathbits.com/MathBits/CompSci/Arrays/Sorting.htm
24th May 2017, 7:47 PM
Manual
Manual - avatar
+ 2
This one works as well So far, it seems easier than the other http://www.cplusplus.com/articles/NhA0RXSz/
24th May 2017, 7:51 PM
Manual
Manual - avatar