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(napis[i]>96){
- napis[i]-=32;
- }else{
- napis[i]+=32;
- }
- cout<<napis[i];
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement