-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
56 lines (52 loc) · 1.26 KB
/
Copy pathProgram.cs
File metadata and controls
56 lines (52 loc) · 1.26 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Задача 1.
/*
Console.Write("Input first integer number: ");
int num1 = Convert.ToInt32(Console.ReadLine());
Console.Write("Input second integer number: ");
int num2 = Convert.ToInt32(Console.ReadLine());
if (num1>num2)
Console.Write("maximum number " + num1);
else
Console.Write("maximum number " + num2);
if (num1 == num2)
Console.Write(", the numbers are equal");
*/
// Задача 2.
/*
Console.Write("Input first integer number: ");
int a = Convert.ToInt32(Console.ReadLine());
Console.Write("Input second integer number: ");
int b = Convert.ToInt32(Console.ReadLine());
Console.Write("Input third integer number: ");
int c = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(Math.Max(a, Math.Max(b, c)));
*/
// Задача 3.
/*
Console.Write("Imput integer number: ");
int а = Convert.ToInt32(Console.ReadLine());
if (а % 2 == 0)
Console.Write("да");
else
Console.Write("нет");
*/
// Задача 4.
/*
Console.Write("Imput integer number: ");
int N = Convert.ToInt32(Console.ReadLine());
int current;
if(N>0)
{
current = 1;
while(current <= N)
{
if(current % 2 == 0)
{
Console.Write(current + " ");
current++;
}
else
current++;
}
}
*/