#include <stdio.h>
int sum(int);
int main(void) {
// your code goes here
int a=10,b;
b=sum(a);
return 0;
}
int sum(int n){
int i,x=0;
for(i=1;i<=n;i++){
x=x+i;
}
return x;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBzdW0oaW50KTsKaW50IG1haW4odm9pZCkgewoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJaW50IGE9MTAsYjsKCWI9c3VtKGEpOwoJcHJpbnRmKCIlZCIsYik7CglyZXR1cm4gMDsKfQoKaW50IHN1bShpbnQgbil7CglpbnQgaSx4PTA7Cglmb3IoaT0xO2k8PW47aSsrKXsKCQl4PXgraTsKCX0KCXJldHVybiB4Owp9Cg==