#include<iostream> #include<cctype> int main() { using namespace std; char ch; while((ch=cin.get())!='@') { if(isdigit(ch)) continue; if(islower(ch)) { cout<<(char)toupper(ch); } else if(isupper(ch)) { cout<<(char)tolower(ch); } } return 0;
#include<iostream> #include<cctype> using namespace std; typedef char ElemType; typedef int Status; typedef struct Node { ElemType data; struct Node *next; }Node; int main(){ Node *head = new Node; head->next = NULL; char sign; Node *p= head; while(cin>>sign,sign!='@'){ Node *c = new Node; if (islower(sign)){ sign = toupper(sign); }else if(isupper(sign)) { sign = tolower(sign); } c->data = sign; c->next = p->next; p->next = c; } while(head->next!=NULL){ head = head->next; cout<<" -> "<<head->data; } cout<<endl; system("pause"); return 0; }
#include <stdlib.h>
#include
#include
using namespace std;
int main()
{
char tmp;
cin.get(tmp);
while (tmp !='@')
{
if (!isdigit(tmp)) {
if (tmp >= 'a' && tmp <= 'z') {
tmp = toupper(tmp);
}else if (tmp >= 'A' && tmp <= 'Z') {
tmp = tolower(tmp);
}
cout << tmp;
}
cin.get(tmp);
}
}