Write a program in C++ that asks the user to enter an array of size N and pass t
ID: 3691220 • Letter: W
Question
Write a program in C++ that asks the user to enter an array of size N and pass the array to a function named reverse_array that takes as its arguments an array of floating point values and an integer that tells how many floating point values are in the array. The function must reverse the order of the values in the array. The function should not return any value. Do not forget to write the main function as well. Display the original array and the reversed array in the main function.
Explanation / Answer
#include using namespace std; int main() { int temporary, arraylength; float array[20]; cout > arraylength; // number of array elements if (arrayLengthRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.