Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- void IzmijeniString (string &s)
- {
- auto a(s.begin());
- while (a!=s.end())
- {
- if ((*a>='a' && *a<='z') &&( *(a-1)==' ' ||(*(a-1)>='0' && *(a-1)<='9'))) *a=(*a)-32;
- a++;
- }
- }
- int main () {
- string rec={"Dobio sam 25maraka."};
- IzmijeniString(rec);
- cout<<rec;
- return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement