#include<iostream>
#include<queue>
using namespace std;
void anik(queue<int>r)
{
while(!r.empty())
{
cout << r.front() << endl;
r.pop();
}
cout << endl;
}
int main()
{
queue<int>a;
a.push(3);
a.push(4);
a.push(5);
a.push(6);
a.push(7);
a.push(8);
a.push(9);
a.push(10);
a.push(11);
a.push(12);
anik(a);
cout << endl << "Size of a is :: " << a.size() << endl;
cout << endl << a.back() << endl;
return 0;
}
#include<queue>
using namespace std;
void anik(queue<int>r)
{
while(!r.empty())
{
cout << r.front() << endl;
r.pop();
}
cout << endl;
}
int main()
{
queue<int>a;
a.push(3);
a.push(4);
a.push(5);
a.push(6);
a.push(7);
a.push(8);
a.push(9);
a.push(10);
a.push(11);
a.push(12);
anik(a);
cout << endl << "Size of a is :: " << a.size() << endl;
cout << endl << a.back() << endl;
return 0;
}
Comments
Post a Comment