It looks like you're new here. If you want to get involved, click one of these buttons!
i have searched many websites for this question.They are doing it by some different approach.
This code is just not giving output if i input first element of array as largest i.e. a.
i think some minor change is required.
can anyone please tell me......
printf("enter number of elements you want in array");
if(a[i]>largest2 && a[i]<largest1)
printf("First and second largest number is %d and %d ",largest1,largest2);