-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
43 lines (35 loc) · 1.14 KB
/
Program.cs
File metadata and controls
43 lines (35 loc) · 1.14 KB
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
38
39
40
41
// Нахождение максимального числа
// Console.Write("Введите число x:");
// int x = Convert.ToInt32(Console.ReadLine());
// Console.Write("Введите число y:");
// int y = Convert.ToInt32(Console.ReadLine());
// if (x>y)
// {
// Console.WriteLine(x);
// }
// else
// {
// Console.WriteLine(y);
// }
// Нахождение максимума среди 3 чисел
Console.Write("Введите число x:");
int numberx = Convert.ToInt32(Console.ReadLine());
Console.Write("Введите число y:");
int numbery = Convert.ToInt32(Console.ReadLine());
Console.Write("Введите число z:");
int numberz = Convert.ToInt32(Console.ReadLine());
int max = numberx;
if (numbery>max) max = numbery;
if (numberz>max) max = numberz;
Console.Write(max);
// Проверка, является ли число чётным
// Console.Write("Введите: x = ");
// int x = Convert.ToInt32(Console.ReadLine());
// if(x%2 == 0)
// {
// Console.WriteLine("Чётное число");
// }
// else
// {
// Console.WriteLine("Не чётное число");
// }