Question: Use the specific constructions and the characteristics of each programming language to write the following programs: The input is from standard input, and all output

Use the specific constructions and the characteristics of each programming language to write the following programs: The input is from standard input, and all output is standard output. Use the constructions in the slides/examples and avoid using built-in functions that are not necessary, or you can program these functions yourself (mainly for \(\mathrm{C}++/\mathrm{Php}/\mathrm{Perl}\)).
1.(10 marks each program, maximum 80) Write a program in C, also in C++, Pascal, Cobol, Fortran, Perl, PHP, ADA, and C\# that computes the sublist \( S \) of a list \( L=\left(X_{1}\ldots X_{n}\right)\) obtained as follows:
(a) The first element of the sub-list \( S \) is an odd number in list \( L \).
(b) No odd number in \( L \) has an index lower than the index of the element selected at the previous step (1a).
(c) The last element of the sublist \( S \) is an even number in list \( L \).
(d) No even number in \( L \) has an index higher than the index of the element selected at step \(1 c \).
(e) All the other elements of the sublist are the cubes of the elements of the first list, having indexes between the two selected numbers.
(f) If such numbers (like the ones mention in Step 1a or Step 1c) do not exists for the input list, the program should display an appropriate message, and the sublist \( S \) is an empty list.
All the situations generating an empty list should be detected by your program.
List must be stored as arrays. You choose the exact format of the input data, but it must be documented.
Here is a possible example of running a program:
```
$cc x.x -o x
$./x HERE
12
```
Use the specific constructions and the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!