savrsen.cpp: In function 'long long int is_perfect(long long int)':
savrsen.cpp:24:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if(sqn*sqn==n)
^~
savrsen.cpp:25:12: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
sum-=sqn;cout<<abs(sum)<<endl;
^~~~
savrsen.cpp: In function 'int main()':
savrsen.cpp:34:9: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
ans+=is_perfect(i);
~~~^~~~~~~~~~~~~~~