Top

[백준/C#(.NET)] 11382 꼬마 정민

전산 소프트웨어(코딩)/C#[메인]

2023. 7. 5.

백준 온라인 저지 / 11382 꼬마 정민

https://www.acmicpc.net/problem/11382

 

사용언어 : C# (.NET)

알고리즘 : 

□코드 작성(해답지)

using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;


namespace boj
{
    class Program
    {
        static void Main(string[] args)
        {
            string stringInput = Console.ReadLine();
            string[] arrayInput = stringInput.Split(' ', StringSplitOptions.None);
            long[] intResult = new long[3] { 0, 0, 0 };

            for (int i = 0; i < 3; i++)
            {
                intResult[i] = System.Convert.ToInt64(arrayInput[i]);
            }

            long total = 0;
            for (int i = 0; i < 3; i++)
            {
                total += intResult[i];
            }

            Console.WriteLine(total);
        }
    }
}