Saturday 5 July 2014

Print the element in an array in reverse order.


#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a[100],i,limit;
cout<<"ENTER THE LIMIT:";
cin>>limit;
cout<<"ENTER"<<limit<< "NUMBERS:";
for(i=0;i<limit;i++)
{
cin>>a[i];
}
cout<<"ARRAY IN REVERSE ORDER:";
for(i=limit-1;i>=0;i--)
{
cout<<"\t"<<a[i];
}
getch();
}


1 comment:

  1. factorial-of-hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.

    factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.

    ReplyDelete