summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw0869.pp
blob: 46d5780b4d647da521db0e81c9f81fb388af5f28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
program prueba;
uses math;
var
 i,resultado,exponente:integer;
begin
 exponente := 3;
 resultado := -1 ** exponente;
 writeln (resultado);
 if resultado<>-1 then
   Halt(1);
 exponente := 4;
 resultado := -(1 ** exponente);
 writeln (resultado);
 if resultado<>-1 then
   Halt(1);
 resultado := (-1) ** exponente;
 writeln (resultado);
 if resultado<>1 then
   Halt(1);
 i:=1;
 resultado := - i ** exponente;
 writeln (resultado);
 if resultado<>-1 then
   Halt(1);
 resultado := -1 ** exponente;
 writeln (resultado);
 if resultado<>-1 then
   Halt(1);
end.