I made a program that determines the largest and smallest integers in a list. The program works but displays the largest and smallest integers however many times they appear in the list. I've considered many possibilities but none seem to work.
if (condition) {
//Stuff
}
elseif (condition) {
//This stuff is only executed if the above if's stuff was not executed.
}
elseif (condition) {
//This stuff is only executed if the above if's stuff and the above else if's stuff was not executed.
}