#include<stdio.h>
#include<conio.h>
main()
{
int a[100];
int n,largest,index,position;
printf("enter the number of elements in the array");
scanf("%d",&n);
printf("enter %d elements",n);
for(index=0;index<n;index++)
scanf("%d",&a[index]);
largest=a[0];
position=0;
for(index=1;index<n;index++)
if(a[index]>largest)
{
largest=a[index];
position=index;
}
printf("largest element in the array is %d\n",largest);
printf("largets element's position in the array is %d\n",position+1);
getch();
}
The Selection Sort definition is rather simple : find the largest number (element) in a list and move it to it's position in sorted form.You can perform selection sort like, smallest elements are in the beginning and largest element at the end.Now how this element arrange to it's exact position,We can do this by swapping elements at highest index and the process is continue till all the elements are sorted.
int lastLargestIndex(int a[],int n) //a=array, n= number of elements in array { int max=a[0],maxp=0; //max=largest no., maxp= position of largest no. for(int i=0;i<n;i++) if(a[i]>=max) { max=a[i]; maxp=i; } return maxp; }
The element with the largest number of nucleons is oganesson.
What is the element named for the sixth-largest continent?
/* using ellipses (...) to indicate tabs for clarity */ double largest (double *array, int M, int N) { ... int i, j; ... double *element; ... double answer = array[0][0]; ... for (i=0; i<M; i++) { ... ... for (j=0; j<N; j++) { ... ... ... element = array + i*M + j; ... ... ... if (*element > answer) answer = *element; ... ... } ... } ... return answer; }
Iron, Fe, is the 4th largest element found on the lithosphere.
middie
francium has the largest ionic radius
After carbon, The element having largest number of compounds is Hydrogen.
Element hassium has the largest Atomic Mass.
Manganese is a metal element. It shows the largest oxidation number.
no position