alsav22
5434 / 4829 / 442
Регистрация: 04.06.2011
Сообщений: 13,587
|
15.10.2013, 18:18
|
|
C++ | 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
28
| #include <iostream>
#include <fstream>
#include <cctype>
using namespace std;
int main()
{
ifstream fin("input.txt");
if (!fin) cout << "Error fin!" << endl;
else
{
ofstream fout("output.txt");
if (!fout) cout << "Error fout!" << endl;
else
{
char ch;
while (fin >> ch)
{
if (ispunct((unsigned char)ch))
fout << ch;
}
fout.close();
}
fin.close();
}
return 0;
} |
|
0
|