fork download
  1. #include<iostream>
  2. using namespace std;
  3. void kopiuj(char *cel, char *zrodlo)
  4. {
  5. int n=0;
  6. while (zrodlo[n] != '\0')
  7. {
  8. n++;
  9. }
  10. for (int i = 0; i < n; i++)
  11. {
  12. cel[i] = zrodlo[i];
  13. }
  14. }
  15. int main()
  16. {
  17. char tab[10];
  18. char dfg[10];
  19. int n = 0;
  20.  
  21. for (int i = 0; i < 10; i++)
  22. {
  23. cin >> tab[i];
  24. }
  25. kopiuj(dfg, tab);
  26. for (int j = 0; j < 10; j++)
  27. {
  28. cout << dfg[j] << endl;
  29. }
  30. return 0;
  31. }
Success #stdin #stdout 0s 3344KB
stdin
123123
stdout
1
2
3
1
2
3
�
�
W
�