Network disconnected
Description
문자열(string) 타입의 변수 a와 b 그리고 +
연산자를 이용해 c가 "HelloWorld"
이라는 값을 가지도록 코드 9번째 줄의 빈칸을 알맞게 채워보세요.
string의 +
연산자는 덧셈이 아닌 string을 연결하는 역할을 합니다. 예를 들어,
string a = "my";
string b = "name";
string c = a + b; // c = "myname"
Question type: Fill in the blank
- You need to fill in the blank with the appropriate code.
- You cannot modify the given code.
- An error message will appear in the result if you leave the blank empty.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using System;
public class OperatorExam {
public string stringPlus() {
string a = "Hello";
string b = "World";
//아래줄의 빈칸을 채워보세요.
string c =
return c;
}
public static void Main(){
Console.WriteLine("c의 값은 : " + new OperatorExam().stringPlus());
}
}
Result
Stop
Result of [Run Test] or [Submit] will be displayed here
내가 제출한 코드가 왜 틀렸는지 프로그래머스 AI에게 물어보세요.
제출 후 채점하기를 눌러 30점 이상인 경우 물어볼 수 있어요.
베타 기간 동안에는 한 문제당 1번만 물어볼 수 있어요.
베타 기간 동안에는 한 문제당 1번만 물어볼 수 있어요.