12345678910111213
#include <iostream> using namespace std; int main() { size_t MAX_ELEMENTS = 8, index = 0; int a[MAX_ELEMENTS]; char ch; while (cin >> ch && index++ < MAX_ELEMENTS){ a[index - 1] = ch - '0'; cout << a[index - 1] << endl; } }