Var
День,месяц:byte;
Begin
Write('№ дня = ');ReadLn(День)
Var C: = 365 - День
Write('№ месяца = ');ReadLn(Месяц);
Case Месяц of
2:C:=C-31;
3:C:=C-59;
4:C:=C-90;
5:C:=C-120;
6:C:=C-151;
7:C:=C-181;
8:C:=C-212;
9:C:=C-243;
10:C:=C-273;
11:C:=C-304;
12:C:=C-334
End;
if (C mod 100>10)and(C mod 100<20) then Write('До нового года осталось ',C,' дней')
else
Case C mod 10 of
1:Write('До нового года остался ',C,' день');
2..4:Write('До нового года осталось ',C,' дня');
0,5..9:Write('До нового года осталось ',C,' дней')
End
End.
Using System;
namespace chislaabc
{
class Program
{
static void Main(string[] args)
{
int a, b, c;
Console.WriteLine(“Введите число a”);
a = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(“Введите число b”);
b = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(“Введите число c”);
c = Convert.ToInt32(Console.ReadLine());
if (a == b || a == c || b == c)
{
Console.WriteLine(«Есть хотя бы одна противоположная пара»);
}
else
{
Console.WriteLine(«Противоположных чисел нет»);
}
Console.ReadKey();
}
}
}