:: Study Recursion Function

::: How replay function self

function sum(arr, n) {
  // Only change code below this line
  // :: When n is 0 or minus, Don't Sum anything.
  // ::: also When you last Index
  if(n <= 0) {
    return 0;
  } else {
    // :: Remember first value and Call <Next : self(n - 1)>
    return arr[n - 1] + sum(arr, n - 1);
  }
  // Only change code above this line
}
블로그 이미지

RIsN

,

D2 : Intro Animation

Spine2D 2020. 11. 8. 22:47

:: Version : A

: 2020-10-28


: Dogma / Coin Intro

: Just Simple Animations


블로그 이미지

RIsN

,

백준 10172 : 개 // 성공

C# 2020. 11. 7. 22:03

아래 예제와 같이 개를 출력하시오.

없음.
개를 출력한다.

:: 성공

: 개선점 : 없음

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Print02
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("|\\_/|");
            Console.WriteLine("|q p|   /}");
            Console.WriteLine("( 0 )\"\"\"\\");
            Console.WriteLine("|\"^\"`    |");
            Console.WriteLine("||_/=\\\\__|");
        }
    }
}

'C#' 카테고리의 다른 글

백준 10998 : A×B  (0) 2020.11.13
백준 1008 : A/B  (0) 2020.11.12
백준 10171 : 고양이 // 성공  (0) 2020.11.06
백준 1874 : 스택 수열 // 실패  (0) 2020.11.05
백준 10828 : 스택 // 실패  (0) 2020.11.04
블로그 이미지

RIsN

,