From 5f709cc80a456666f1a4a72f6388bd79d8f05d5f Mon Sep 17 00:00:00 2001 From: Misha Date: Tue, 7 Oct 2025 19:23:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20task1.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task1.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 task1.cpp 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