<script >
function f(x)
{ var y;
y = x*x;
return y
};
for (x=-3;x <=+3;x=x+0.5) document.write(x,' ',f(x),'<br>');
</script>
|
<script >
function wr(x,g)
{ var s;
s = String(x);
document.write(s);
for (i=s.length; i <= g; i++) {document.write(' ')}
};
function f(x)
{ var y;
y = x*x;
return y
};
for (x=-3;x <=+3;x=x+0.5) {wr(x,15); wr(f(x),15); document.write('<br>');}
</script>
|