begin for i := 1 to 5 do read(ar[i]); window.IsFixedSize := true; window.Init(0, 0, 800, 800, clDarkGray); window.CenterOnScreen; SetFontSize(32); for i := 1 to 5 do c := c + ar[i].ToString.Length; for i := 1 to 7 do writeln; write(' ':33 - c); for i := 1 to 5 do begin if(ar[i] mod 2 = 0) and (ar[i] mod 10 <> 0) then begin SetFontColor(clred); write(ar[i]); end else if(ar[i] mod 10 = 0) then begin SetFontColor(clblue); write(ar[i]); end else if(ar[i] mod 2 <> 0) then begin SetFontColor(clyellow); write(ar[i]); end end; end.
#include <iostream>#include <cmath>using namespace std;int main(){ int x; float A; cout<<"Введите х="; cin>>x; if (x >= M_PI){ A=0; cout<<"y=0"; } else if(M_PI>x && x>=0) { A=sin(x); cout<<"y=sin(x)"; } else if (0>x && x>=-2){ A=0; cout<<"y="; } else if (x<=-2) { A = pow((x+2),2); cout <<"y="; }
return 0;}
var
i, c: integer;
ar: array[1..5]of integer;
begin
for i := 1 to 5 do read(ar[i]);
window.IsFixedSize := true;
window.Init(0, 0, 800, 800, clDarkGray);
window.CenterOnScreen;
SetFontSize(32);
for i := 1 to 5 do c := c + ar[i].ToString.Length;
for i := 1 to 7 do writeln;
write(' ':33 - c);
for i := 1 to 5 do
begin
if(ar[i] mod 2 = 0) and (ar[i] mod 10 <> 0) then
begin
SetFontColor(clred);
write(ar[i]);
end
else if(ar[i] mod 10 = 0) then
begin
SetFontColor(clblue);
write(ar[i]);
end
else if(ar[i] mod 2 <> 0) then
begin
SetFontColor(clyellow);
write(ar[i]);
end
end;
end.