목록programmers (1)
Self Rescue
[programmers] 문자열 돌리기
문제 설명 문자열 str이 주어집니다. 문자열을 시계방향으로 90도 돌려서 아래 입출력 예와 같이 출력하는 코드를 작성해 보세요. ..돌려? 돌리라 해서 잠시 멍 때리다가 한 칸씩 줄바꿈 해서 출력하도록 함. 통과되니 패스. C# public class Example { public static void Main() { // 1. str에 담을 문자열 입력 받기 string str = Console.ReadLine(); // 2. 문자 1개씩 출력 후 줄바꿈 하기 for (int i = 0; i < str.Length; i++) { Console.WriteLine(str[i]); } } } C++ #include #include using namespace std; int main(void) { // 1..
공부/코딩테스트
2024. 3. 15. 01:52