Enter the # of value of an array:
4
Enter the value of an array:
350
450
670
1000
The value in descending order:
1000
670
450
350
The 2nd largest element is:
670
The 2nd lowest element is:
450
The average of 2nd largest and 2nd lowest element is 560 is not in the array element.
can anyone help me? this is my final project on my subject compiler.. Im a newbie..
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
http://globalproganswer.com/questions/askquestion
#include <stdio.h>int main()
{
int a[10]; // u need to always specify the size of an array, dynamic size is not possible; if u know ur array size is always 4 then declare a[4];
int i,j; // for loop indexing
int n = 4; // since in ur case u said it is 4
}
// this is the basic version of the code
When you run it, does it work? If not, what is displayed?