39
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
var input=11;
8
if(input > 2){
9
Console.WriteLine(
10
$"Число {input} больше числа 2");
11
}
12
else if (input < 20){
13
Console.WriteLine(
14
$"Число {input} меньше числа 20");}
15
16
string selection="Y";
17
switch (selection)
18
{
19
case "Y":
20
Console.WriteLine(
21
"Вы нажали букву Y");
22
break;
23
case "N":
24
Console.WriteLine(
25
"Вы нажали букву N");
26
break;
27
default:
28
Console.WriteLine(
29
"Вы нажали неизвестную букву");
30
break;
31
}
32
33
int z = selection=="Y"? (input+2) : (input-1);
34
35
Console.WriteLine(
36
$"Результат {z}");
37
38
}
39
}
Cached Result