Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- string usunMalaLitere(string lancuch){
- string wynik;
- bool czyUsunieto = false;
- for(int i = 0; i < lancuch.length(); i++){
- if(lancuch[i] >= 'a' && lancuch[i] <= 'z' && !czyUsunieto){ czyUsunieto = true; }
- else{
- wynik += lancuch[i];
- }
- }
- return wynik;
- }
- int main() {
- string lancuch;
- cout << "Podaj lancuch: ";
- cin >> lancuch;
- string nowy = usunMalaLitere(lancuch);
- cout << nowy;
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement