Write a full C++ program to read a series of integer numbers from standard input and print them out in reverse order, one per line. You may assume that there will be a minimum of 2 numbers to read and a maximum of 200.
#include <iostream>
using namespace std;
int main()
{
int n;
cout<<"how may numbers you want to take : ";
cin>>n;
int arr[n];
cout<<"Enter Elements : ";
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
for(int j=n-1;j>=0;j--)
{
cout<<arr[j]<<endl;
}
return 0;
}
if you have any doubts ask me..
Get Answers For Free
Most questions answered within 1 hours.