Go Program to Find Largest and Smallest Number in an Array

Write a Go Program to Find Largest and Smallest Number in an Array using For loop. First, we assigned the first array item to both the largest and smallest value (largest := lgsmArr[0] and smallest := lgsmArr[0]). Within the for loop (for i = 0; i < lgsmsize; i++), we used two if conditions. The … Read more