Computer Science, asked by zia41, 1 year ago

write an algortham and program to find largest number an array​

Answers

Answered by kavyanshi0208
1

The program output is also shown below.

* C Program to Find the Largest Number in an Array.

int array[50], size, i, largest;

printf("\n Enter the size of the array: ");

scanf("%d", &size);

printf("\n Enter %d elements of the array: ", size);

for (i = 0; i < size; i++)

scanf("%d", &array[i]);

largest = array[0];

mark as branliest


zia41: thanks for program dear but algortham is missing ?
kavyanshi0208: 1. Create an array and taking its size from the users, define all its elements.
2. Take an input from users, the position in the array where we want to access element.
3. The element would be in the index (entered_position -1) of the array, print it.
Similar questions