Potrebujem v tomto programe urobit to ze program sa po skonceni opyta ci chem pokracovat po zadani pismena a alebo program skonci,Podarilo sa mi urobit toto:
#include <iostream>
#include <cstring>
using namespace std;
int main (int argc, char *argv[])
{
char z;
int poc = 0;
char retaz[26], c;
do{
cout << "Zadaj retazec" << endl;
cin.getline(retaz, 26);
cout <<"Zadaj pismeno" << endl;
cin >> c;
poc= 0;
for (int i = 0; i < strlen(retaz); i++)
if (retaz[i] == c)
poc++;
cout << "Pocet pismen hladaneho pismena je: " << poc << endl;
cout<< "Opakovat?[a/n]: ";
cin>>z;
}while (z!='n');
cin.clear();
cin.sync();
cin.get();
return 0;
}