Question: CS 2 4 0 HOMEWORK 4 Write a C program that meets the following requirements: Input: There are 2 lines of input: - First line:
CS HOMEWORK Write a C program that meets the following requirements: Input: There are lines of input: First line: the list of integers S SSSSn n Each integer is in the range of can be positive, negative or zero Second line: an integer X Output: The program will Read from stdin and save list S into a linked list. Remove all nodes in the list where the values are less than X Sort the remaining list in ascending order Finally, print lines into stdout: The sorted list of integer, each integer is separate by comma The original index of the sorted integers, separate by comma If no integers remain after filtering, print nothing into stdout. Note: If two numbers are the same, the smaller index will appear first. Please use a linked list to store and process the integers, you CANNOT use arrays. SAMPLE INPUT SAMPLE OUTPUT SAMPLE INPUT SAMPLE OUTPUT SAMPLE INPUT SAMPLE OUTPUT
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
