Build a program that uses a single-dimension array to store 10 numbers input by a user. After inputting the numbers, the user should see a menu with two options to sort and print the 10 numbers in ascending or descending order.
This is what I have so far, and I'm stuck.
Code:#include<stdio.h> int main(void) { int iNumbers[10]; int iEntry=0; int x=0; printf("Enter 10 Numbers"); for (x=0; x<=9; x++) { scanf("%d", &iNumbers[x]); } printf("\n\nAscending or Descending Order?"); printf("\n1)\tAscending\n"); printf("\n2)\tDescending\n"); scanf("%d", &iEntry); for(x = 0; x<=9; x++) printf("%d", &iNumbers[x]); }