Răspuns :
#include <iostream>
using namespace std;
int main()
{
int n,i=1;
cin>>n;
while(i<=n)
{
cout<<i<<" ";
i=i+1;
}
while(n)
{
if(n%2==1) cout<<n<<" ";
n=n-1;
}
}
using namespace std;
int main()
{
int n,i=1;
cin>>n;
while(i<=n)
{
cout<<i<<" ";
i=i+1;
}
while(n)
{
if(n%2==1) cout<<n<<" ";
n=n-1;
}
}