ИМАМ ПРОГРАМАТА НА Ц++,но немога да си направя блок схемата помогнета ми моля ви
#include <iostream>
#include <fstream>
using namespace std;
int main(){
ifstream txt;
ofstream write;
char c, *all, *old;
int i = 0;
txt.open("nasko_data.txt");
if ( ! txt.is_open()) {
cout << endl << "Ne moga da otvorq faila za 4etene!";
return -1;
}
txt >> c;
all = new char;
*all = c;
while ( ! txt.eof()) {
if (c == '!' ||
c == '?' ||
c == '.' ||
c == ',' ||
c == '-' ||
c == '?'
) {
txt >> c;
continue;
}
old = all;
all = new char;
if (all == NULL) {
cout << endl << "Ne moga da zadelq pamet!";
return -1;
}
all = old;
all = c;
i++;
txt >> c;
}
write.open("nasko_data.txt");
if ( ! write.is_open()) {
cout << endl << "Ne moga da otvorq faila!";
return -1;
}
for (int t=0;t<i; t++)
write << all[t] << " ";
write.close();
cout << endl << "Informaciqta beshe uspeshno zapisana vyv faila";
cin.get();
return 0;
}