Var a:integer;
begin
readln(a);
if a mod 2=0 then a:=a*a
else a:=a*a*a;
writeln('a = ',a);
end.
Пример:
18
<span>a = 324</span>
1111 (2) = 1*2^3+1*2^2+1*2^1+1*2<span>^0 =15 (10)
111001 (2) = 1*2</span>^5+1*2^4+1*2^3+0*2^2+0*2^1+1*2^0 = 57 (10)
101011 (2) = 1*2^5+0*2^4+1*2^3+0*2^2+1*2^1+1*2^0 = 43 (10)
11.11 (2) = 1*2^1+1*2^0+1*2^(-1)+1*2<span>^(-2) = 3.75 (10)
1.111 (2) = 1*2</span>^0+1*2^(-1)+1*2^(-2)+1*2^(-3) = 1.875 (10)
111.1 (2) = 1*2^2+1*2^1+1*2^0+1*2<span>^(-1) = 7.5 (10)</span>
Program koordunatu;
Var
x,y:real;
Begin
Write( 'x=>' );
readln(x);
Write( 'y=>' );
readln(y);
if (x=0) and (y=0) then
writeln('M(0,0)')
else
if x=0 then
writeln('OY')
else
if y=0 then
writeln('OX');
if (x>0) and (y>0) then writeln('І');
if (x<0) and (y>0) then writeln('II');
if (x<0) and (y<0) then writeln('III');
if (x>0) and (y<0) then writeln('IV')
End.
137 GB = 137000 MB (десятичная)
137 GB = 140288 MB (двоичная)