S_pot
C#_Split: 입력값 띄어쓰기 본문
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp6
{
class Program
{
static void Main(string[] args)
{
string s = Console.ReadLine();
string[] ss = s.Split();
int hour = int.Parse(ss[0]);
int min = int.Parse(ss[1]);
if (min - 45 < 0)
{
Console.Write(hour - 1);
Console.Write(" ");
Console.WriteLine((min - 45) + 60);
}
}
}
}
'C#' 카테고리의 다른 글
C#_C# 구조 및 탄생 배경 (0) | 2021.08.24 |
---|---|
C#_MSSQL 서버와 연결하기 (0) | 2021.07.15 |
C#_try-catch-finally문 (1) | 2021.06.27 |
C#_this키워드를 사용하는이유 (0) | 2021.06.27 |
C#_delegate2:익명메서드, 람다식 (0) | 2021.06.14 |