mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 11:29:34 +02:00
* check -1**4 for both vars and constants
This commit is contained in:
parent
d0898ec220
commit
abbb7ed41c
@ -1,7 +1,7 @@
|
||||
program prueba;
|
||||
uses crt;
|
||||
var
|
||||
resultado,exponente:integer;
|
||||
i,resultado,exponente:integer;
|
||||
begin
|
||||
exponente := 3;
|
||||
resultado := -1 ** exponente;
|
||||
@ -17,6 +17,11 @@ begin
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user