Hi all
i'm new to cprogramming
I'm trying to write a program that should ask as input an array of int and should display the values of that array ordered by decreasing size <
I cant get the program to work
Do u think u can help me
here's my code
#include <stdio.h>
#define nb 5
int i , j , n , min ,minInd;
void main(void)
{
int E[nb] ;
printf("enter numbers");
for (i=0; i<5 ; i++)
{scanf("%d", E[i] );
min= E[i];
minInd=i;
for (j=i+1; j<=n ; j++)
{
if (min > E[i])
min= E[i] ;
minInd= j ;
}
E[minInd]=E[i] ;
E[i]=min;
}
for (i=0; i<5 ; i++)
printf("%d", E[i]);
}