Răspuns:
#include <iostream>
#include <cstring>
using namespace std;
char s[256];
int main()
{
cin.getline(s, 256);
for(int i = 0; i < strlen(s); ++ i)
if(!(i &1 ))
cout << s[i] << " ";
cout << '\n';
for(int i = 0; i < strlen(s); ++ i)
if(i & 1)
cout << s[i] << " ";
return 0;
}
Explicație: