Var i:integer; begin for i:=10 to 99 do if (i mod 10)*(i div 10)=i then writeln(i); end. --- Но насколько мне известно, среди двузначных чисел таковых не имеется.
Начнем с формул. Площадь треугольника: S = 1/2*a*b*sin C Отсюда: sin C = 2*S/(a*b); cos C = sqrt(1 - sin^2 C) tg C = sin C / cos C; C = atan(tg C) Теорема косинусов: c = sqrt(a^2 + b^2 - 2*a*b*cos C) Площадь: S = c*h/2; отсюда h = 2*S/c Теорема синусов: a/sin A = b/sin B = c/sin C Отсюда: sin A = a/c*sin C; sin B = b/c*sin C cos A = sqrt(1 - sin^2 A); cos B = sqrt(1 - sin^2 B) tg A = sin A/cos A; A = atan(tg A); tg B = sin B/cos B; B = atan(tg B) Периметр: P = a + b + c Теперь записываем в Паскале singam := 2*S/(a*b); cosgam = sqrt(1 - singam*singam); tangam := singam/cosgam; Gamma := atan(tangam); c := sqrt(a*a + b*b - 2*a*b*cosgam); h := 2*S/c; P := a + b + c; sinalp = a/c*singam; cosalp = sqrt(1 - sinalp*sinalp); tanalp := sinalp/cosalp; Alpha := atan(tanalp); sinbet = b/c*singam; cosbet = sqrt(1 - sinbet*sinbet); tanbet := sinbet/cosbet; Beta := atan(tanbet);
1) var n:integer; begin readln(n); if(n<0)then write(0) else write(n+4); end.
2) var a, b: integer; begin readln(a, b); if(a = b) then write(1) else write(0); end.
3) var a, b, c, s: integer; begin s := 0; readln(a, b, c); if(a >= 0) then s := s + 1; if(b >= 0) then s := s + 1; if(c >= 0) then s := s + 1; write(s); end.
4) var a, b, c, s: integer; begin s := 0; readln(a, b, c); if(a > 0) then s := s + a; if(b > 0) then s := s + b; if(c > 0) then s := s + c; write(s); end. 5) var a, b, c: integer; begin readln(a, b, c); if (a < b) then swap(a, b); if (a < c) then swap(a, c); if (b < c) then swap(b, c); write(a, ' ', b, ' ', c); end.
6) var n, k, s, i: integer; begin s := 0; readln(n, k); for i := 1 to n.ToString.Length do if(strtoint(n.ToString[i]) > k) then s := s + strtoint(n.ToString[i]); write(s); end.
7) var n, s, i: integer; begin s := 0; readln(n); for i := 1 to n do s := s + i; write(s); end.
9) var n, i: integer; begin readln(n); for i := n downto 1 do write(i); end.
12 var n, i: integer; s: real; begin s := 0; readln(n); for i := n downto 1 do s:=s+(0.1*i); write(s); end.
13) var n, i: integer; begin readln(n); for i := 1 to n do write(sqr(i), ' '); end.
14) var n, i, c: integer; begin i := 1; c := 0; readln(n); while (c <> n) do begin if(i mod 3 = 0) then begin write(i, ' ');c := c + 1; end; i := i + 1; end; end.
15) var n, i, a: integer; c: real; begin i := 1; c := 0; readln(n); for i := 1 to n do begin read(a); c := c + a; end; write(c / n) end.
16) var n, i, a: integer; begin i := 1; while true do begin read(a); if(a = 0) then break; n := n + 1; end; write(n) end.
begin
for i:=10 to 99 do
if (i mod 10)*(i div 10)=i then writeln(i);
end.
---
Но насколько мне известно, среди двузначных чисел таковых не имеется.