Reverse

Description:

Write a program to reverse an array Example: Input should be six characters or numbers Test Case 1 Input (stdin) 6 1 2 3 4 5 6 Expected Output 6 5 4 3 2 1 Test Case 2 Input (stdin) 6 9 8 7 6 5 4 Expected Output 4 5 6 7 8 9

Program :

#include <iostream>

using namespace std;

int main()

{

int a,b,c,d,e,f,g;

  cin>>a>>b>>c>>d>>e>>f>>g;

  cout<<g<<" "<<f<<" "<<e<<" "<<d<<" "<<c<<" "<<b;

return 0;

}