Find largest number in an Array Assignment Help

Assignment Help: >> Algorithms for Problem Solving >> Find largest number in an Array

Find largest number in an array 

Largest number means the greatest number comparison to the other number in the array element.

Example: Suppose we take the 10 arrays element, which is given below:

Array location:   a[0]        a[1]        a[2]        a[3]        a[4]        a[5]        a[6]        a[7]        a[8]        a[9]

Element:              1              4              6              4              8              9              6              76           45           23

Largest Number in an Array: 76

Algorithm:

Step 1: Start

Step 2: Take the value of element in an array.

Step 3: Set temporary variable and assign the value of first element to temp.

Step 4: Compare the value of temp with the next element of the array.

Step 5: If the element is having greater value than temp variable, assign that value in temp.

Step 6: Repeat step 4 and step 5 till end of the array is encountered.

Step 7: Print the largest value of temp variable.

Step 8: Stop.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd