반응형
String 메서드 알아보러 가기
C# - String (찾기, 변형, 분할, 제거 메서드)
1. 찾기 01 Contains 특정 문자열이 문자열안에 있는지 확인 public bool Contains (string value); 반환 Boolean : 문자열이 있으면 true 없으면 false 를 반환한다. string name = "Pink Pig"; bool found = name.Contains("Pink"); Con
code-piggy.tistory.com
using System;
namespace baek2
{
class Program
{
static void Main(string[] args)
{
while (true)
{
string input = Console.ReadLine();
Console.WriteLine(input);
if (String.IsNullOrEmpty(input)) return;
}
}
}
}
반응형
'코딩테스트 준비 > 백준 C#' 카테고리의 다른 글
백준 C# 3003 (0) | 2023.04.27 |
---|---|
백준 C# 25083 (0) | 2023.04.27 |
백준 C# 5622 (0) | 2023.04.26 |
백준 C# 2908 (0) | 2023.04.26 |
백준 C# 1152 (0) | 2023.04.26 |
댓글