3일차 줄넘기를 하려면 D키를 입력 해주세요.
Console Programming/C# Console 2019. 9. 20. 16:17|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Syntax06
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("줄넘기를 하려면 d 키를 입력 해주세요.");
ConsoleKeyInfo info = Console.ReadKey();
bool condition = info.KeyChar == 'd';
if (condition)
{
Console.Write("몇회 줄넘기를 할건가요? ");
Console.Clear();
for (int i = 1; i < count+1; i++)
{
Console.WriteLine($"줄넘기를 {i}회 했습니다.");
}
}
else
{
Console.WriteLine("줄넘기를 하지 못했습니다.");
}
}
}
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|


'Console Programming > C# Console' 카테고리의 다른 글
| 3일차 줄넘기를 하려면 D키를 입력 해주세요. (3) 3의배수에서 야호외치기 (0) | 2019.09.20 |
|---|---|
| 3일차 줄넘기를 하려면 D키를 입력 해주세요. (2) . 홀수의 숫자 색상 바꾸기 (0) | 2019.09.20 |
| 3일차 케릭터의 이름을 입력해주세요. (4) (몬스터에게 공격을 받았습니다. )의 색깔바꾸기 (0) | 2019.09.20 |
| $ - string interpolation (C# reference) (0) | 2019.09.20 |
| 3일차 케릭터의 이름을 입력해주세요. (3) 몬스터의 데미지가 3.5이고 4번 공격함 (0) | 2019.09.20 |

