-------------------- -------------------- -------------------- -------

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//---------------------------------------------------------------------------
#include <clx.h>
#pragma hdrstop
//---------------------------------------------------------------------------
#pragma argsused
#include <iostream.h>
#include <conio.h>
using namespace std;
int main(int argc, char* argv[])
{ const int N=15;
char str[N], newstr[N], symbol;
int count = 0;
cout << "Input text, not longer that 15 symbols:";
cin >> str;
for (int i=0; i<15; i++){
symbol=str[i];
if(symbol=='.'){
symbol='_';
count++;
}
newstr[i] = symbol;
}
cout << "\nString, that was replaced: " << newstr << "\n" << "Count Replace:" << count << endl;
getch();
}