Aplicatii cu siruri de caractere
1. //Numararea aparitiilor unui cuvant intr-un sir si afisarea pozitiilor
#include <iostream.h>
#include <string.h>
#include <conio.h>
void main()
cout<<endl<<"Nr. de aparitii ale cuvantului in text: "<<k;
getch();
}
2. //Sterge toate aparitiile unui cuvant intr-un sir
#include <iostream.h>
#include <string.h>
#include <conio.h>
void main()
cout<<"Textul obtinut dupa stergere:"<<s;
getch();
}
3. //Inlocuieste toate aparitiile unui cuvant intr-un sir cu alt cuvant
#include <iostream.h>
#include <string.h>
#include <conio.h>
void main()
cout<<"Textul obtinut dupa stergere:"<<s;
getch();
}
4. //Se citeste un text. Sa se afiseze suma numerelor din text.
#include <iostream.h>
#include <string.h>
#include <stdlib.h>
#include <conio.h>
void main()
cout<<"Suma= "<<suma;
getch();
}
5. //exemple conversii din sir in numar
#include <iostream.h>
#include <string.h>
#include <stdlib.h>
#include <conio.h>
void main()
6. //exemple conversii din sir in numar
#include <iostream.h>
#include <string.h>
#include <stdlib.h>
#include <conio.h>
void main()
|