C.cpp: In function ‘int main()’:
C.cpp:17:9: error: ‘srand’ was not declared in this scope
srand(5);
^
C.cpp:26:20: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘int’ [-Wformat=]
printf("%.12f", 0);
^
C.cpp:45:23: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘long double’ [-Wformat=]
printf("%.12f\n", sum);
^
C.cpp:19:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &N);
^
C.cpp:22:30: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &x[i], &y[i]);
^