(a) Write a few lines of code to declare an array of 10 floats called a and set its member elements equal to the numbers from 1 to 10. (b) Write a few lines of code to add up each of the members of the array a and print the sum to the terminal. Show transcribed image text (a) Write a few lines of code to declare an array of 10 floats called a and set its member elements equal to the numbers from 1 to 10. (b) Write a few lines of code to add up each of the members of the array a and print the sum to the terminal.
Expert Answer
Answer to (a) Write a few lines of code to declare an array of 10 floats called a and set its member elements equal to the numbers…