👤

Elaborati in program care va calcula valorile functiei : 6x²+2x, x › 12
{
3x+4x, x ‹ 12


Răspuns :

function f(x:integer):integer;
begin
if x>12 then f:=6*sqr(x)+2*x;
if x<12 then f:=3*x+4*x;
end;

var x:integer;

begin
read(x);
write(f(x));
end.