/*
#include <stdio.h>
#include <string.h>
int main()
{
int i, n, a;
char str[101]={};
gets(str);
a = strlen(str); // str의 길이
for(i=a-1; i>=0; i--)
{
printf("%c", str[i]);
}
return 0;
}
#include <stdio.h>
int main()
{
int i, n, a, b, c;
char str[21]={}, trs[21]={}, rst[21]={};
scanf("%s %s %s", str, trs, rst);
a=strlen (str);
b=strlen (trs);
c=strlen (rst);
if(str[a-1]==trs[0] && rst[c-1]==str[0] && trs[b-1]==rst[0])
{
printf("good");
}
else
{
printf("bad");
}
}
아스키코드 : 모든 문자에는 정해진 숫자
'a' 97
'b' 98
'c' 99
....
'z' 122
'A' 65
'B' 66
...
'Z' 90
' ' 32
'!'
'0' 48
'1' 49
..
'9' 57
'10' (x)
#include <stdio.h>
int main()
{
//printf("%c",'t'-32);
printf("%d",'5'-48);
}
int i;
char str[50]={};
scanf("%s",str);
for(i=0; str[i]!=NULL; i++)
{
if()
{
}
printf("%c",str[i]-32);
}
if(str[i]=='t')
if(str[i]==116)
// 소문자니?
if('a'<=str[i] && str[i] <='z')
if(97<=str[i] && str[i] <=122)
*/
#include <stdio.h>
#include <string.h>
int main()
{
int i;
char str[1001]={};
scanf ("%s", str);
for(i=0; str[i]!=NULL; i++)
{
if('a'<=str[i] && str[i]<='z')
{
printf("%c", str[i]-32);
}
else if('A'<=str[i] && str[i]<='Z')
{
printf("%c", str[i]+32);
}
}
}