segments.cpp: In function 'int main()':
segments.cpp:10:13: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
10 | scanf("%d",&n);
| ~^ ~~
| | |
| | long long int*
| int*
| %lld
segments.cpp:13:17: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
13 | scanf("%d",&a[i]);
| ~^ ~~~~~
| | |
| | long long int*
| int*
| %lld
segments.cpp:9:21: warning: unused variable 'm' [-Wunused-variable]
9 | long long i,j,n,m,cou = 1,be,csu,lo,dif;
| ^
segments.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
10 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
segments.cpp:13:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
13 | scanf("%d",&a[i]);
| ~~~~~^~~~~~~~~~~~