Thursday, July 17, 2014

Delete from Queue

#include
using namespace std;
int main()
{
cout<<"Delete from Quee"<<endl;
int a[5]={1,2,3,4,5},i;

for(i=0;i<=4;i++)
{
a[i]=a[i+1];
}

a[i-1]='\0';
for(i=0;i<5;i++){
cout<<a[i]<<endl;
}
return 0;
}

1 comment:

  1. #include
    using namespace std;
    int main()
    {
    cout<<"Delete from Quee"<<endl;
    int a[5]={1,2,3,4,5},i;

    for(i=0;i<=4;i++)
    {
    a[i]=a[i+1];
    }

    a[i-1]='\0';
    for(i=0;i<5;i++){
    cout<<a[i]<<endl;
    }
    return 0;
    }

    ReplyDelete