RosettaCodeData/Task/Integer-overflow/XPL0/integer-overflow.xpl0

13 lines
254 B
Plaintext

int N;
[N:= -(-2147483647-1);
IntOut(0, N); CrLf(0);
N:= 2000000000 + 2000000000;
IntOut(0, N); CrLf(0);
N:= -2147483647 - 2147483647;
IntOut(0, N); CrLf(0);
N:= 46341 * 46341;
IntOut(0, N); CrLf(0);
N:= (-2147483647-1)/-1;
IntOut(0, N); CrLf(0);
]