This is the program that I need to do:
Write a program that will sort an array of 20 integer numbers into descending order. The results must be displayed on the screen
in one column.
I tried this, me totally confuse.
I tried to do this program for one whole day, done flowchart... could not do it. Or it is me or the program.
If someone could help.
int i, p, j, sum, lar,sma, an, lar1, lar2; /*i for the number and p for the association of th number*/
printf(" Enter %d:",i);
scanf("%d",&p); /*I use p as my input*/
a[i] = p; /*I use i for my Array*/
if(p<lar && !=lar)
if (p<lar1 && !=lar1)
printf("a[%d] = %d\n", i, a[i]);
}while(i<j); /*I use J as my bonus*/
printf("\n\nThe sum of all this arrays is %d",sum);
printf("\nThe largest number is %d",lar);
printf("\nThe smalest number is %d",sma);