C# 알고리즘 코딩(프로그래머스)
프로그래머스 C# 대소문자 바꿔서 출력하기
라이프앤타임
2023. 5. 25. 10:54
using System;
using System.Linq;
public class Example
{
public static void Main()
{
String s;
String res = "";
Console.Clear();
s = Console.ReadLine();
for(int i = 0;i<s.Length;i++)
{
if(s[i].ToString() == s[i].ToString().ToUpper())
{
res += s[i].ToString().ToLower();
}
else
{
res += s[i].ToString().ToUpper();
}
}
Console.Write(res);
}
}