#include #include #include int main() { setlocale(LC_ALL, ""); wchar_t s[256]; wchar_t c; int n = 0, st = 0; printf("write: "); while(st == 0){ wscanf(L"%lc", &c); st = (c == '\n'); s[n] = c; n = n + (1 - st); } while(n > 0) { n -= 1; wprintf(L"%lc", s[n]); } printf("\n"); return 0; }