diff --git a/task1.cpp b/task1.cpp new file mode 100644 index 0000000..f231955 --- /dev/null +++ b/task1.cpp @@ -0,0 +1,21 @@ +#include +#define SIZE 80 +using namespace std; + +int main() +{ + char str[SIZE]; + cout << "Input string: "; + cin.getline(str, SIZE); + + int i = 0; + while (str[i] != '\0') { + if (str[i] == ' ') { + str[i] = '\t'; + } + ++i; + } + + cout << "Modified string: " << str << endl; + system("pause"); +} \ No newline at end of file