#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv) {
int svc = 0;
int dsvc = 0;
//int clc = 0;
int buffer[] = {0, 1, 2, 2, 2, 3, 4, 6, 1};
for(int i = 0; i < 9; i++) {
int sv, dsv;
sv = buffer[i];
dsv = sv - svc;
int ddsv = dsv - dsvc;
//printf(" %d %d %d \n", svc, sv, ddsv);
if(ddsv > -1 && ddsv < 1) {
printf(" %d\n", ddsv);
//clc ++;
} /*else {
if(clc > 0) {
printf("[%d]\n", clc);
}
clc = 0;
}*/
svc = sv;
dsvc = dsv;
}
return 0;
}
-std:C11 -Tx86-coff -Ob1 -fp:precise -W1 -Gd
output:
0
0
0
0
-std:C11 -Tx86-coff -Ot -Ob1 -fp:precise -W1 -Gd
output:
0
0
-1
0
0
Pelles C 7.00.350 win64
RSRC0009.DLL: Version 7.00.1
SUPPORT64.DLL: Version 7.00.0
CFORMAT64.DLL: Version 7.00.12
FDIFF64.DLL: Version 7.00.2
PORC64.DLL: Version 7.00.15
POBR64.DLL: Version 7.00.1
SQLITE364.DLL: Version 3071100
POCC.EXE: Version 7.00.18
POASM.EXE: Version 7.00.3
POLINK.EXE: Version 7.00.3
IDESPAWN64.EXE: Version 7.00.1