Write a program to process a collection of daily high temperatures. Your program should count and print the number of “hot days” (temperatures of 25ºC or higher), the number of
Write a program to process a collection of daily high temperatures. Your program should count and print the number of “hot days” (temperatures of 25ºC or higher), the number of
Write a program to process a collection of daily high temperatures. Your program should count and print the number of “hot days” (temperatures of 25ºC or higher), the number of “pleasant days” (temperatures 16ºC - 24ºC), and the number of “cold days” (temperatures of less than 16ºC). It should also display the category of each temperature. Test your program on the following data:
16, 23, 22, 28, 31, 5, 19, 23, -5, 26, 27, 9, 12, 14, 34, 12, 15, 32, 28, 24, 12, -3, 19, 26, 34, 12
(Hint: declare and initialise an array with these numbers at the beginning of the program)
Also, modify your program to display the average temperature (a real number) at the end of the run.
Do not forget to produce the design document for this exercise!
Write a program that initialises an array of double and then copies the contents of the array into two other arrays. Declare all arrays in the main program.
To make the first copy, make a function, which uses the array notation (the square brackets []) to access the elements of the array.
To make the second copy, write a function that uses the pointer notation and pointer incrementing to access the elements of the arrays.
Have each function take as function arguments the name of the target array and the number of elements to be copied.
Here is an example showing how the functions should be called, given the following declarations:
double source[4] = {1,2.3,4.5,6.7};
double destination1[4];
double destination2[4];
copy_array(source, destination, 4);
Write a program that declares a 3 by 5 two-dimensional array and initialises it with some values of your choice. The program should:
Write a function that is responsible for displaying the values and a second function that doubles the values. The functions could take as arguments the array name and the number of rows as arguments.
EdgeLane Airlines has a fleet of one plane with a seating capacity of 14 arranged as 7 rows (1 to 7) of two seats (A and B) (i.e. the seat identification labels are
To choose a function, enter its letter label:
a) Show assigned seats with passenger names.
b) Show list of empty seats.
c) Assign a customer to a seat.
d) Edit customer details, for a specific seat.
e) Delete a seat assignment.
f) Quit.
After executing a particular function the program should show the menu again except for choice (f)