Добавить task1.cpp
This commit is contained in:
21
task1.cpp
Normal file
21
task1.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <iostream>
|
||||
#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");
|
||||
}
|
||||
Reference in New Issue
Block a user