Question: Hi! I need help coding this in C language please! I also included the skeleton he gave us for it. If you're going to write
Hi! I need help coding this in C language please! I also included the skeleton he gave us for it. If you're going to write this in something other than C language please don't, as this class is just in C.
Thank you!!


So an array such as ex [100]={56,87,23,15,33} would be changed to, array1:desc[100]={87,56,33,23,15} array2:asc[100]={15,23,44,56,87} Your program should accomplish the following: a. Ask user for the size of the array and use a loop to fill the array with values. b. Using loops, sort the values of the array in descending and ascending order which will be saved into your two separate arrays. (You can utilized 2 nested loops to perform the sorting) You will also utilize a conditional statement to perform the sorting correctly. c. Print the both arrays to the screen (using loops). Showing both ascending and descending orders. d. Code should be uploaded as a .txt file and a screenshot of the screen displaying your array is required. e. Provide comments that explain the basic logic of your loop structure and how it performs sorting or points will be taken off. In mathematics, the factorial of a non-negative integer n, denoted by n !. n !, is the product of all positive integers less than or equal to n. note: (0!=1) Ex. 4!=4321=24 5!=54321=120 n!=n(n1)(n2)321 \#define_CRT_SECURE_NO_WARNINGS \#include int main(void) // Initializing array int lengths[100]; // Declare loop variables, array counters etc. // Ask user for size of the array. // printf/scanf // Loop through array, scanning in values. // Utilizing loops, sort the array in descending order. // Can use two nested loops, to test values of the array. // You will utilize a conditional statement (if) to correctly sort
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
