Network disconnection
Description
4번째 줄의 빈칸에 7을 넣어봅시다. 그러면 value의 값은 7이 되지요. Start메소드에 있는 if문을 보면 조건이 비어 있습니다. value가 5보다 크면 value는 5보다 큽니다.
가 출력되고 그렇지 않으면 value는 5보다 작거나 같습니다.
가 출력되도록 5번째 줄의 빈칸을 알맞게 채워보세요.
빈칸을 채운 다음 코드 4번째 줄에서 value의 값을 바꾸어 가면서 실행해 보고, 각각의 값에 따라 출력이 어떻게 바뀌는지도 확인해 보세요.
Fill type challenge HOWTO
- In the Fill type challenge, you have to fill the blank with appropriate code
- The given code except the blank cannot be edited.
- An error message will be shown in the Result area when you leave the blank empty.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System;
public class UserCode : MonoBehaviour{
void Start(){
int value = ;
if( ){
Console.WriteLine("value는 5보다 큽니다.");
}
else{
Console.WriteLine("value는 5보다 작거나 같습니다.");
}
}
void Update(){
}
}
1
2
3
4
5
6
7
//아래는 시스템 동작을 위한 코드입니다.수정하지 마세요
public class MainRunner{
public static void Main(){
MonoBehaviour mono = new MonoBehaviour();
mono.RunMono();
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Unity의 MonoBehaviour와 유사하게 동작하기 위한 코드입니다. 수정하지 마세요
using System.Reflection;
public class MonoBehaviour{
public void RunMono(){
UserCode userCode = new UserCode();
MethodInfo mStartInfo = typeof(UserCode).GetMethod("Start", BindingFlags.NonPublic | BindingFlags.Instance);
if(mStartInfo!=null){
mStartInfo.Invoke(userCode,null);
}
MethodInfo mUpdateInfo = typeof(UserCode).GetMethod("Update", BindingFlags.NonPublic | BindingFlags.Instance);
if(mUpdateInfo!=null){
for(int i=0;i<10;i++){
mUpdateInfo.Invoke(userCode,null);
}
}
}
}
Result
Stop
Result of [Run] or [Submit] will be displayed here