Following are the code to this question:
Program Explanation:
Program:
#include <iostream>// header file
using namespace std;
int main()//main method
{
int arr1[]= {10, 15, 19, 23, 26, 29, 31, 34, 38};//defining array of integer values
int i;//defining integer variable
cout<<" Array from first to last: ";//print message
for(i=0;i<9;i++)//use for loop to print array
{
cout<<arr1[i]<<" ";//print array value
}
cout<<"\n Array from last to first : ";//print message
for(i=9-1;i>=0;i--)//defining for loop to print array in reverse order
{
cout<<arr1[i]<<" ";//print array
}
return 0;
}
Output:
Array from first to last: 10 15 19 23 26 29 31 34 38
Array from last to first : 38 34 31 29 26 23 19 15 10
Learn more:
brainly.com/question/12906023