Write an algorithm to input a side of a square and calculate its area and perimeter
Answers
Answered by
0
Explanation:
Algorithm to find the smallest and largest numbers in an array
Input the array elements.
Initialize small = large = arr[0]
Repeat from i = 2 to n.
if(arr[i] > large)
large = arr[i]
if(arr[i] < small)
small = arr[i]
Print small and large.
Similar questions