You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include<iostream>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int q[102]={0,6,3,1,7,5,8,9,2,4},head,tail;
|
|
head=1;
|
|
tail=10;
|
|
while(head<tail)
|
|
{
|
|
cout<<q[head]<<" ";
|
|
head++;
|
|
q[tail]=q[head];
|
|
tail++;
|
|
head++;
|
|
}
|
|
|
|
return 0;
|
|
}
|