Thursday, July 17, 2014

Visit a Stack

#include
using namespace std;
int main()
{
int a[5]={1,2,3,4,5},i=4;
while(i>=0){
cout<<a[i]<<endl;
i--;
}
return 0;
}

1 comment:

  1. #include
    using namespace std;
    int main()
    {
    int a[5]={1,2,3,4,5},i=4;
    while(i>=0){
    cout<<a[i]<<endl;
    i--;
    }
    return 0;
    }

    ReplyDelete