Problem Description
把一个字符串里所有的大写字母换成小写字母,小写字母换成大写字母。其他字符保持不变。
Input
输入为一行字符串,其中不含空格。长度不超过80个字符。
Output
输出转换好的字符串。
Sample Input
ABCD123efgh
Sample Output
abcd123EFGH
Hint
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace test1
{
class Program
{
static void Main(string[] args)
{
string s;
s = Console.ReadLine();
char[] a = s.ToCharArray();
int i;
for(i=0;i<s.Length;i++)
{
if(a[i]>='a'&&a[i]<='z')
{
a[i] = (char)(a[i] - 32);
}
else if(a[i]>='A'&&a[i]<='Z')
{
a[i] = (char)(a[i] + 32);
}
}
Console.WriteLine(a);
}
}
}