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

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

namespace Study11
{
    class App
    {
        public App()
        {
            //[BOJ] 4458 첫 글자를 대문자로
            string[] arr = {
                "powdered Toast Man",
                "skeletor",
                "Electra Woman and Dyna Girl",
                "she-Ra Princess of Power",
                "darth Vader"
                };

            //여기서부터 작성 하세요 

            for (int i = 0; i < arr.Length; i++)
            {
                for (int j = 0; j < arr[i].Length; j++)
                {
                    if (j == 0)
                    {
                        string str = arr[i].ToUpper();
                        
                        Console.Write(str[j]);
                    }
                    else
                    {
                        Console.Write(arr[i][j]);
                    }
                }
                Console.WriteLine();
            }

            //출력 
            //Powdered Toast Man
            //Skeletor
            //Electra Woman and Dyna Girl
            //She - Ra Princess of Power
            //Darth Vader

        }
    }
}

+ Recent posts