Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cctype>
- #include <ctype.h>
- #include <cstring>
- using namespace std;
- int main()
- {
- string temp;
- cout<<"Podaj napis"<<endl;
- cin>>temp;
- int n=temp.length();
- char napis[n+1];
- strcpy(napis,temp.c_str());
- for(int i=0;i<temp.length();i++){
- bool cos = isspace(napis[i]);
- if(!cos){
- if(isupper(napis[i])){
- napis[i]=tolower(napis[i]);
- }else{
- napis[i]=toupper(napis[i]);
- }
- cout<<napis[i];
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement