암호 해독

프로그래머스 2023. 10. 18. 15:43
728x90

    string cipher = "pfqallllabwaoclk";
    int code = 2;
    string answer = "";
    char[] charr = cipher.ToCharArray();

    for (int i = 1; i <= cipher.Length / code; i++)
    {
        answer += charr[code * i -1];
    }

    return answer;

 

728x90

'프로그래머스' 카테고리의 다른 글

로그인 성공  (0) 2023.10.18
직각삼각형 출력  (0) 2023.10.18
제곱수 판별  (0) 2023.10.18
숨어있는 숫자의 덧셈  (0) 2023.10.17
[프로그래머스] 최빈값 구하기  (0) 2023.10.17
Posted by 바르마스
,