Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Var
- y, i: integer;
- s, x: real;
- begin
- writeln ('enter x');
- readln(x);
- writeln('enter y');
- readln (y);
- If x=0 then
- begin
- If y>0 then s:=0
- else writeln ('error')
- end
- else
- begin
- s:=1;
- If y=0 then writeln ('s')
- else i:=1;
- begin
- repeat
- if y>=i then
- s:=s*x; i:=i+1;
- until i<=y;
- If y<0 then s:=1/s
- writeln ('s');
- end;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement