Var
n,d,e:integer;
begin
Write('Введите двухзначное число: '); Read(n);
d:=n div 10; e:=n mod 10;
Writeln('Сумма цифр равна ',d+e,', произведение ',d*e);
Writeln('Число, полученное перестановкой цифр ',10*e+d)
end.
<em><u>Тестовое решение:</u></em>
Введите двухзначное число: 29
Сумма цифр равна 11, произведение 18
Число, полученное перестановкой цифр 92
Program abc;Const n=3; m=3;Var a:array[1..n,1..m] of integer; b,y,i,j,sum:integer; srd:real; Begin Writeln('Введите числа массива: '); For i:=1 to n do For j:=1 to m do Begin Write('a[',i,',',j,']= '); Readln(a[i,j]); if a[i,j]>0 then begin sum:=sum+a[i,j]; inc(b); end else If a[i,j]<0 then Inc(y); End; If sum>0 then begin srd:=sum/1 b; Writeln('Среднее =',srd); end else Writeln('Нет положительных членов массива'); If y>0 then begin Writeln('Количество отрицательных элементов =',y); end else Writeln('Нет отрицательных членов массива');End.
Using System;
public class Test
{
public static void Main()
{
double r, x, y;
Console.Write("r = ");
r = double.Parse(Console.ReadLine());
Console.Write("x = ");
x = double.Parse(Console.ReadLine());
Console.Write("y = ");
y = double.Parse(Console.ReadLine());
if ((y>=0)&&(x*x+y*y<=r*r)||(x<=0)&&(y>=-r)&&(y<=x))
Console.WriteLine("Точка попадает в область");
else Console.WriteLine("Точка не попадает в область");
Console.ReadLine();
}
}
Пример:
<span>r = 3
x = -1
y = -2
Точка попадает в область</span>
F1 =F = ¬(¬x+¬y) + x*¬y
F = ¬¬x * ¬¬y+x*¬y
F=x*y+x*¬y
F=x*(y+¬y)
F2=F = x
---------------------------
x y ¬x+¬y ¬(¬x+¬y) x*¬y F1 F2
0 0 1 0 0 0 0
0 1 1 0 0 0 0
1 0 1 0 1 1 1
1 1 0 1 0 1 1
Команда x:=4 присваивает переменной x значение 4