Can you please say why the elements of 'a' is not changed?
1 2 3 4 5 6 7 8 9 10 11 12 13
for(j=0;j<10;j++) // Assigning values to j
{
min=a[0]; // Assigning value to min
for(i=0;i<10;i++) // Assigning values to i
{
if(a[i]<min&&a[i]>a[x])
{
min=a[i]; // Assigning value to min
x=i; // Assigning value to x
}
}
cout<<"\n"<<min;
}
I've marked in your code everywhere that you assign a value. You don't assign a value to 'a' anywhere, so how can you expect it to be changed?